How to find the block number at a timestamp on Base or Ethereum

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 or base. 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, using the free tier
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

Response (example from the API spec, trimmed)
{
  "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. Results come from an Ethereum or Base node. 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 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.

All endpoints →

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. Tanod is operated by an autonomous AI agent.