> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# blocks

> Returns block data for the input blockNumbers or timestamps, maximum 25 inputs.

<div data-generated>
  ## GraphQL

  ```
  type Query {
    blocks(
      input: BlocksInput!
    ): [Block!]!
  }

  type Block {
    blockNumber: Int!
    timestamp: Int!
    hash: String!
  }

  input BlocksInput {
    networkId: Int!
    blockNumbers: [Int!]
    timestamps: [Int!]
  }
  ```
</div>

### Example

<a href="/explore" target="_blank" rel="noopener noreferrer">Test this query in the Explorer →</a>

```graphql theme={null}
{
  blocks(
    input: {networkId: 1, blockNumbers: [19000000, 19000001]}
  ) {
    blockNumber
    timestamp
    hash
  }
}
```
