# Blockchain Block Number by Timestamp Lookup

> Blockchain Block Number by Timestamp Lookup is a paid API for AI agents from ai-policy-kit.moneymaker-ai.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-19).

Returns the block number (and surrounding block metadata) on a given blockchain that corresponds to a specified timestamp

## Facts

- Endpoint: GET https://ai-policy-kit.moneymaker-ai.workers.dev/api/block-at-time?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockchain-block-number-by-timestamp-lookup-d13759f3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mYU_CWRsBpDJ2aWHQx1r2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability blockchain-block-number-by-timestamp-lookup-d13759f3
```

Example prompt: What block number was active on Base at 2026-10-18T14:53:53 UTC?

## When to prefer this

Choose this endpoint when you need to map a human-readable or programmatic timestamp to a specific block number on a supported EVM-compatible chain (Base, Ethereum, BSC, Arbitrum, Optimism, Polygon, Gnosis, Celo). It is ideal for DeFi analytics, historical state queries, cross-chain event alignment, and smart contract audit workflows where you need precise block-time correspondence without running your own node.

## Known failure modes

- Invalid or unsupported chain name returns an error
- Malformed or out-of-range timestamp causes a 400 error
- Timestamp far in the future may return an estimate rather than an exact block
- Network or upstream node timeout may cause 5xx response
- Missing required query parameters (chain or time) returns a validation error

## How this service works

Generate an AI_POLICY.md and a pull request template with an AI-disclosure section for your open-source repo. Free, runs in your browser.

## Output

A JSON object containing the resolved block number, chain name, chain ID, the exact UTC time of that block, the next block number and its time, the latest block number at query time, whether the match was exact, and the number of search rounds taken to converge.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "chain",
      "time"
     ],
     "properties": {
      "time": {
       "type": "string",
       "description": "unix seconds, unix ms, or ISO 8601 (UTC)"
      },
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "bsc",
        "arbitrum",
        "optimism",
        "polygon",
        "gnosis",
        "celo"
       ],
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "block": 128381698,
  "chain": "bsc",
  "exact": true,
  "rounds": 7,
  "chainId": 56,
  "next_block": 128381699,
  "latest_block": 128445498,
  "block_time_utc": "2026-10-18T14:53:53.000Z",
  "requested_time_utc": "2026-10-18T14:53:53.000Z",
  "next_block_time_utc": "2026-10-18T14:53:54.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockchain-block-number-by-timestamp-lookup-d13759f3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai-policy-kit.moneymaker-ai.workers.dev](https://www.zero.xyz/host/ai-policy-kit.moneymaker-ai.workers.dev/llms.txt)
