{"uid":"cap_9CZdYS-19j8CnXKhEuu0K","slug":"xerxes-ethereum-eth-getlogs-contract-event-log-fetcher-930e5d21","name":"Xerxes Ethereum eth_getLogs — Contract Event Log Fetcher","description":"Returns logs emitted by a contract address, optionally filtered by topic0 (event signature hash) and limited to the last N blocks (1-100, default 10). Query parameters: address (contract, 0x + 40 hex), topic0 (optional event signature hash, 0x + 64 hex), blocks (optional, last N blocks, 1-100, default 10). Query: address (contract, 0x + 40 hex), topic0 (optional event signature hash, 0x + 64 hex), blocks (optional, last N blocks, 1-100 (default 10)).","url":"https://ari001.tailb4ac3a.ts.net/v1/ventures/ethereum_rpc_api/eth_getlogs?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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"blocks":{"type":"string","pattern":"^[0-9]{1,3}$","description":"optional, last N blocks, 1-100 (default 10)"},"topic0":{"type":"string","pattern":"^0x[a-fA-F0-9]{64}$","description":"optional event signature hash, 0x + 64 hex"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"contract, 0x + 40 hex"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean"},"chain":{"type":"string"},"error":{"type":"string","description":"present when ok is false"},"method":{"type":"string"},"result":{"type":"object","properties":{"logs":{"type":"array","maxItems":200},"count":{"type":"integer"},"to_block":{"type":"integer"},"truncated":{"type":"boolean"},"from_block":{"type":"integer"}}},"service":{"type":"string"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_G6jaWMMZca75_giliqkFj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches recent event logs emitted by an Ethereum contract address, optionally filtered by event signature hash and block range (last 1–100 blocks).","exampleAgentPrompt":"Pull the last 50 blocks of event logs from Ethereum contract 0xdAC17F958D2ee523a2206206994597C13D831ec7 — filter by Transfer events using topic0 0xddf252ad1be2c89b69c2b068fc378daa952ba7f89c06af87647bcf8d3949be45.","exampleUseCases":[{"title":"Monitor ERC-20 Transfer activity","prompt":"Fetch the Transfer event logs for the USDT contract at 0xdAC17F958D2ee523a2206206994597C13D831ec7 on Ethereum over the last 20 blocks — use the Transfer event signature hash 0xddf252ad1be2c89b69c2b068fc378daa952ba7f89c06af87647bcf8d3949be45."},{"title":"Audit DeFi protocol events","prompt":"Get all the logs emitted by the Uniswap V2 pair contract 0xB4e16d0168e52d35CaCD2c6185b44281Ec28C9Dc on Ethereum in the last 100 blocks so I can see recent Swap and Sync activity."},{"title":"Debug smart contract for unexpected events","prompt":"Check what events the contract at 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D on Ethereum has emitted in the last 10 blocks — I want to see if there are any unexpected calls going through."}],"resultDescription":"Returns a JSON object with ok (boolean), an array of up to 200 raw Ethereum event log entries (logs), the total count, the block range queried (from_block, to_block), and a truncated flag indicating if results were capped at 200.","failureModes":["Invalid contract address format returns an error (address must be 0x + 40 hex characters)","Invalid topic0 format returns an error (must be 0x + 64 hex characters)","Blocks parameter out of range (must be 1–100) may be rejected or defaulted","Contract has emitted no events in the queried block range — returns empty logs array","RPC node unavailable or timeout — ok: false with error message","Logs exceed 200 entries — result is truncated, truncated flag set to true"],"whenToPreferThis":"Use this endpoint when you need to retrieve recent on-chain event logs from a specific Ethereum smart contract, especially when you want to filter by event type (topic0) and limit the query to a recent block window. It is ideal for monitoring contract activity, auditing DeFi protocol events, or reacting to on-chain state changes in near real-time. Prefer it over full archive node queries when recency (last 1–100 blocks) is sufficient.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T01:23:24.779Z","isFirstParty":false,"canonicalSlug":"xerxes-ethereum-eth-getlogs-contract-event-log-fetcher-930e5d21"}