> 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/blockbook-indexer-rest-api/get-block-hash.md).

# Get block hash

Retrieves a Bitcoin block hash for a given block height.

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

***

## **Reference:** [**Here**](https://github.com/trezor/blockbook/blob/master/docs/api.md#get-block-hash)

```bash
GET /api/v2/block-index/<block height>
```

## **Parameters**

**`block height`**- string, required.

Example: `785365`

## Returns

```json
{
  "blockHash": "00000000000000000004a49543c0b6e2043e67b513c0d9100fbdf91f662c3ad1"
}
```

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

```bash
curl https://mainnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE>/api/v2/block-index/785365 \
 -X GET \
 -H "Content-Type: application/json"
```

{% endtab %}

{% tab title="testnet" %}

```bash
curl https://testnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE>/api/v2/block-index/785365 \
 -X GET \
 -H "Content-Type: application/json"
```

{% endtab %}
{% endtabs %}
