> ## 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. blocks query reference: arguments and response fields.

## GraphQL

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

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

input BlocksInput {
  networkId: Int!
  blockNumbers: [Int!]
  timestamps: [Int!]
}
```

### Example

[Test this query in the Explorer →](https://docs.codex.io/explore.md)

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.