> ## 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_newFilter

> Call eth_newFilter on Goldsky Edge RPC to create a log filter by address, topics, and block range, ready to poll with eth_getFilterChanges or eth_getFilterLogs.

## Parameters

**filter** `object` *required*

Filter options

**properties**

**fromBlock** `string`

Start block (hex), or `latest`, `earliest`, `pending`

**toBlock** `string`

End block (hex), or `latest`, `earliest`, `pending`

**address** `string | array`

Contract address or list of addresses

**topics** `array`

Array of topic filters

## Returns

**filterId** `string`

Filter ID for use with `eth_getFilterChanges`

## Example

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

```javascript JavaScript theme={"dark"}
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_newFilter",
  "params": [
    {
      "fromBlock": "latest",
      "toBlock": "latest"
    }
  ],
  "id": 1
})
});
const { result } = await response.json();
console.log(result);
```

```python Python theme={"dark"}
import requests

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


## Related topics

- [Edge RPC](https://docs.goldsky.com/edge-rpc/introduction.md)
- [eth_newBlockFilter](https://docs.goldsky.com/edge-rpc/evm/methods/eth_newBlockFilter.md)
- [eth_newPendingTransactionFilter](https://docs.goldsky.com/edge-rpc/evm/methods/eth_newPendingTransactionFilter.md)
- [eth_getFilterChanges](https://docs.goldsky.com/edge-rpc/evm/methods/eth_getFilterChanges.md)
- [eth_getFilterLogs](https://docs.goldsky.com/edge-rpc/evm/methods/eth_getFilterLogs.md)
