How to find the block number at a timestamp on Base or Ethereum
Updated 2026-11-10
Use when an agent must map a date or timestamp to the Ethereum, Base or Robinhood Chain block mined at that time.
From an MCP client, add https://tanod.dev/mcp and call get_block_at_time; its free daily calls are applied automatically, no key or signup.
POST a chain and a timestamp to /v1/chain/block-at. It returns the last block at or before that time and the next block, so you can turn a date into a block number for log queries or snapshots.
Request
chain is ethereum, base or robinhood. timestamp is Unix seconds (integer or digit string) or ISO 8601; without an offset it is read as UTC and the response says assumed_utc.
curl -s -X POST https://tanod.dev/v1/chain/block-at \
-H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
-d '{"chain": "base", "timestamp": "2026-01-01T00:00:00Z"}'Response
{
"chain": "base",
"timestamp": 1767225600,
"timestamp_iso": "2026-01-01T00:00:00Z",
"assumed_utc": false,
"block": {
"number": 40218126,
"timestamp": 1767225599,
"timestamp_iso": "2025-12-31T23:59:59Z"
},
"next_block": {
"number": 40218127,
"timestamp": 1767225601,
"timestamp_iso": "2026-01-01T00:00:01Z"
},
"is_latest": false,
"rpc_calls": 3
}Limits and caveats
Future times. When the time is at or after the chain head, is_latest is true and the block is the head, not a future block.
Block times differ. Block timestamps are set by the block producer, so two blocks can share a second or skip one. Use the returned block and next block timestamps to see the exact bracket.
Node answers. A malformed or inconsistent node answer is a 5xx and is not charged.
Price and free allowance
USD 0.003 per call, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum with x402. 10 free calls per IP per UTC day with the header X-Tanod-Free: 1. The pool is shared by every on-chain read. MCP tool: get_block_at_time at https://tanod.dev/mcp, where the free tier is automatic.
Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/chain?via=block-at-timestamp-api as a custom connector (steps), then ask in plain words, for example "Which Ethereum block was mined at midnight UTC on 1 January 2025?" The free daily allowance is applied automatically over MCP. Beyond it a call needs an x402 payment, which these clients can make.
Related guides: How to get the latest block number and header on Base or Ethereum, How to look up a transaction's status and fee on Base or Ethereum, How to get and decode a transaction's event logs on Base or Ethereum. Back to tanod.dev or the guide index. Results are automated and heuristic.