{"uid":"cap_W50vO0AgSOtxNiyelnivR","slug":"brainiac-smart-contract-read-api-89fd638b","name":"BRAINIAC Smart Contract Read 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/contract/read?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"data":{"type":"string","pattern":"^0x[0-9a-fA-F]*$"},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"blockNumber":{"type":"integer","maximum":9007199254740991,"minimum":0}}},"responseSchema":{"type":"json","example":{"data":"0x12345678","result":"0x","source":{"url":"https://mainnet.base.org","status":"OK"},"address":"0x1234567890123456789012345678901234567890","chainId":8453,"retrievedAt":"2026-11-07T12:08:59.324Z"}},"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_rXBJIEb6DlFL1eKC0C3QF","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":"Reads data from an EVM smart contract on Base by calling a contract function with optional calldata and block number.","exampleAgentPrompt":"Can you read the smart contract at 0x1234567890abcdef1234567890abcdef12345678 on Base using calldata 0xabcdef and tell me what it returns at block 12345678?","exampleUseCases":[{"title":"Token balance lookup on Base","prompt":"What's the USDC balance of wallet 0xabcdefabcdefabcdefabcdefabcdefabcdefabcd according to the USDC contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Base? Use the balanceOf calldata 0x70a08231000000000000000000000000abcdefabcdefabcdefabcdefabcdefabcdefabcd."},{"title":"Historical contract state query","prompt":"Read the state of the lending pool contract at 0x794a61358D6845594F94dc1DB02A252b5b4814aD on Base as it was at block 10000000 — use calldata 0x35ea6a75 to get the reserve data."},{"title":"NFT owner verification","prompt":"Check who owns token ID 42 on the NFT contract at 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D on Base — use calldata 0x6352211e000000000000000000000000000000000000000000000000000000000000002a to call ownerOf."}],"resultDescription":"Returns a JSON response containing the raw result data from the smart contract read call, typically the ABI-encoded return value of the contract function that was called. The agent can decode this output according to the expected return type (address, uint256, bytes, etc.).","failureModes":["Invalid contract address (not a valid 0x hex address) returns an error","Malformed calldata (not valid hex) is rejected by input validation","Block number exceeds current chain head or is invalid returns an error","Contract does not exist at the given address returns empty or revert data","Network congestion or RPC errors may cause timeout","Payment not received or insufficient USDC causes 402 response"],"whenToPreferThis":"Use this endpoint when you need to query on-chain state from a smart contract on Base without setting up your own RPC node or Web3 provider. It is ideal for AI agents that need pay-per-call access to blockchain data with no account setup, using x402 micropayments. Prefer this over self-hosted solutions when you want zero-infrastructure contract reads at $0.02 per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T00:37:18.964Z","isFirstParty":false,"canonicalSlug":"brainiac-smart-contract-read-api-89fd638b"}