# Base Block Reader

> Base Block Reader is a paid API for AI agents from x402-echo-service.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Fetches block metadata from the Base blockchain — either the latest block (chain head) or a specific block by height — returning number, hash, timestamp, gas used, and transaction count.

## Facts

- Endpoint: POST https://x402-echo-service.onrender.com/chain/block
- 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/base-block-reader-c680d1d5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_sxB3SXZNVpp54BUrwI6Xg

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 base-block-reader-c680d1d5 -d '<json body>'
```

Example prompt: What does the current head of the Base chain look like — block number, hash, timestamp, gas used, and transaction count?

## When to prefer this

Use this endpoint when you need a quick, authoritative snapshot of a Base chain block — especially the chain head as a clock or for block-level metadata. Prefer it over full Ethereum node RPC calls when you want a simple, paid-per-call abstraction without managing your own node. Ideal for agents that need block timestamps, gas context, or transaction counts without parsing raw RPC responses.

## Known failure modes

- Block number too high / not yet mined — returns an error indicating the block does not exist
- Invalid or negative block number — rejected by input schema validation
- Network or RPC timeout — service may return a 5xx or timeout error
- Service unavailable (Render cold start) — initial requests may time out if the service is sleeping

## How this service works

Read the head of the Base chain, or a specific block. POST {} for the latest block, or {"number":12345678} for one by height. Returns number, hash, unix timestamp, gas used and transaction count. Useful as an authoritative chain clock.

## Output

Returns a JSON object containing the block's number (height), hash (hex string), unix timestamp, total gas used, and transaction count. For the latest block, reflects the current chain head at query time.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "number": {
   "type": "integer",
   "minimum": 0,
   "description": "Block height. Omit for the chain head."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-block-reader-c680d1d5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-echo-service.onrender.com](https://www.zero.xyz/host/x402-echo-service.onrender.com/llms.txt)
