Ethereum
net_listening
net_listening answers a narrow question about an Ethereum node: is it open to incoming peer-to-peer connections on the devp2p network right now? An ETH execution client gossips blocks and transactions with other nodes over that P2P layer, and this method reports whether the listener for it is up. Send the request to https://ethereum.therpc.io/YOUR_API_KEY on mainnet (chain ID 1) and you get back a bare boolean: true if the node is accepting peer connections, false if it is not. It is one of the lightest calls in the JSON-RPC surface, taking no parameters and touching no chain state.
Use cases
- Use it as a cheap liveness probe in monitoring scripts that watch a fleet of Ethereum execution nodes.
- Verify the P2P layer is up before kicking off automated jobs that depend on the node seeing fresh mainnet blocks and pending transactions.
Parameters
This method takes no parameters. Pass an empty array [].
Response
| Type | Description |
|---|---|
| boolean | `true` if the client is listening for P2P connections, `false` otherwise. |
Example request
Try it live in the Ethereum playground.
Errors & troubleshooting
Common pitfalls
trueonly means the listener is open, not that anyone is connected. A node can be listening with zero peers and still be effectively isolated from the Ethereum network, so confirm real connectivity withnet_peerCount.- Behind a managed RPC pool, this call reflects the gateway, not whichever backend node happens to serve your request. It will usually report
trueregardless of any single node's underlying P2P state.
Supported networks
- Mainnet — Chain ID: 1
- Sepolia — Chain ID: 11155111