> 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/bitcoin/network-rpcs/getconnectioncount.md).

# getconnectioncount

Returns the number of connections to other nodes.

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

***

## **Reference:** [**Here**](https://developer.bitcoin.org/reference/rpc/getconnectioncount.html)

## Returns

| Name | Type    | Description          |
| ---- | ------- | -------------------- |
| n    | numeric | The connection count |

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

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

{% endtab %}

{% tab title="testnet" %}

```bash
curl https://testnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
 -X POST \
 -H "Content-Type: application/json" \
 -d '{
	"jsonrpc": "1.0",
	"id": "curltest",
	"method": "getconnectioncount",
	"params": []
}'
```

{% endtab %}
{% endtabs %}
