{"uid":"cap_9xZ2QBdSmCbMd48HP-OhV","slug":"agent-exchange-evm-chain-logs-query-90264631","name":"Agent Exchange — EVM Chain Logs Query","description":"Live data APIs for AI agents and analysts. Buy an all-access API key for $29/month with a credit card, or pay per call in USDC. No sales call.","url":"https://store.agentexchange.work/chain/logs?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"chain":{"type":"string","description":"base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"},"topic0":{"type":"string","description":"Event signature topic (32-byte 0x...)"},"topic1":{"type":"string"},"topic2":{"type":"string"},"topic3":{"type":"string"},"address":{"type":"string","description":"Contract address to filter on (0x...)"},"toBlock":{"type":"string","description":"End block or latest (default latest)"},"fromBlock":{"type":"string","description":"Start block (decimal or 0x hex); defaults to 500 blocks back"}},"description":"address or topic0 is required — an unfiltered scan is not servable."}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"logs":{"type":"array"},"count":{"type":"number"},"total_matched":{"type":"number"},"truncated_logs":{"type":"boolean"}}}}}}},"responseSchema":{"type":"json","example":{"logs":[{"data":"0x...","topics":["0x..."],"address":"0x...","tx_hash":"0x...","log_index":12,"block_number":49464700}],"chain":"base","count":200,"to_block":49464704,"from_block":49464205,"total_matched":517,"truncated_logs":true,"truncated_range":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.09","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.09/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.09","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4jwlo9pJLY-v1S0QC7jOc","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.09","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches filtered EVM event logs from a specified blockchain by contract address and/or event topic, returning matching log entries with metadata","exampleAgentPrompt":"Fetch me the recent ERC-20 Transfer event logs (topic0 0xddf252ad1be2c89b69c2b068fc378daa952ba7f2) for the USDC contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base for the last 500 blocks.","exampleUseCases":[{"title":"DeFi protocol event monitoring","prompt":"Get me all the Swap event logs (topic0 0xd78ad95fa46c994b6551d0da85fc275fe613ce37) for the Uniswap v2 pair at 0x4C36388bE6F416A29C8d8Eee81C771cE6bE14B5 on Ethereum, going back from the latest block."},{"title":"Token transfer history lookup","prompt":"Find all Transfer events on Polygon for the contract address 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 — I need topic0 set to 0xddf252ad1be2c89b69c2b068fc378daa952ba7f2 and want to see the last 500 blocks."},{"title":"Smart contract security audit log review","prompt":"Pull the raw event logs for the Gnosis Safe contract at 0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552 on Gnosis chain — filter by address and give me everything from block 30000000 to the latest block."}],"resultDescription":"A JSON object containing an array of log entries (each with address, topics array, data, tx_hash, log_index, block_number), the chain name, from_block, to_block, count of returned logs, total_matched count, and boolean flags indicating whether the result set was truncated due to log count or block range limits.","failureModes":["Missing required filter (no address or topic0 provided) — API returns an error since unfiltered scans are not servable","Invalid contract address format — malformed 0x address rejected","Unsupported chain name — only base, ethereum, optimism, arbitrum, polygon, gnosis are valid","Block range too large or fromBlock in the future — may return empty results or an error","Payment failure (insufficient USDC or invalid card) — 402 response, no data returned","Result truncation — if total_matched > count, truncated_logs is true and only partial results are returned"],"whenToPreferThis":"Choose this endpoint when you need raw EVM event logs filtered by contract address and/or event topic signature across major EVM chains. It is ideal for agents performing on-chain monitoring, DeFi analytics, contract event history retrieval, or smart contract auditing. Prefer it over a full node RPC setup when you want a simple pay-per-call API without infrastructure overhead. It covers Base, Ethereum, Optimism, Arbitrum, Polygon, and Gnosis chains.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T18:43:19.790Z","isFirstParty":false,"canonicalSlug":"agent-exchange-evm-chain-logs-query-90264631"}