# BRAINIAC Chain Data — Get Block by Hash or Number

> BRAINIAC Chain Data — Get Block by Hash or Number is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-11).

Retrieves blockchain block data (transactions, metadata) by block hash or block number via a pay-per-call x402 API on Base

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/chain-data/block/get?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-chain-data-get-block-by-hash-or-number-220493df
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oqHYX9RCqb5nTyE9C-vi-

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 brainiac-chain-data-get-block-by-hash-or-number-220493df -d '<json body>'
```

Example prompt: Can you fetch the full block data for block number 21500000, including all transactions?

## When to prefer this

Use this endpoint when you need on-chain block data (metadata or transactions) without setting up a node or subscribing to a full RPC provider. Ideal for AI agents that need occasional, pay-as-you-go block lookups without API key registration. Best when looking up a specific block by hash or number rather than streaming or bulk historical data.

## Known failure modes

- Block not found for the given hash or number — returns null or 404-equivalent
- Invalid block hash format (not 0x + 64 hex chars) — schema validation error
- Block number exceeds safe integer range — rejected by schema
- Both blockHash and blockNumber provided simultaneously — may cause conflict or only one is used
- Network unavailable or node timeout — payment may be charged with no result
- Payment failure via x402 — request rejected before processing

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

Returns a JSON object containing block metadata such as block number, hash, parent hash, timestamp, miner address, gas limit, gas used, and optionally a full list of transactions (with details) or just transaction hashes depending on the fullTransactions flag.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "blockHash": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{64}$"
  },
  "blockNumber": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": 0
  },
  "fullTransactions": {
   "type": "boolean",
   "default": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "block": {
   "hash": "0xc2fb9270bd6c8f684e5d12b77aef4352257135ca8bc04e3f243af972c311fde1",
   "miner": "0x4200000000000000000000000000000000000011",
   "nonce": "0x0000000000000000",
   "number": 12345678,
   "uncles": [],
   "gasUsed": 2544671,
   "gasLimit": 30000000,
   "extraData": "0x",
   "logsBloom": "0x0060004021040d090002000880200000000812000041000804848002004400d004000008080055008000003008021200002000028000691001000448006620000d00040a0048092a000044a94810026180800000a04e888010000000802002400080000012040202084001c40000084040500001000806208000201020083310022b282000020001010007020044000000811009002000080c00804a1000100803040004809000001180404005601c89000200800101008019000000810000000001800b014000000002011cc00001000280004031884e12000010220002600400d02861102204000226148000000104000510000500004080100a0000000008",
   "stateRoot": "0xd572fffd1d6fab04d2b2ebe8a11b0bf44bcb96cc5bf8539b7071a0fd0d9b0617",
   "timestamp": 1711480703,
   "difficulty": 0,
   "parentHash": "0x60a51e795c6681c9d0519cd5c5ab4b5f63c9bd4bfe4f6aa178f7f4d1617bf56d",
   "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
   "receiptsRoot": "0xd9c47ff712632549d263d63bce9344e8d96f6d0e7c109c573ec47ce5785e24ce",
   "transactions": [
    "0x5804b885f6c4aa417038827fcb22b3263527cff0bb73afe10329e70fddfa8ebb",
    "0x85370d2b34145c6bd0edfecf03fa5e279d3a5f5abd886b7dcff53e8fd1a5e112",
    "0xc370723a3827f51b74ba0c3bd157204ff4e1942fea402ec02c90de729d544dae",
    "0x4fb12e68a9f1364b043563ac2c2799680ea406827f6ad5218291cbda3384c9e3",
    "0x4ca23eb55ca8723450210436d40d70c5427d0370c993a25448c0ac573e37cd3f",
    "0xcbdb65665b663e3dbd0f6bd4692eecd8ad3f214e089078f3e2fa029143f56fdd",
    "0x3490fb64fb8130c7de82f4927a68875f2a726820905be5603d02ade30fde9460",
    "0x40b0f93550c0396872af8c61b66340925b0c5ba43a853f836f3f9748c2520d3f",
    "0x48f57b74ff97d22f2449e956e0af32ca9df5ab3639592b6cf39ad89c532e7730",
    "0xfd18620aeba03c09e831d516a21ac67c8e37abc6fbc85e30863bd5740c3a386c",
    "0xf9912b6c73ee71178a66588ffbc5528f9cfbcf294a629e73e0e293e789660b14",
    "0x5e466d5742ef9e7bc8488460b8d5f99f356d89a968f6d1939c8fd04269ffaa64",
    "0x0924b2456320606b1abd63bc960dbfd27decea85ebacf06cb19dd248a89b6d54",
    "0xc37735e55b6f2f241ae54ea82ca70d9caf5b934fcc48ad12030bb0d9204b998f",
    "0x6bb7cfaf0f5410bc9cc2d8848c352b215802b0f35a19cdba65a0e69c3af3b76d",
    "0x6d487fa43074a6d5e2da45cc3d5b63f9345111c9c277b974958a4d6dc2c0abcf",
    "0xc22d75631c4488e57fc767d68db6
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-chain-data-get-block-by-hash-or-number-220493df/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
