Block Get
by Get Block by Number or Hash in Onchain & crypto
Retrieve a specific block by number or hash from Base Mainnet. Docs: https://www.brainiac.software/api/chain-data/block-get
https://www.brainiac.software/api/v1/chain-data/block/get- Price
- $0.002
- per call in USDC
- Uptime
- 86.7%
- last 30 days
- Response time
- 210 ms
- 3.5 s slowest 5%
- Last check
- Passed
- 8 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://www.brainiac.software/api/v1/chain-data/block/get
Each call costs $0.002 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://www.brainiac.software/api/v1/chain-data/block/get
content-type: application/json
{
"blockNumber": 12345678,
"fullTransactions": false
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
blockHash | string | No | block Hash supplied by the caller for this operation. |
blockNumber | integer | No | block Number supplied by the caller for this operation. |
fullTransactions | boolean | No | full Transactions supplied by the caller for this operation. |
Example response
The provider's example. We can't check it without paying.
Example response, 32 lines
{
"block": {
"baseFeePerGas": 1346901517,
"difficulty": 0,
"extraData": "0x",
"gasLimit": 30000000,
"gasUsed": 2544671,
"hash": "0xc2fb9270bd6c8f684e5d12b77aef4352257135ca8bc04e3f243af972c311fde1",
"logsBloom": "0x0060004021040d090002000880200000000812000041000804848002004400d004000008080055008000003008021200002000028000691001000448006620000d00040a0048092a000044a9481002",
"miner": "0x4200000000000000000000000000000000000011",
"nonce": "0x0000000000000000",
"number": 12345678,
"parentHash": "0x60a51e795c6681c9d0519cd5c5ab4b5f63c9bd4bfe4f6aa178f7f4d1617bf56d",
"receiptsRoot": "0xd9c47ff712632549d263d63bce9344e8d96f6d0e7c109c573ec47ce5785e24ce",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"stateRoot": "0xd572fffd1d6fab04d2b2ebe8a11b0bf44bcb96cc5bf8539b7071a0fd0d9b0617",
"timestamp": 1711480703,
"totalDifficulty": null,
"transactions": [
"0x5804b885f6c4aa417038827fcb22b3263527cff0bb73afe10329e70fddfa8ebb",
"0x85370d2b34145c6bd0edfecf03fa5e279d3a5f5abd886b7dcff53e8fd1a5e112"
],
"transactionsRoot": "0xb3fa331181599a1566b27e2e4206a8dc910f50513c59de9ac172402d0254e6ab",
"uncles": []
},
"chainId": 8453,
"retrievedAt": "2026-11-07T12:08:58.706Z",
"source": {
"status": "OK",
"url": "https://mainnet.base.org"
}
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.002.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://www.brainiac.software/api/v1/chain-data/block/get' \
-H 'content-type: application/json' \
--data-raw '{"blockNumber":12345678,"fullTransactions":false}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://www.brainiac.software/api/v1/chain-data/block/get' \
-H 'content-type: application/json' \
--data-raw '{"blockNumber":12345678,"fullTransactions":false}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.002 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.002" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.002 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fwww.brainiac.software%2Fapi%2Fv1%2Fchain-data%2Fblock%2Fget&method=POST
const res = await pay("https://www.brainiac.software/api/v1/chain-data/block/get", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"blockNumber": 12345678,
"fullTransactions": false
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.002 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.002"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://www.brainiac.software/api/v1/chain-data/block/get",
json={
"blockNumber": 12345678,
"fullTransactions": False,
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 8 h ago | Passed | 402 | 202 ms | $0.002 |
| 18 h ago | Passed | 402 | 188 ms | $0.002 |
| 28 h ago | Passed | 402 | 178 ms | $0.002 |
| 39 h ago | Passed | 402 | 220 ms | $0.002 |
| 2 days ago | Passed | 402 | 232 ms | $0.002 |
Show 10 older checks
| 2 days ago | Passed | 402 | 217 ms | $0.002 |
| 3 days ago | Timed out | - | - | - |
| 5 days ago | Timed out | - | - | - |
| 6 days ago | Passed | 402 | 3.5 s | $0.002 |
| 7 days ago | Passed | 402 | 210 ms | $0.002 |
| 7 days ago | Passed | 402 | 182 ms | $0.002 |
| 8 days ago | Passed | 402 | 222 ms | $0.002 |
| 8 days ago | Passed | 402 | 255 ms | $0.002 |
| 8 days ago | Passed | 402 | 180 ms | $0.002 |
| 9 days ago | Passed | 402 | 199 ms | $0.002 |