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

# Blocks API

> gRPC API for retrieving blocks and shard chunks from the Snapchain

Used to retrieve blocks and shard chunks from the chain.

## API

| Method Name    | Request Type       | Response Type       | Description                                  |
| -------------- | ------------------ | ------------------- | -------------------------------------------- |
| GetBlocks      | BlocksRequest      | stream Block        | Returns a stream of blocks for a given shard |
| GetShardChunks | ShardChunksRequest | ShardChunksResponse | Returns chunks of serialized block data      |

## BlocksRequest

| Field                | Type   | Label    | Description                            |
| -------------------- | ------ | -------- | -------------------------------------- |
| shard\_id            | uint32 |          | ID of the shard to get blocks from     |
| start\_block\_number | uint64 |          | Block number to start from (inclusive) |
| stop\_block\_number  | uint64 | optional | Block number to stop at (inclusive)    |

## ShardChunksRequest

| Field                | Type   | Label    | Description                            |
| -------------------- | ------ | -------- | -------------------------------------- |
| shard\_id            | uint32 |          | ID of the shard to get chunks from     |
| start\_block\_number | uint64 |          | Block number to start from (inclusive) |
| stop\_block\_number  | uint64 | optional | Block number to stop at (inclusive)    |

## ShardChunksResponse

| Field         | Type       | Label    | Description           |
| ------------- | ---------- | -------- | --------------------- |
| shard\_chunks | ShardChunk | repeated | Array of shard chunks |

## Block

| Field    | Type        | Label    | Description                    |
| -------- | ----------- | -------- | ------------------------------ |
| header   | BlockHeader |          | Header info for the block      |
| messages | Message     | repeated | Array of messages in the block |


## Related topics

- [Block FID](/reference/publish-block.md)
- [deleteBlock](/nodejs-sdk/block-apis/deleteBlock.md)
- [publishBlock](/nodejs-sdk/block-apis/publishBlock.md)
- [Mutes, Blocks, and Bans](/docs/mutes-blocks-and-bans.md)
- [fetchBlockList](/nodejs-sdk/block-apis/fetchBlockList.md)
