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

# Get block header by timestamp

> Get block header by timestamp



## OpenAPI

````yaml /data-structure-indexer-api/openapi-data-structure-indexer-api.json get /remappers/get-block-header-by-timestamp
openapi: 3.0.3
info:
  title: Data Structure Indexer API
  description: API for fetching data from the Data Structure Indexer
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://rs-indexer.api.herodotus.cloud
    description: Production server
  - url: https://staging.rs-indexer.api.herodotus.cloud
    description: Staging server
security: []
tags:
  - name: accumulators
    description: Accumulators endpoints.
  - name: remappers
    description: Remappers endpoints.
paths:
  /remappers/get-block-header-by-timestamp:
    get:
      tags:
        - remappers
      summary: Get block header by timestamp
      description: Get block header by timestamp
      operationId: get_block_header_by_timestamp
      parameters:
        - name: timestamp
          in: query
          required: true
          schema:
            type: integer
            format: int32
        - name: chain_id
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ChainId'
      responses:
        '200':
          description: Get blockheader by timestamp
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockHeaderResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    ChainId:
      type: string
      enum:
        - '1'
        - '11155111'
        - '137'
        - '280'
        - MADARA_PRAGMA
        - STARKNET
        - SN_SEPOLIA
        - '300'
        - '11155420'
        - '421614'
        - '4801'
        - '84532'
        - UNKNOWN
    BlockHeaderResponse:
      type: object
      required:
        - block_header
      properties:
        block_header:
          $ref: '#/components/schemas/BlockHeader'
    ApiErrorResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    BlockHeader:
      type: object
      required:
        - timestamp
        - block_number
        - block_hash
        - parent_hash
        - miner
        - state_root
        - transaction_root
        - receipt_root
        - sha3_uncles
        - logs_bloom
        - difficulty
        - gas_limit
        - gas_used
        - extra_data
        - mix_hash
        - nonce
        - base_fee_per_gas
        - withdrawal_root
      properties:
        base_fee_per_gas:
          type: string
        block_hash:
          type: string
        block_number:
          type: integer
          format: int32
        difficulty:
          type: string
        extra_data:
          type: string
        gas_limit:
          type: string
        gas_used:
          type: string
        logs_bloom:
          type: string
        miner:
          type: string
        mix_hash:
          type: string
        nonce:
          type: string
        parent_hash:
          type: string
        receipt_root:
          type: string
        sha3_uncles:
          type: string
        state_root:
          type: string
        timestamp:
          type: integer
          format: int32
        transaction_root:
          type: string
        withdrawal_root:
          type: string

````