<!-- Canonical: https://docs.linea.build/api/reference/eth-newblockfilter -->

> For the complete Linea documentation index, see [llms.txt](/llms.txt).
> Agents can fetch this page as Markdown at [https://docs.linea.build/api/reference/eth-newblockfilter.md](https://docs.linea.build/api/reference/eth-newblockfilter.md).

# eth_newBlockFilter

# `eth_newBlockFilter`

Creates a filter to receive notifications when new blocks are produced. Poll the filter with [`eth_getFilterChanges`](/api/reference/eth-getfilterchanges) to retrieve new block hashes since the last poll.

Filter polling on the public endpoint

Filter IDs are server-side state, scoped to the node that created them. On a load-balanced public endpoint like `rpc.linea.build`, a follow-up `eth_getFilterChanges` request may land on a different backend that has no record of the filter and silently return an empty result. For reliable block tracking in production, poll [`eth_blockNumber`](/api/reference/eth-blocknumber) directly or use a private RPC endpoint with sticky sessions.

## Parameters

None.

## Returns

A filter ID (hexadecimal string).

## Example

### Request

```bash
curl https://rpc.linea.build \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_newBlockFilter",
    "params": [],
    "id": 1
  }'
```

### Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x81445bcfd35c9b777a..."
}
```
