Skip to content

eth_getFilterLogs ​

served · same as reth

Returns all logs that match a log filter, for its whole block range.

When to use ​

Use it to read the full result of a filter once, for example after you create it.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getFilterLogs", "params": ["0x1"]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getFilterLogs",
  "params": [
    "0x1"
  ]
}

Response ​

Live mainnet, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "filter not found"
  }
}

Full response

Parameters ​

NameTypeRequiredMeaning
filterIdhex stringyesThe ID of a log filter.

Returns ​

The list of matching logs, as eth_getLogs returns it. See Log.

Notes and limits ​

  • The limits of eth_getLogs apply. The range is at most 100 000 blocks and the answer at most 20 000 logs.
  • This call does not reset the 5-minute expiry. Only eth_getFilterChanges does.

Errors ​

CodeMessageWhen
-32000filter not foundThe ID is unknown, the filter expired, or it is not a log filter.
-32602query exceeds max block range 100000toBlock minus fromBlock is more than 100 000 in the filter.
4444pruned history unavailable: requested N, earliest available MfromBlock is below the first block of the node, and the range is at most 100 000 blocks. M is that block.
-32602query exceeds max results 20000, retry with the range FROM-NMore than 20 000 logs match.

Compared with reth ​

The live example above gives the same answer on Cinder and on reth 2.7.

eth_newFilter, eth_getFilterChanges, eth_getLogs.

Schema (OpenRPC) ​

The official specification: eth_getFilterLogs in ethereum/execution-apis.

Parameter Filter identifier: string
json
{
  "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
  "title": "hex encoded unsigned integer",
  "type": "string"
}
Result: new block or transaction hashes or new logs
json
{
  "oneOf": [
    {
      "items": {
        "pattern": "^0x[0-9a-f]{64}$",
        "title": "32 byte hex value",
        "type": "string"
      },
      "title": "new block or transaction hashes",
      "type": "array"
    },
    {
      "items": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "pattern": "^0x[0-9a-fA-F]{40}$",
            "title": "address",
            "type": "string"
          },
          "blockHash": {
            "pattern": "^0x[0-9a-f]{64}$",
            "title": "block hash",
            "type": "string"
          },
          "blockNumber": {
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
            "title": "block number",
            "type": "string"
          },
          "blockTimestamp": {
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
            "title": "block timestamp",
            "type": "string"
          },
          "data": {
            "pattern": "^0x[0-9a-f]*$",
            "title": "data",
            "type": "string"
          },
          "logIndex": {
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
            "title": "log index",
            "type": "string"
          },
          "removed": {
            "title": "removed",
            "type": "boolean"
          },
          "topics": {
            "items": {
              "pattern": "^0x[0-9a-f]{64}$",
              "title": "32 hex encoded bytes",
              "type": "string"
            },
            "title": "topics",
            "type": "array"
          },
          "transactionHash": {
            "pattern": "^0x[0-9a-f]{64}$",
            "title": "transaction hash",
            "type": "string"
          },
          "transactionIndex": {
            "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
            "title": "transaction index",
            "type": "string"
          }
        },
        "required": [
          "transactionHash"
        ],
        "title": "log",
        "type": "object"
      },
      "title": "new logs",
      "type": "array"
    }
  ],
  "title": "Filter results"
}