Skip to main content
POST
eth_getFilterLogs
curl --request POST \
  --url https://tempo-moderato.core.chainstack.com/a25a421add2280d53fdbc23417055501/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": [
    "0x1"
  ],
  "id": 1
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": [
    {}
  ]
}
Tempo API method that returns an array of all logs matching the filter with the given ID. Unlike eth_getFilterChanges, this returns all matching logs, not just new ones since the last poll.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • filterId — the filter ID returned from eth_newFilter

Response

  • result — array of log objects matching the filter:
    • address — contract address that emitted the log
    • topics — array of indexed log parameters
    • data — non-indexed log parameters
    • blockNumber — block number containing the log
    • blockHash — hash of the block
    • transactionHash — hash of the transaction that emitted the log
    • transactionIndex — index of the transaction in the block
    • logIndex — position of the log in the block
    • removedtrue if the log was removed due to a chain reorganization

eth_getFilterLogs code examples

const ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);

// pathUSD token address
const PATHUSD = "0x20c0000000000000000000000000000000000000";
const TRANSFER_TOPIC = ethers.id("Transfer(address,address,uint256)");

const getFilterLogs = async () => {
    // Create a log filter
    const filterId = await provider.send("eth_newFilter", [{
      address: PATHUSD,
      topics: [TRANSFER_TOPIC],
      fromBlock: "0x560000"
    }]);
    console.log(`Created filter: ${filterId}`);

    // Get all matching logs
    const logs = await provider.send("eth_getFilterLogs", [filterId]);
    console.log(`Found ${logs.length} Transfer events`);

    for (const log of logs.slice(0, 5)) {
      console.log(`\nBlock ${parseInt(log.blockNumber, 16)}:`);
      console.log(`  Tx: ${log.transactionHash}`);
      console.log(`  From: 0x${log.topics[1].slice(26)}`);
      console.log(`  To: 0x${log.topics[2].slice(26)}`);
    }

    // Clean up
    await provider.send("eth_uninstallFilter", [filterId]);
  };

getFilterLogs();

Body

application/json
jsonrpc
string
default:2.0
method
string
default:eth_getFilterLogs
params
any[]

Filter ID

id
integer
default:1

Response

200 - application/json

Array of log objects

jsonrpc
string
id
integer
result
object[]

Array of log objects matching the filter

Last modified on January 23, 2026