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

> Get the raw block header data for a Bitcoin block in hexadecimal format for protocol-level analysis.

# Block Header



## OpenAPI

````yaml bitcoin/esplora-api/openapi.json get /block/{hash}/header
openapi: 3.0.3
info:
  title: Bitcoin - Esplora API
  version: 1.0.0
  description: >
    OpenAPI spec for core Esplora endpoints: blocks, transactions, addresses,
    mempool, fees, UTXO data and more.
servers:
  - url: https://xbt-mainnet.gomaestro-api.org/v0/esplora
  - url: https://xbt-testnet.gomaestro-api.org/v0/esplora
security:
  - api-key: []
paths:
  /block/{hash}/header:
    get:
      tags:
        - Blocks
      summary: Block Header
      description: Returns the hex-encoded block header.
      parameters:
        - name: hash
          in: path
          required: true
          schema:
            type: string
            example: 00000000000000000001b9dca5d168a8e959df258814beec486572e843fddee5
          description: The hash of the block to retrieve the header for.
      responses:
        '200':
          description: Raw block header as hex
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/BlockHeader'
                type: string
                example: 00000020e91f...2d1e4dbb65
        '400':
          description: Invalid block hash
        '404':
          description: Block not found
components:
  schemas:
    BlockHeader:
      type: string
      description: >-
        Hex-encoded string representing the block header (80 bytes, 160 hex
        characters)
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key
      description: Project API Key

````