Ethereum
eth_getFilterLogs
eth_getFilterLogs returns the full set of logs that match a log filter you previously registered with eth_newFilter, ignoring any polling you've already done against it. Where eth_getFilterChanges hands you only the delta since the last call, this method gives you the whole matching set every time — a snapshot, not a stream. It works only on log filters; block and pending-tx filter IDs are rejected. Run it against Ethereum mainnet (chain ID 1, the EVM chain settled in ETH) through https://ethereum.therpc.io/YOUR_API_KEY, and you get back every log across the filter's block range that matches its address and topic criteria, regardless of where your poll cursor sat.
Use cases
- On startup, pull the complete matching log set once — say every
Transferfor a USDC or Lido token contract over the filter's range — then switch toeth_getFilterChangesfor incremental updates. - After a service restart, replay everything the filter covers by calling this before the next
eth_getFilterChanges, so you recover events that fired while your indexer was down rather than resuming mid-stream and missing them.
Parameters
| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | filterId | string | Yes | The log filter ID. Only log filters (eth_newFilter) are valid — block and pending-tx filters are not supported. |
Response
| Type | Description |
|---|---|
| array | Array of all log objects matching the filter's criteria. |
Example request
Try it live in the Ethereum playground.
Errors & troubleshooting
| Code | Message | Cause |
|---|---|---|
-32000 | filter not found | Filter ID is invalid, expired, or the filter was already uninstalled. |
-32005 | query returned more than 10000 results | The filter matches too many logs; narrow the block range or add topic filters. |
Common pitfalls
- This returns every matching log, not just the new ones, so a filter spanning a wide range over a busy contract can blow past the 10,000-result cap and trip a
-32005error. Keep the filter's block window tight or lean on topic filters. - Only log filters work here. Hand it a block-filter or pending-tx-filter ID from
eth_newBlockFilter/eth_newPendingTransactionFilterand you getfilter not found— those have no concept of a log set. - Filters lapse after roughly five minutes of inactivity, so call this soon after
eth_newFilter. If the filter expired, recreate it; for one-off historical pullseth_getLogsskips the filter lifecycle entirely.
Supported networks
- Mainnet — Chain ID: 1
- Sepolia — Chain ID: 11155111
See also
Parameters
Hex filter ID from eth_newFilter