How to get the latest block number and header on Base or Ethereum

POST a chain to /v1/chain/block. It returns the latest block's number, timestamp, hash, base fee, gas used and gas limit.

Request

chain is ethereum or base. There are no other fields.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/chain/block \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"chain":"ethereum"}'

Response

Response (the example from the OpenAPI spec, trimmed)
{
  "chain": "ethereum",
  "number": 21000000,
  "timestamp": 1735000000,
  "hash": "0x5e2f1a9c0b7d4e3f8a1b2c3d4e5f60718293a4b5c6d7e8f9a0b1c2d3e4f50617",
  "base_fee_gwei": "12.3",
  "gas_used": "15000000",
  "gas_limit": "30000000"
}

Limits and caveats

Latest, not final. The newest block can be reorganised. For a confirmed result, wait for several blocks, or read the transaction and its confirmation count.

Values in the example are illustrative. The number and hash above come from the OpenAPI example, not from the live chain. A live call returns the current head.

timestamp is Unix seconds.

Price and free allowance

USD 0.001 per call, paid in USDC on Base with x402. 10 free chain reads per IP per UTC day with the header X-Tanod-Free: 1, in one pool shared with the other chainpeek reads. MCP tool: get_block at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Related guides: Gas price API for Base and Ethereum, How to look up a transaction's status and fee on Base or Ethereum, Chainlink price feed API: read ETH/USD and other prices without a node. Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.