Skip to content
Alchemy Logo

/v1/blocks/by_height/{block_height}

GET
https://aptos-mainnet.g.alchemy.com/v2/docs-demo/v1/blocks/by_height/{block_height}

Retrieves block metadata and optionally the transactions contained in the block. If the block is pruned, the server will return a 410 error. To avoid partial results when with_transactions=true, consider checking the total number of transactions expected.

Path Parameters

integerrequired

Block height to look up. Starts at 0.

Query Parameters

booleanoptional

If set to true, includes all transactions in the block. May be limited by max transaction size.

Responses

200

Block data with or without transactions.

Was this page helpful?