Skip to content

eth_getHeaderByNumber ​

served · same as reth

Returns the header of a block by its number or a tag, without the transactions.

When to use ​

Use it when you need the header fields only. The answer is smaller than a full block.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getHeaderByNumber", "params": ["0x18facad"]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getHeaderByNumber",
  "params": [
    "0x18facad"
  ]
}

Response ​

Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "hash": "0x88392e71b7c4893c80cadfdeadcbaa91add6a41a1a9e2bda3aef6774053617a5",
    "parentHash": "0x05b521e7eb3efcbdbe7082cfdfc5ce1c3275fd597611a866d3fae4241debc251",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "miner": "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97",
    "stateRoot": "0x26e239000c719435e8d9bc3f995bbf83d710c6203c9f8c4cf58f75279322f1cd",
    "transactionsRoot": "0x11189d9facb85bca3cb26e818541f001d5172bb71244b33f98a7d241f22fe6f0",
    "receiptsRoot": "0x0dda7fb25a204be283f3e11465284e25b94ecdd901e1b361c282bf96d6bf5878",
    "logsBloom": "0xb5fbccf60fdf3fd3f74b9fbd9fedb0f9d9fe8de9f4243732afdfdffeff3baaaf3dddb3bff9bf4c55cbbfffdfe76fff67c7bbd274df37afeff5eae79ed7bf1edb9f6fb8b26dff7ffdffdafff9f9dfd7effad6bfbe57fdfdf1b2ad7f4dac7fd2b15e73e59fbeecfbfa675fdaefe938fa0fa77be6befcbb7e9f9ff17c56535faf6fafebbffe7dd859bdffcaaed757f3e30ff23568efb7bdfe9febbb5e7efbbdf3bc77f5eeefdbbfe6db76f3efdefd347cebeff2fbfff98b671bf6fdbefef6d9ff7eefd09eaff3d8dd... 114 more characters",
    "difficulty": "0x0",
    "number": "0x18facad",
    "gasLimit": "0x3938700",
    "gasUsed": "0x22fa2ac",
    "timestamp": "0x6acfe2e7",
    "extraData": "0x546974616e2028746974616e6275696c6465722e78797a29",
    "mixHash": "0x63c41f1e111838bf6f2e0bfd8a43702b5e6ed5e9bf7e6297788dda919e4f485f",
    "nonce": "0x0000000000000000",
    "baseFeePerGas": "0xad66c85",
    "withdrawalsRoot": "0x9f3e8bd85ab2fbdd5a24bbedaa86e3c724ac34a04b2b600e8c26e9180bcc7dbe",
    "blobGasUsed": "0x80000",
    "excessBlobGas": "0xb3f8df3",
    "parentBeaconBlockRoot": "0xa2e810d10e3010fc05cc11fe6e2f505f0deb98ce1181433a48328e345c4d726c",
    "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
  }
}

Full response

Parameters ​

NameTypeRequiredMeaning
blockblock number in hex, or a tag, see Block parameteryesThe block.

Returns ​

The fields of the block without transactions, uncles, withdrawals and size. null when the block is above the head. A block below the first block of the node gives the error 4444. See Block.

Compared with reth ​

The live example above gives the same answer on Cinder and on reth 2.7.

eth_getBlockByNumber, eth_getHeaderByHash.

Schema (OpenRPC) ​

Parameter block: BlockNumberOrTag
json
{
  "title": "Block number or tag",
  "oneOf": [
    {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    {
      "title": "Block tag",
      "type": "string",
      "enum": [
        "earliest",
        "finalized",
        "safe",
        "latest",
        "pending"
      ],
      "description": "latest is the head of the last forkchoice update, as reth. pending is the block that Cinder builds from its transaction pool after latest, as reth. safe and finalized are the blocks of the last forkchoice update, as reth. Before the first update, they name no block. earliest is the first block that the node stored, as reth."
    }
  ]
}
Result: Header or null
json
{
  "oneOf": [
    {
      "title": "Block header",
      "description": "A block in the JSON-RPC format without transactions, uncles, withdrawals and size.",
      "type": "object"
    },
    {
      "type": "null"
    }
  ]
}