# Agent402 Block Number Lookup

> Agent402 Block Number Lookup is a paid API for AI agents from agent402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the current block number for a specified EVM-compatible blockchain network (defaulting to Base)

## Facts

- Endpoint: GET https://agent402.tools/api/block-number
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-block-number-lookup-26391b18
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_a9-iVI-wb0q47UnxQc6Wh

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 agent402-block-number-lookup-26391b18
```

Example prompt: What's the current block number on Base right now?

## When to prefer this

Choose this endpoint when you need a quick, cheap ($0.001), no-signup way to get the current block number on Base or other major EVM chains. Ideal for agents that need onchain timing context, transaction finality checks, or block-indexed queries without setting up a full RPC provider connection. Supports Base, Ethereum, Polygon, Arbitrum, and Optimism via x402 micropayment — no API key required.

## Known failure modes

- Unsupported network name returns an error — only ethereum, base, polygon, arbitrum, and optimism are valid
- Payment failure (insufficient USDC balance or unsupported chain) results in a 402 response before data is returned
- Network RPC downtime may cause delayed or failed responses
- Malformed query parameter (e.g. misspelled network name) defaults to base or returns an error

## How this service works

The latest block number on Ethereum, Base, Polygon, Arbitrum, or Optimism. The cheapest possible on-chain read - the hello world of paid chain access. Keyless multi-endpoint failover. ?network=base

## Output

Returns a JSON object containing the current block number as a decimal integer (blockNumber), its hexadecimal representation (hex), and the network name (network). Example: {"hex":"0x19bfcc0","network":"base","blockNumber":27000000}.

## 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": [],
     "properties": {
      "network": {
       "type": "string",
       "description": "ethereum / base / polygon / arbitrum / optimism (default base)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "network",
      "blockNumber",
      "hex"
     ],
     "properties": {
      "hex": {
       "type": "string"
      },
      "network": {
       "type": "string"
      },
      "blockNumber": {
       "type": "integer"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hex": "0x19bfcc0",
  "network": "base",
  "blockNumber": 27000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-block-number-lookup-26391b18/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
