> For the complete documentation index, see [llms.txt](https://docs.validationcloud.io/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.validationcloud.io/v1/ethereum/execution-api/net_peercount.md).

# net\_peerCount

Returns number of peers currently connected to the client.

This method will use `20` [Compute Units](/v1/about/billing.md).

***

## Reference: [Here](https://ethereum.org/en/developers/docs/apis/json-rpc/#net_peercount)

## **Parameters**

`None`

## **Returns**

`QUANTITY` - integer of the number of connected peers.

```bash
// Result
{
  "id":74,
  "jsonrpc": "2.0",
  "result": "0x2" // 2
}
```

{% tabs %}
{% tab title="mainnet" %}

```bash
curl https://mainnet.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":74}'

```

{% endtab %}

{% tab title="testnet" %}

```bash
curl https://sepolia.ethereum.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c64"],"id":64}'

```

{% endtab %}
{% endtabs %}
