{"uid":"cap_Ca9FTPOxOrretuDe-zJEy","slug":"brainiac-gas-fee-history-api-4ca7e3ca","name":"BRAINIAC Gas Fee History API","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/gas/fee-history?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":{"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","250001","1000000"],["1000000","2000000","4102090"],["1000000","2000000","10000000"],["1193008","1193008","1193008"],["1000000","1000000","1200000"],["1000000","1305000","2000000"],["0","2800000","2800000"],["380919","1000000","8100000"],["1000000","5000000","5000000"],["1000000","1000000","1000000"],["1000000","1000000","1000000"],["1900000","2000000","5000000"],["0","1000000","1000000"],["1000000","2383856","12498886"],["1000000","1000000","1000000"],["1","1","10000"],["1100000","1100000","1100000"],["500001","1000000","1000000"],["1000000","1000000","1000000"],["1000000","1000000","1000000"],["1000000","4000000","4059812"],["0","0","1150000"],["2000000","2000000","5000000"],["0","1100000","3000000"],["1150000","3700000","3823222"],["1000000","1000000","3733158"],["1500000","1500000","2000000"],["250001","1000000","5000000"],["0","0","2365413"],["1100000","1150000","5665073"],["1150000","1150000","1150000"],["0","0","1000000"],["1000000","1000000","1207500"],["1000000","4000000","4000000"],["1800000","2760194","8000000"],["1","1000000","1207500"],["1000000","1000000","1000000"],["2200000","4001535","4001535"],["1000000","1000000","10000000"],["1000000","1500000","2200000"],["100000","100000","1000000"],["1236250","5000000","5000000"],["1000000","1000000","1000001"],["1000000","5000000","11000000"],["1000000","2000000","2200000"],["1000000","1000000","1000000"],["0","1000000","1000000"],["1000000","2567845","3551192"],["1000000","1800000","2200000"],["1000000","1100000","1100000"],["1000000","1150000","1150000"],["1000000","1000000","1000000"],["1000000","1000000","3527357"],["439000","1000000","1595000"],["1000000","1000000","1150000"],["1000000","2200000","30000000"],["1675891","5000000","5000000"],["0","1000000","1150000"],["1000000","1000000","5301544"],["1","1000000","2200000"],["1000000","5000000","5000000"]],"oldestBlock":54314721,"gasUsedRatio":[0.015271875,0.044001825,0.013262125,0.02478985,0.0263439,0.01259965,0.014501275,0.059913575,0.124275575,0.011416225,0.017106875,0.031378125,0.155987425,0.02036205,0.0522748,0.031494925,0.0196152,0.030303475,0.010909975,0.0407797,0.0567603,0.046664475,0.04218695,0.030663025,0.049228925,0.05182055,0.020517075,0.090376025,0.0945791,0.20131815,0.01932185,0.053182175,0.09965835,0.0123269,0.04147465,0.08808745,0.12434035,0.129987075,0.043709675,0.04061035,0.050005375,0.0817488,0.087341575,0.0454279,0.078594325,0.06240215,0.0453563,0.0515026,0.114736075,0.0110059,0.054110075,0.044803775,0.06963425,0.0130585,0.09592035,0.080136425,0.013313375,0.03487405,0.007986925,0.05006745,0.08673325,0.089315075,0.114891975,0.0271796,0.07494415,0.046331325,0.0407375,0.0443506,0.0496116,0.042012925,0.0464865,0.043495875,0.02922405,0.036698275,0.019618375,0.0324145,0.1320578,0.100578725,0.0298846,0.02240055,0.087072375,0.024955425,0.091949175,0.042145525,0.1696826,0.044015175,0.046848225,0.0328353,0.021035225,0.020712625,0.078451025,0.020528025,0.030210075,0.016404925,0.074183875,0.07231905,0.075153425,0.050746725,0.0157536,0.01868195],"baseFeePerGas":["5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000032","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000","5000000"]},"retrievedAt":"2026-11-07T12:08:59.571Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Sc_Q-O27y1zIDNSVF6ZzG","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Retrieves historical EVM gas fee data including base fees and miner tip percentiles for a specified block range","exampleAgentPrompt":"Can you pull the gas fee history for the last 100 blocks up to block 20000000, with reward percentiles at 25, 50, and 75?","exampleUseCases":[{"title":"Optimal gas price estimation","prompt":"What have gas fees looked like over the last 200 blocks? Give me the 25th, 50th, and 75th percentile miner rewards so I can estimate a good gas price for my transaction."},{"title":"DeFi analytics base fee trend","prompt":"Retrieve the base fee history for the last 500 blocks ending at block 19500000 — I want to see how fees have trended recently for a DeFi dashboard I'm building."},{"title":"Gas spike detection alert","prompt":"Fetch gas fee history for the last 50 blocks with the 10th and 90th percentile rewards so I can check if there's been an unusual gas price spike in the last few minutes."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T00:34:06.445Z","isFirstParty":false,"canonicalSlug":"brainiac-gas-fee-history-api-4ca7e3ca"}