eth_getLogsHTTP

Returns event logs matching a filter. Keep block ranges small (often 1–a few thousand blocks) to avoid timeouts and huge payloads.

Chain EthereumTransport HTTPTry-it live

How to use

  1. Pick an API key (or paste one) in the Try it panel.
  2. Object params use a tall JSON editor — click Fill example if available.
  3. Send request — live against the gateway; counts toward daily quota.

Parameters

JSON-RPC positional arguments — order matches the array sent in params. Index badges below match array positions.

filterObjectrequired

Log filter object (JSON).

  • fromBlockinclusive start of the block range
  • toBlockinclusive end; use small windows and a supported finality boundary
  • blockHashexact block hash; cannot be combined with fromBlock or toBlock
  • addressone emitting contract address or an array of addresses on the selected network
  • topicsordered positions combined with AND; an array within a position is OR; null = wildcard

Topic 0 is an event signature only for non-anonymous ABI events. Missing bounds and supported tags depend on the upstream; use explicit bounds for reproducibility.

params array (shape)

eth_getLogs · paramsjson
1[
2 {
3 "fromBlock": "$LATEST_BLOCK_NUMBER",
4 "toBlock": "$LATEST_BLOCK_NUMBER",
5 "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
6 }
7]

Response fields

The result row describes the complete result; other rows describe its object fields or array elements. Indented rows describe nested members. For subscriptions,params.* rows describe later notifications rather than the initial reply.

FieldTypeDescription
addressDATA(20B)Contract that emitted the log.
topicsDATA(32B)[]Up to four 32-byte topics. Non-anonymous Solidity events include the signature hash at topics[0]; anonymous events omit it.
dataDATAUnindexed log bytes. Decode ABI-encoded non-indexed event arguments using the emitter's event ABI.
blockNumberQUANTITYBlock containing the log.
blockHashDATA(32B)Hash of that block.
transactionHashDATA(32B)Transaction that produced the log.
transactionIndexQUANTITYIndex of that transaction in the block.
logIndexQUANTITYIndex of the log within the block.
removedBOOLEANIndicates a log removed from the canonical chain during reorganization, particularly in subscription/filter notifications.
blockTimestampQUANTITYBlock timestamp in Unix seconds where exposed; availability varies by network and client. Fetch the block by hash if absent.