> For the complete documentation index, see [llms.txt](https://documentation.script.tv/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.script.tv/api-references/rpc-api-reference/getblock/getblockbyheight.md).

# GetBlockByHeight

This API returns the finalized block given the height. If none of the blocks at the given height are finalized (either directly or indirectly), the API simply returns an empty result.

**RPC Method:** script.GetBlockByHeight

**Query Parameters**

height: the block height (need to pass in as a string instead of an integer)

**Returns**

Similar to the returns of the GetBlock API.

// Request

`curl -X POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"script.GetBlockByHeight","params":[{"height":"3"}],"id":1}' http://localhost:16888/rpc`

`// Result`

`{`

&#x20;`"jsonrpc": "2.0",`

&#x20;`"id": 1,`

&#x20;`"result": {`

&#x20;`"chain_id": "scriptnet",`

&#x20;`"epoch": "5",`

&#x20;`"height": "3",`

&#x20;`"parent": "0x724b0f68d8e45f930b95bac224fa7d67eef243307b4e84f0f666198d1d70e9d7",`

&#x20;`"transactions_hash": "0x2bf2c62185fceed239a55bd27ada030cf75970f09122addb2e419e70cafebdf0",`

&#x20;`"state_hash": "0xd41742c2b0d70e3bac1d88b2af69a2491d8c65c650af6ec4d2b8873897f8becc",`

&#x20;`"timestamp": "1548102762",`

&#x20;`"proposer": "0x2e833968e5bb786ae419c4d13189fb081cc43bab",`

&#x20;`"children": ["0x21d3c2bb25d0c85a1f5c3ff81bc7eeae998bf98db1dba461fb3f69a434feb90c"],`

&#x20;`"status": 4,`

&#x20;`"hash": "0x9f1e77b08c9fa8984096a735d0aae6b0e43aee297e42c54ce36334103ddd67a7",`

&#x20;`"transactions": [...]`

&#x20;`}`

`}`
