{"uid":"cap_oqHYX9RCqb5nTyE9C-vi-","slug":"brainiac-chain-data-get-block-by-hash-or-number-220493df","name":"BRAINIAC Chain Data — Get Block by Hash or Number","description":"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.","url":"https://www.brainiac.software/api/v1/chain-data/block/get?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":{"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","0xc22d75631c4488e57fc767d68db603002edc4e9ce08e2e2d8a2e64eb25a137f1","0x52606b019d2042ecbe3ec220008061bce4fc3a2dd6220f2bbeafdc98ce2619e8","0x37487810d77538016346c549ea58af6136636f8425e63153fd7c40f3e6d2aefe","0xb8e36c90e7047c4f33598ff9d940df9acad726286d2929dcb9243073b4adb9b7","0x398f1f3815c6dc440ecfff050d7fb7f4b2eeab74f0afb52edfebbdf317848c62","0x242f7e7119ccc0fee48c68a9d85d9b38904d6929c40cbfdf42157c57aaa7c359","0xae65ef2b0cd27ac298acb843262a08006718b9ce86c13d3a3444923f191ef4d6","0x61a8f44233a4ea15ec051d795e84868e2ebcab95e54a414a71ca8a2b80510c1c","0x9f46e6c91cffdab359685bcf873cfda77c11eb6b821592c70efd2cc870876e68","0x66954f5152e107da3dad103ad2213df75e4854a5842e843a2eee9736f53ea223"],"baseFeePerGas":1346901517,"totalDifficulty":null,"transactionsRoot":"0xb3fa331181599a1566b27e2e4206a8dc910f50513c59de9ac172402d0254e6ab"},"source":{"url":"https://mainnet.base.org","status":"OK"},"chainId":8453,"retrievedAt":"2026-11-07T12:08:58.706Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pNT8vlUuEJvuEhlqhkx01","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieves blockchain block data (transactions, metadata) by block hash or block number via a pay-per-call x402 API on Base","exampleAgentPrompt":"Can you fetch the full block data for block number 21500000, including all transactions?","exampleUseCases":[{"title":"Audit transactions in a specific block","prompt":"Look up block number 20000000 and give me all the transactions that were included in it — I want to audit what happened in that block."},{"title":"Verify a block by hash","prompt":"Can you retrieve the block with hash 0x3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b and confirm its block number and timestamp?"},{"title":"Inspect recent block for on-chain monitoring","prompt":"Fetch block 21999999 without full transaction details — I just need the block header info like timestamp, miner, and gas used."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-11T12:50:17.771Z","isFirstParty":false,"canonicalSlug":"brainiac-chain-data-get-block-by-hash-or-number-220493df"}