{"uid":"cap_WnK6-nlS7wtXDjnv_ySxK","slug":"evm-event-logs-7bfe7baf","name":"evm-event-logs","description":"Read a contract's recent event logs on an EVM network over a bounded block window and decode them. Logs are decoded from an event signature you supply, or from the contract's verified ABI, or by resolving the topic to a name via 4byte. Raw logs are always returned; decoded fields are added where possible.","url":"https://api.agentstools.dev/evm/logs","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"limit":{"type":"integer","maximum":200,"minimum":1,"description":"Max decoded logs to return (default 200)"},"blocks":{"type":"integer","maximum":10000,"minimum":1,"description":"Look-back window in blocks (default 2000)"},"topic0":{"type":"string","description":"Event topic0 hash to filter by (alternative to signature), 0x + 64 hex"},"address":{"type":"string","description":"Contract address, 0x + 40 hex"},"network":{"enum":["base","ethereum","arbitrum","optimism","polygon","bnb"],"type":"string","description":"EVM network (default base)"},"signature":{"type":"string","description":"Event signature to filter and decode by, e.g. Transfer(address,address,uint256)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iTUUXJvTcq3nm-Pnv5LRv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches and decodes recent event logs from a smart contract on EVM-compatible networks over a configurable block window","exampleAgentPrompt":"Pull the last 500 Transfer events from the USDC contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum — use the signature Transfer(address,address,uint256) and look back 5000 blocks.","exampleUseCases":[{"title":"Track ERC20 token transfers on Base","prompt":"Get me the last 200 Transfer events from the token contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base using the signature Transfer(address,address,uint256), looking back 3000 blocks."},{"title":"Monitor DeFi Swap events on Arbitrum","prompt":"Fetch the most recent Swap events from the Uniswap V3 pool at 0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640 on Arbitrum — signature Swap(address,address,int256,int256,uint160,uint128,int24) — over the last 2000 blocks."},{"title":"Audit NFT minting activity on Polygon","prompt":"Show me all Transfer logs from the NFT contract 0xD7ACd2a9FD159E69Bb102A1ca21C9a3e3A5F771b on Polygon for the past 1000 blocks so I can see recent mint activity — limit to 100 results."}],"resultDescription":"Returns a list of raw event logs for the specified contract, each including block number, transaction hash, log index, and topics. Where decoding is possible (via provided event signature, verified ABI, or 4byte topic resolution), decoded field names and values are appended to each log entry.","failureModes":["Invalid or malformed contract address returns a 400 error","Unsupported network name returns a validation error","Block window exceeding 10000 blocks is rejected","No logs found in the window returns an empty list","Unrecognized topic0 returns raw logs without decoded fields","Rate limiting or payment failure returns a 402 response"],"whenToPreferThis":"Choose this endpoint when you need to read and decode recent on-chain events from a specific smart contract across major EVM networks (Base, Ethereum, Arbitrum, Optimism, Polygon, BNB). It is especially useful when you have an event signature to filter by, or want automatic decoding via verified ABI or 4byte resolution. Prefer it over full archive node queries when a bounded, recent block window is sufficient.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:51:25.566Z","isFirstParty":false}