> 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/avalanche/p-chain/platform.getheight.md).

# platform.getHeight

Returns the height of the last accepted block.

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

***

## Reference: [Here](https://docs.avax.network/reference/avalanchego/p-chain/api#platformgetheight)

## **Parameters**

`None`

## Returns

`height` - int

```json
// Result
{
  "jsonrpc": "2.0",
  "result": {
    "height": "56"
  },
  "id": 1
}
```

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

```bash
curl https://mainnet.avalanche.validationcloud.io/v1/<YOUR_API_KEY_HERE>/ext/bc/P \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
    "jsonrpc": "2.0",
    "method": "platform.getHeight",
    "params": {},
    "id": 1
}'

```

{% endtab %}

{% tab title="testnet" %}

<pre class="language-bash"><code class="lang-bash">curl https://fuji.avalanche.validationcloud.io/v1/&#x3C;YOUR_API_KEY_HERE>/ext/bc/P \
<strong>    -X POST \
</strong>    -H "Content-Type: application/json" \
    -d '{
    "jsonrpc": "2.0",
    "method": "platform.getHeight",
    "params": {},
    "id": 1
}'
</code></pre>

{% endtab %}
{% endtabs %}
