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

# Beacon headers by slot

> The /eth/v1/beacon/headers method is a vital API endpoint in the Ethereum Beacon Chain, designed to provide a list of recent block headers.

<Note>
  **Get the non-pruned state**

  To get a correct response from the interactive API example, make sure you provide the latest or close to latest slot. For the latest slot number, see [https://beaconcha.in/](https://beaconcha.in/)
</Note>

The `/eth/v1/beacon/headers` method is a vital API endpoint in the Ethereum Beacon Chain, designed to provide a list of recent block headers. Block headers are significant as they contain essential data about the blocks, such as their identification, proposers, and state, without the need to download the entire block content. This method is especially useful for developers and network participants who need to quickly and efficiently access block information for purposes like verification, analysis, and network synchronization.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `none`

## Response

* `array` — list of recent block headers.
  * Each `object` in the array represents a block header, containing:
    * `root` — the root of the block, serving as a cryptographic identifier unique to each block.
    * `canonical` — a boolean value indicating whether the block is part of the canonical chain.
    * `header` — the detailed information of the block header, including:
      * `slot`: The slot number at which the block was proposed, an integral part of the timekeeping system in the Beacon Chain.
      * `proposer_index`: The index of the validator who proposed the block, identifying the responsible party for the block's creation.
      * `parent_root`: The root of the parent block, crucial for maintaining the continuity and integrity of the blockchain.
      * `state_root`: The root of the beacon chain state after the block's effect, essential for verifying the current state of the blockchain.
      * `body_root`: The root of the block's body, which encapsulates key block elements like transactions and attestations.

The `/eth/v1/beacon/headers` method is an indispensable tool in the Ethereum ecosystem, providing streamlined access to important block header information. It plays a critical role in maintaining the transparency, efficiency, and accessibility of the blockchain for various stakeholders.


## OpenAPI

````yaml /openapi/ethereum_beacon_chain_api/state/getBeaconHeadersBySlotAndParentRoot.json GET /0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/beacon/headers
openapi: 3.0.0
info:
  title: Ethereum Beacon Headers API
  version: 1.0.0
servers:
  - url: https://beacon-nd-422-757-666.p2pify.com
security: []
paths:
  /0a9d79d93fb2f4a4b1e04695da2b77a7/eth/v1/beacon/headers:
    get:
      summary: Get beacon headers by slot and parent root
      operationId: getBeaconHeadersBySlotAndParentRoot
      parameters:
        - name: slot
          in: query
          description: Slot number
          required: false
          schema:
            type: integer
            format: int64
            default: 6215071
        - name: parent_root
          in: query
          description: Parent root hash
          required: false
          schema:
            type: string
            format: byte
      responses:
        '200':
          description: Beacon headers successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BeaconHeaders'
        '404':
          description: Beacon headers not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    BeaconHeaders:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BeaconHeader'
      required:
        - data
    Error:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
      required:
        - code
        - message
    BeaconHeader:
      type: object
      properties:
        root:
          type: string
        canonical:
          type: boolean
        header:
          $ref: '#/components/schemas/Header'
      required:
        - root
        - canonical
        - header
    Header:
      type: object
      properties:
        slot:
          type: integer
          format: int64
        parent_root:
          type: string
        state_root:
          type: string
        body_root:
          type: string
      required:
        - slot
        - parent_root
        - state_root
        - body_root

````