# Block Data (Base / Optimism / Ethereum Mainnet)

> Block Data (Base / Optimism / Ethereum Mainnet) is a paid API for AI agents from x402-audit.tatschluizguilherme.workers.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14).

Returns block metadata — number, hash, timestamp, baseFee, gas usage, transaction count, proposer, and size — for any block on Base, Optimism, or Ethereum Mainnet

## Facts

- Endpoint: GET https://x402-audit.tatschluizguilherme.workers.dev/block
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/block-data-base-optimism-ethereum-mainnet-97e25735
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rnchm8TQLeZTF-D5qHsl4

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 block-data-base-optimism-ethereum-mainnet-97e25735
```

Example prompt: What's the current block number, timestamp, and base fee in gwei on Base right now?

## When to prefer this

Use this endpoint when you need a real-time or historical network snapshot on Base, Optimism, or Ethereum Mainnet — especially to verify current gas costs (baseFee), confirm block timestamps for proof-of-time, or assess network congestion before submitting a transaction. It is the right choice over raw RPC calls when you want a single normalized REST call that returns all key block fields in one response without writing Web3 code.

## Known failure modes

- Invalid chain value (not base/op/mainnet) returns error
- Block number not found or out of range returns found: false
- Malformed block hex reference returns parsing error
- RPC backend unavailable returns 500 or timeout
- Payment not included or invalid returns 402 Payment Required

## How this service works

Pay-per-call on-chain API for AI agents and developers: wallet audits, token safety audits (honeypot detection), live gas prices, token prices, transaction receipts, balances, ENS resolution, block data, ERC-20 allowances, transaction simulation, swap quotes and multicall batches — all computed on-chain via public RPCs (no external market API). Pay per request in USDC on Base via the x402 exact scheme (EIP-3009 transferWithAuthorization). No API key, no signup, no subscription.

## Output

A JSON object containing: network name, block reference queried, found boolean, block number, block hash, unix timestamp, ISO timestamp, baseFee in wei, baseFee in gwei, gasUsed, gasLimit, transactionCount, block proposer address, and block size.

## 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",
     "properties": {
      "block": {
       "type": "string",
       "description": "Block reference: latest (default), earliest, or a block number in decimal or 0x hex"
      },
      "chain": {
       "enum": [
        "base",
        "op",
        "mainnet"
       ],
       "type": "string",
       "description": "Chain to query (default base)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "network",
      "block",
      "found"
     ],
     "properties": {
      "block": {
       "type": "string"
      },
      "found": {
       "type": "boolean"
      },
      "number": {
       "type": "number"
      },
      "network": {
       "type": "string"
      },
      "timestamp": {
       "type": "number"
      },
      "baseFeeGwei": {
       "type": [
        "number",
        "null"
       ]
      },
      "timestampIso": {
       "type": "string"
      },
      "transactionCount": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hash": "0x941a93c4a4d7c5f2c14b0a4f3c6b1f7a0a5b4e3d2c1f0e9a8b7c6d5e4f3a2b1c0",
  "block": "latest",
  "found": true,
  "number": 24400123,
  "gasUsed": 8501234,
  "network": "base",
  "gasLimit": 30000000,
  "proposer": "0x0000000000000000000000000000000000000000",
  "sizeBytes": 81234,
  "timestamp": 1786123456,
  "parentHash": "0x8b3a1f9c7e2d4b6a8f0c3e5d7a9b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c",
  "baseFeeGwei": 0.01,
  "requestedAt": "2026-08-05T00:44:16.000Z",
  "timestampIso": "2026-08-05T00:44:16.000Z",
  "baseFeePerGasWei": "10000000",
  "transactionCount": 212
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/block-data-base-optimism-ethereum-mainnet-97e25735/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-audit.tatschluizguilherme.workers.dev](https://www.zero.xyz/host/x402-audit.tatschluizguilherme.workers.dev/llms.txt)
