Home

Get block header by number

POST
https://eth-archive.nownodes.io/

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

The erigon_getHeaderByNumber method returns the block header for the specified block number.

This Erigon-specific method provides detailed header information including:

  • Block metadata (number, hash, parent hash)
  • Timestamp and difficulty
  • Gas usage and limits
  • Miner information
  • State root and transaction roots

This method is useful for blockchain analysis and retrieving historical block data.

Body

application/json

The erigon_getHeaderByNumber method returns the block header for the specified block number.

This Erigon-specific method provides detailed header information including:

  • Block metadata (number, hash, parent hash)
  • Timestamp and difficulty
  • Gas usage and limits
  • Miner information
  • State root and transaction roots

This method is useful for blockchain analysis and retrieving historical block data.

Request payload for Get block header by number.

jsonrpcstring2.0required

JSON-RPC version identifier

methodstringerigon_getHeaderByNumberrequired

The method to be invoked

idinteger | stringrequired

Request identifier for matching responses

paramsArray<string | string>required

Array containing block number or block tag

Show child attributes

Single JSON-RPC parameter value accepted by this method.

One of

Block number in hexadecimal format

string

Block tag specifying which block to retrieve

stringlatestearliestpendingsafefinalized

Response

200OK

Successful block header response

400Bad Request

Invalid request parameters

401Unauthorized

Unauthorized: API key is present but rejected by the NOWNodes gateway.

404Not Found

Block not found

405Method Not Allowed

Method Not Allowed. Returned by the NOWNodes gateway for malformed or unsupported gateway-level requests.

422Unprocessable Entity

Missing API key. The NOWNodes gateway returns plain text for this error.

500Internal Server Error

Internal server error