> For the complete documentation index, see [llms.txt](/llms.txt).

# `getblockhash`

Returns the hash of the block at a height on the main chain. This method uses [80 credits](/get-started/pricing/) from your daily balance.

## Parameters[​](#parameters "Direct link to Parameters")

- `height`: (integer) _[required]_ - Block height.

## Returns[​](#returns "Direct link to Returns")

`result`: (string) - Hex-encoded block hash.

### Request[​](#request "Direct link to Request")

- curl

```
curl https://bitcoin-mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "getblockhash", "params": [1]}'

```

### Response[​](#response "Direct link to Response")

- JSON

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048"
}

```
