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

# Get Block Header

> Get metadata of a given block.



## OpenAPI

````yaml get /getBlockHeader
openapi: 3.1.0
info:
  title: TON HTTP API
  description: >

    This API enables HTTP access to TON blockchain - getting accounts and
    wallets information, looking up blocks and transactions, sending messages to
    the blockchain, calling get methods of smart contracts, and more.


    In addition to REST API, all methods are available through [JSON-RPC
    endpoint](#json%20rpc)  with `method` equal to method name and `params`
    passed as a dictionary.


    The response contains a JSON object, which always has a boolean field `ok`
    and either `error` or `result`. If `ok` equals true, the request was
    successful and the result of the query can be found in the `result` field.
    In case of an unsuccessful request, `ok` equals false and the error is
    explained in the `error`.


    API Key should be sent either as `api_key` query parameter or `X-API-Key`
    header.
  version: 2.0.0
servers:
  - url: https://toncenter.com/api/v2
  - url: https://testnet.toncenter.com/api/v2
security: []
tags:
  - name: accounts
    description: Information about accounts.
  - name: blocks
    description: Information about blocks.
  - name: transactions
    description: Fetching and locating transactions.
  - name: get config
    description: Get blockchain config
  - name: run method
    description: Run get method of smart contract.
  - name: send
    description: Send data to blockchain.
  - name: json rpc
    description: JSON-RPC endpoint.
paths:
  /getBlockHeader:
    get:
      tags:
        - blocks
      summary: Get Block Header
      description: Get metadata of a given block.
      operationId: get_block_header_getBlockHeader_get
      parameters:
        - required: true
          schema:
            type: integer
            title: Workchain
          name: workchain
          in: query
        - required: true
          schema:
            type: integer
            title: Shard
          name: shard
          in: query
        - required: true
          schema:
            type: integer
            title: Seqno
          name: seqno
          in: query
        - required: false
          schema:
            type: string
            title: Root Hash
          name: root_hash
          in: query
        - required: false
          schema:
            type: string
            title: File Hash
          name: file_hash
          in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBlockHeaderResponse'
              examples:
                sample:
                  summary: Block header example
                  value:
                    ok: true
                    result:
                      '@type': blocks.header
                      id:
                        '@type': ton.blockIdExt
                        workchain: -1
                        shard: '-9223372036854775808'
                        seqno: 1
                        root_hash: 8GYhhrigd8CwZGrRT59iulLDcgiTYuvOAzFJxugc0Ts=
                        file_hash: V+XzykEwun4yePZhAEPZk77RbMfMOgS/S4GiJkSKY6s=
                      global_id: -239
                      version: 0
                      after_merge: false
                      after_split: false
                      before_split: false
                      want_merge: false
                      want_split: false
                      validator_list_hash_short: -1447544682
                      catchain_seqno: 0
                      min_ref_mc_seqno: 1
                      is_key_block: false
                      prev_key_block_seqno: 0
                      start_lt: '1000000'
                      end_lt: '1000012'
                      gen_utime: 1573822385
                      prev_blocks:
                        - '@type': ton.blockIdExt
                          workchain: -1
                          shard: '-9223372036854775808'
                          seqno: 0
                          root_hash: F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=
                          file_hash: XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24=
                      '@extra': 1755814930.1088252:0:0.1467032130574265
        '422':
          description: Validation Error
        '504':
          description: Lite Server Timeout
      security: []
components:
  schemas:
    GetBlockHeaderResponse:
      allOf:
        - $ref: '#/components/schemas/TonResponse'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/BlocksHeader'
              description: Header information of the specified block.
    TonResponse:
      properties:
        ok:
          type: boolean
          title: Ok
        result:
          anyOf:
            - type: string
            - items: {}
              type: array
            - type: object
          title: Result
        error:
          type: string
          title: Error
        code:
          type: integer
          title: Code
      type: object
      required:
        - ok
      title: TonResponse
    BlocksHeader:
      type: object
      description: Block header information.
      properties:
        '@type':
          type: string
          example: blocks.header
        id:
          $ref: '#/components/schemas/TonBlockIdExt'
          description: Extended identifier of the block.
        global_id:
          type: integer
          description: Global network identifier.
        version:
          type: integer
          description: Block format version.
        after_merge:
          type: boolean
          description: True if block was created after a merge.
        after_split:
          type: boolean
          description: True if block was created after a split.
        before_split:
          type: boolean
          description: True if block was created before a split.
        want_merge:
          type: boolean
          description: Indicates if validators wanted a merge.
        want_split:
          type: boolean
          description: Indicates if validators wanted a split.
        validator_list_hash_short:
          type: integer
          description: Short hash of validator list.
        catchain_seqno:
          type: integer
          description: Catchain sequence number.
        min_ref_mc_seqno:
          type: integer
          description: Minimum referenced masterchain seqno.
        is_key_block:
          type: boolean
          description: True if this block is a key block.
        prev_key_block_seqno:
          type: integer
          description: Previous key block sequence number.
        start_lt:
          type: string
          description: Starting logical time.
        end_lt:
          type: string
          description: Ending logical time.
        gen_utime:
          type: integer
          description: Block generation UNIX timestamp.
        prev_blocks:
          type: array
          description: List of previous block identifiers.
          items:
            $ref: '#/components/schemas/TonBlockIdExt'
        '@extra':
          type: string
          description: Extra metadata for the response.
      required:
        - id
        - global_id
        - version
        - gen_utime
    TonBlockIdExt:
      type: object
      properties:
        '@type':
          type: string
          example: ton.blockIdExt
        workchain:
          type: integer
        shard:
          type: string
          description: 64-bit signed integer as string
        seqno:
          type: integer
        root_hash:
          type: string
        file_hash:
          type: string
      required:
        - workchain
        - shard
        - seqno
        - root_hash
        - file_hash
      description: Extended block identifier.

````