> 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.md).

# Get block

Returns information about block with transactions, subject to paging.

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)

```bash
GET /api/v2/block/<block height|block hash>
```

## **Parameters**

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

Example: `742583`(block height) OR `00000000000000000008fd16cf3e1f586a6a5d471eb8d821069a89445367172e` (block hash)

## Returns

```bash
{
	"page": 1,
	"totalPages": 4,
	"itemsOnPage": 1000,
	"hash": "00000000000000000008fd16cf3e1f586a6a5d471eb8d821069a89445367172e",
	"previousBlockHash": "00000000000000000000416906580230894d4fa770bd8c2f2378193e1eab15e2",
	"nextBlockHash": "000000000000000000021959f9adfebb0a22d40d9f6a71dcdf8b5ae5346da66b",
	"height": 742583,
	"confirmations": 100020,
	"size": 1500692,
	"time": 1656354995,
	"version": 1073733632,
	"merkleRoot": "f2bd3ff7f5d05ff62369663ebcc70dd619e09f359b1925f738bf33e565dfcfb8",
	"nonce": "86610451",
	"bits": "170984cc",
	"difficulty": "29570168636357.99",
	"txCount": 3019,
	"txs": [
		{
			"txid": "9d266c2e2970131b1524e8294ce8889e31bdbc4f0d82b1aa70e00f04f7028d10",
			"vin": [
				{
					"n": 0,
					"isAddress": false,
					"value": "0"
				}
			],
			"vout": [
				{
					"value": "644690627",
					"n": 0,
					"spent": true,
					"spentTxId": "b243bc9855a848298927d219033a1e2eb2a7c6b91c6b9d6e58caa2cfcbe20693",
					"spentHeight": 742707,
					"addresses": [
						"18cBEMRxXHqzWWCxZNtU91F5sbUNKhL5PX"
					],
					"isAddress": true
				},
				{
					"value": "0",
					"n": 1,
					"addresses": [
						"OP_RETURN 52534b424c4f434b3ae1864c27c7f297fc6f08524fe9a7cd58be2f4196d836c1625ca37d2e004387fa"
					],
					"isAddress": false
				},
				{
					"value": "0",
					"n": 2,
					"addresses": [
						"OP_RETURN aa21a9ed8fb5f728f588a7ecf0c6d424a32acb3873d144fee06064ab51d79175e069e8d7"
					],
					"isAddress": false
				}
			],
			"blockHash": "00000000000000000008fd16cf3e1f586a6a5d471eb8d821069a89445367172e",
			"blockHeight": 742583,
			"confirmations": 100020,
			"blockTime": 1656354995,
			"vsize": 290,
			"value": "644690627",
			"valueIn": "0",
			"fees": "0"
		},
		......
		{
			"txid": "503cea081212543c076011c3f8ef637e91f90feeda2a6b0fb82c755e8798aff6",
			"vin": [
				{
					"txid": "fee39d871253fa08bc7d05917d72d98a0ea44c561b9823404b06bc933f2f8df6",
					"n": 0,
					"addresses": [
						"bc1qj5gl9dyw4snz98tgk5c3tclphugeq25adu3nur"
					],
					"isAddress": true,
					"value": "4882485"
				}
			],
			"vout": [
				{
					"value": "2445386",
					"n": 0,
					"spent": true,
					"spentTxId": "fd513b31412d714999a59502d7bd327df867e3506fc3a3345c7a1f57019f4e48",
					"spentHeight": 742915,
					"addresses": [
						"bc1qr4km2nj8un005gk7lpppsnv5mu04nxrxfwvzny"
					],
					"isAddress": true
				},
				{
					"value": "2434582",
					"n": 1,
					"spent": true,
					"spentTxId": "0bbff2f3781662ff29ec8710fd5b29efe152aa21e00c1a96f69e2275659aefb3",
					"spentHeight": 742743,
					"addresses": [
						"bc1qj5gl9dyw4snz98tgk5c3tclphugeq25adu3nur"
					],
					"isAddress": true
				}
			],
			"blockHash": "00000000000000000008fd16cf3e1f586a6a5d471eb8d821069a89445367172e",
			"blockHeight": 742583,
			"confirmations": 100020,
			"blockTime": 1656354995,
			"vsize": 141,
			"value": "4879968",
			"valueIn": "4882485",
			"fees": "2517"
		}
	]
}
```

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

```bash
curl https://mainnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE>/api/v2/block/<block_height|block_hash> \
 -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/<block_height|block_hash> \
 -X GET \
 -H "Content-Type: application/json"
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.validationcloud.io/v1/bitcoin/blockbook-indexer-rest-api/get-block.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
