Skip to content
Alchemy Logo

eth_getHeaderByNumber

POST
/{apiKey}
CUs20

Returns the block header identified by the given block number or tag. Structurally identical to eth_getBlockByNumber but omits body-level fields (size, transactions, uncles, withdrawals). Accepts the standard block tags (earliest, latest, safe, finalized, pending) in addition to a hex-encoded block number.

Path Parameters

stringrequireddefaults to docs-demo

For higher throughput, create your own API key

Request

string or enumrequired

The block number as a hex-encoded quantity, or one of the named tags earliest, latest, safe, finalized, pending.

Responses

200

The block header object, or null if the block does not exist (for example, a future block number).

Was this page helpful?