# BRAINIAC Gas Fee History API

> BRAINIAC Gas Fee History API is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-17).

Retrieves historical EVM gas fee data including base fees and miner tip percentiles for a specified block range

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/chain-data/gas/fee-history?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-gas-fee-history-api-4ca7e3ca
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ca9FTPOxOrretuDe-zJEy

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-gas-fee-history-api-4ca7e3ca -d '<json body>'
```

Example prompt: Can you pull the gas fee history for the last 100 blocks up to block 20000000, with reward percentiles at 25, 50, and 75?

## When to prefer this

Choose this endpoint when you need EVM gas fee history without setting up an account or committing to a subscription — pay only $0.03 USDC per call via x402 on Base. Ideal for agents that need occasional on-chain fee lookups, gas price estimation logic, or block-range analytics without the overhead of an RPC node or API key management.

## Known failure modes

- Invalid blockCount (outside 1–1024 range) returns a validation error
- newestBlock exceeds safe integer limit or references a future block
- rewardPercentiles array contains more than 5 items or values outside 0–100
- Payment not completed or insufficient USDC balance causes 402 response
- Network or chain data unavailability causes a service error

## 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 historical EVM gas fee data: an array of base fees per gas, gas used ratios per block, and miner reward values at the requested percentiles, covering the specified block range up to the newestBlock.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "blockCount": {
   "type": "integer",
   "default": 100,
   "maximum": 1024,
   "minimum": 1
  },
  "newestBlock": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": 0
  },
  "rewardPercentiles": {
   "type": "array",
   "items": {
    "type": "number",
    "maximum": 100,
    "minimum": 0
   },
   "default": [
    25,
    50,
    75
   ],
   "maxItems": 5,
   "minItems": 1
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": {
   "url": "https://mainnet.base.org",
   "status": "OK"
  },
  "chainId": 8453,
  "history": {
   "reward": [
    [
     "576629",
     "576629",
     "1000000"
    ],
    [
     "1000000",
     "1236250",
     "8000000"
    ],
    [
     "1000000",
     "1000000",
     "1000000"
    ],
    [
     "1000000",
     "1291544",
     "1291544"
    ],
    [
     "361016",
     "1000000",
     "1000000"
    ],
    [
     "1000000",
     "1000000",
     "3000000"
    ],
    [
     "100000",
     "1000000",
     "2200000"
    ],
    [
     "1159218",
     "1440000",
     "2200000"
    ],
    [
     "1000000",
     "2000000",
     "2000000"
    ],
    [
     "1000000",
     "2200000",
     "2200000"
    ],
    [
     "1000000",
     "1000000",
     "1000000"
    ],
    [
     "2200000",
     "3705887",
     "3705887"
    ],
    [
     "8001940",
     "8001940",
     "8001940"
    ],
    [
     "1000000",
     "2000000",
     "5526967"
    ],
    [
     "1100000",
     "1100000",
     "10000000"
    ],
    [
     "1000000",
     "1000000",
     "1071497"
    ],
    [
     "0",
     "1000000",
     "1567100"
    ],
    [
     "1000000",
     "2200000",
     "4102090"
    ],
    [
     "1290000",
     "1390491",
     "1390491"
    ],
    [
     "1000000",
     "5000000",
     "5000000"
    ],
    [
     "1000000",
     "1432031",
     "10002425"
    ],
    [
     "1000000",
     "1330000",
     "4102090"
    ],
    [
     "1000000",
     "2000000",
     "2445642"
    ],
    [
     "1300000",
     "1432031",
     "4000000"
    ],
    [
     "2200000",
     "5000000",
     "5000000"
    ],
    [
     "0",
     "1000000",
     "1000000"
    ],
    [
     "1000000",
     "1000000",
     "1000000"
    ],
    [
     "1000000",
     "8069479",
     "250000000"
    ],
    [
     "250000",
     "1000000",
     "2200000"
    ],
    [
     "1000000",
     "4300000",
     "7275994"
    ],
    [
     "983921",
     "983921",
     "3399968"
    ],
    [
     "743786",
     "1718437",
     "19098412"
    ],
    [
     "1000000",
     "5648683",
     "16914977"
    ],
    [
     "1000000",
     "1000000",
     "1000000"
    ],
    [
     "1",
     "1000000",
     "2200000"
    ],
    [
     "250001",
     "1000000",
     "2500000"
    ],
    [
     "1520945",
     "10000003",
     "10086848"
    ],
    [
     "697352",
     "1000000",
     "5000000"
    ],
    [
     "474293",
     "1000000",
     "2383856"
    ],
    [
     "250001",
   
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-gas-fee-history-api-4ca7e3ca/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)
