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

# Get blocks

> Returns a paginated list of blocks.



## OpenAPI

````yaml /api-reference/rollup-indexer/openapi.yaml get /indexer/block/v1/blocks
openapi: 3.1.0
info:
  title: Indexer API
  description: >-
    Query indexed data including transactions, blocks, NFTs, and token holders
    across Initia Stack chains.
  version: 1.0.0
servers:
  - url: https://rollytics-api-evm-1.anvil.asia-southeast.initia.xyz
    description: evm-1 (testnet)
  - url: https://rollytics-api-move-1.anvil.asia-southeast.initia.xyz
    description: move-1 (testnet)
  - url: https://rollytics-api-wasm-1.anvil.asia-southeast.initia.xyz
    description: wasm-1 (testnet)
security: []
paths:
  /indexer/block/v1/blocks:
    get:
      tags:
        - Blocks
      summary: Get blocks
      description: Returns a paginated list of blocks.
      operationId: getBlocks
      parameters:
        - $ref: '#/components/parameters/paginationKey'
        - $ref: '#/components/parameters/paginationOffset'
        - $ref: '#/components/parameters/paginationLimit'
        - $ref: '#/components/parameters/paginationReverse'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  blocks:
                    type: array
                    items:
                      $ref: '#/components/schemas/Block'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
components:
  parameters:
    paginationKey:
      name: pagination.key
      in: query
      description: Cursor key for pagination.
      required: false
      schema:
        type: string
    paginationOffset:
      name: pagination.offset
      in: query
      description: Number of records to skip.
      required: false
      schema:
        type: integer
    paginationLimit:
      name: pagination.limit
      in: query
      description: Maximum number of records to return. Defaults to 100.
      required: false
      schema:
        type: integer
        default: 100
    paginationReverse:
      name: pagination.reverse
      in: query
      description: When `true`, returns results in descending order. Defaults to `true`.
      required: false
      schema:
        type: boolean
        default: true
  schemas:
    Block:
      type: object
      properties:
        chain_id:
          type: string
          description: The chain identifier.
        height:
          type: string
          description: Block height.
        hash:
          type: string
          description: Block hash (hex-encoded).
        block_time:
          type: string
          description: Time between this block and the previous block, in milliseconds.
        timestamp:
          type: string
          description: Block timestamp in RFC 3339 format.
        gas_used:
          type: string
          description: Total gas used in this block.
        gas_wanted:
          type: string
          description: Total gas requested in this block.
        tx_count:
          type: string
          description: Number of transactions in this block.
        total_fee:
          type: array
          description: Total fees collected in this block.
          items:
            type: object
            properties:
              denom:
                type: string
                description: Fee denomination.
              amount:
                type: string
                description: Fee amount.
        proposer:
          type: object
          description: Block proposer information.
          properties:
            moniker:
              type: string
              description: Validator moniker.
            identity:
              type: string
              description: Validator identity.
            operator_address:
              type: string
              description: Validator operator address.
    Pagination:
      type: object
      description: Pagination metadata for list responses.
      properties:
        previous_key:
          type: string
          nullable: true
          description: Cursor key for the previous page.
        next_key:
          type: string
          nullable: true
          description: Cursor key for the next page. Null when there are no more results.
        total:
          type: string
          description: Total number of records matching the query.

````