> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goldsky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getLogs

> Call eth_getLogs on Goldsky Edge RPC to query EVM event logs by address, topic, and block range, with curl, JavaScript, and Python request examples.

## Parameters

<ParamField body="filter" type="object" required>
  Filter options

  <Expandable title="properties">
    <ParamField body="fromBlock" type="string">
      Start block (hex), or `latest`, `earliest`, `pending`
    </ParamField>

    <ParamField body="toBlock" type="string">
      End block (hex), or `latest`, `earliest`, `pending`
    </ParamField>

    <ParamField body="address" type="string | array">
      Contract address or list of addresses
    </ParamField>

    <ParamField body="topics" type="array">
      Array of topic filters (32 bytes each). Use `null` for wildcard.
    </ParamField>

    <ParamField body="blockHash" type="string">
      Filter by specific block hash. Cannot use with fromBlock/toBlock.
    </ParamField>
  </Expandable>
</ParamField>

## Returns

<ParamField body="logs" type="array">
  Array of log objects

  <Expandable title="properties">
    <ParamField body="address" type="string">
      Address of log origin
    </ParamField>

    <ParamField body="topics" type="array">
      Array of indexed log arguments
    </ParamField>

    <ParamField body="data" type="string">
      Non-indexed arguments (hex)
    </ParamField>

    <ParamField body="blockNumber" type="string">
      Block number (hex)
    </ParamField>

    <ParamField body="transactionHash" type="string">
      Transaction hash
    </ParamField>

    <ParamField body="transactionIndex" type="string">
      Transaction index (hex)
    </ParamField>

    <ParamField body="blockHash" type="string">
      Block hash
    </ParamField>

    <ParamField body="logIndex" type="string">
      Log index in block (hex)
    </ParamField>

    <ParamField body="removed" type="boolean">
      `true` if removed due to reorg
    </ParamField>
  </Expandable>
</ParamField>

## Limits

`eth_getLogs` requests on the edge endpoint are capped per request. The block-range cap varies by chain; address and topic caps apply uniformly across all chains.

**Address and topic caps (all chains):**

* **Addresses:** up to 1,000 addresses in `address`
* **Topics:** up to 16 values in `topics[0]`

**Block-range cap by chain tier:**

| Tier         | Chains                         | Max block range (inclusive)                    |
| ------------ | ------------------------------ | ---------------------------------------------- |
| Default      | All other supported EVM chains | 20,000 blocks (`toBlock − fromBlock ≤ 19,999`) |
| Heavy chains | Base, Celo, Cronos             | 1,000 blocks (`toBlock − fromBlock ≤ 999`)     |
| Monad        | Monad                          | 10,000 blocks (`toBlock − fromBlock ≤ 9,999`)  |

Heavy chains have lower caps because their wide-range scans can return very large responses (e.g. a \~12.5k-block Transfer scan on Base can produce \~740 MB).

Requests exceeding these limits are rejected with an `ErrGetLogsExceededMaxAllowedRange` error (HTTP 413). To query a larger range, split the request into multiple calls under the per-chain cap.

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://edge.goldsky.com/standard/evm/1?key=demo" \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"fromBlock": "latest", "toBlock": "latest", "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"}], "id": 1}'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://edge.goldsky.com/standard/evm/1?key=demo', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [
      {
        "fromBlock": "latest",
        "toBlock": "latest",
        "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
      }
    ],
    "id": 1
  })
  });
  const { result } = await response.json();
  console.log(result);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://edge.goldsky.com/standard/evm/1?key=demo',
      json={
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [
      {
        "fromBlock": "latest",
        "toBlock": "latest",
        "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
      }
    ],
    "id": 1
  }
  )
  print(response.json()['result'])
  ```
</CodeGroup>


## Related topics

- [Benefits](/benefits.md)
- [Why Edge RPC](/edge-rpc/why-edge.md)
- [Payments & fintech on Goldsky](/solutions/payments-fintech.md)
- [Error Codes](/edge-rpc/evm/error-codes.md)
- [Real-time payment reconciliation](/solutions/real-time-reconciliation.md)
