---
title: "Get blocks by version"
method: GET
path: "/blocks/by_version/{version}"
tags: ["Blocks"]
---

# Get blocks by version

`GET /blocks/by_version/{version}`

This endpoint allows you to get the transactions in a block
and the corresponding block information given a version in the block.

Transactions are limited by max default transactions size.  If not all transactions
are present, the user will need to query for the rest of the transactions via the
get transactions API.

If the block has been pruned, it will return a 410

## Path parameters

- `version` integer, required

## Query parameters

- `with_transactions` boolean

## Response `200`

- Block — A Block with or without transactions This contains the information about a transactions along with associated transactions if requested
  - `block_height` string, uint64, required — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
  - `block_hash` string, required
  - `block_timestamp` string, uint64, required — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
  - `first_version` string, uint64, required — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
  - `last_version` string, uint64, required — A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
  - `transactions` Transaction[] — The transactions in the block in sequential order — unresolved $ref

## Other responses

- `400`
- `403`
- `404`
- `410`
- `500`
- `503`

## Changes

- **2026-06-18** `4a94534afca7` — 1 breaking, 1 info
  - added `#/components/schemas/BlockMetadataExtension_BlockMetadataExtensionRandomnessAndDecPayload` to the `transactions/items/oneOf[#/components/schemas/Transaction_BlockMetadataTransaction]/allOf[#/components/schemas/BlockMetadataTransaction]/block_metadata_extension/allOf[#/components/schemas/BlockMetadataExtension]/` response property `oneOf` list for the response status `200`
  - added `v3` discriminator mapping keys to the `transactions/items/oneOf[#/components/schemas/Transaction_BlockMetadataTransaction]/allOf[#/components/schemas/BlockMetadataTransaction]/block_metadata_extension/allOf[#/components/schemas/BlockMetadataExtension]/` response property for the response status `200`
- **2026-06-01** `3df5940592fd` — 2 info
  - added the optional property `transactions/items/oneOf[#/components/schemas/Transaction_PendingTransaction]/allOf[#/components/schemas/PendingTransaction]/txn_limits_request` to the response with the `200` status
  - added the optional property `transactions/items/oneOf[#/components/schemas/Transaction_UserTransaction]/allOf[#/components/schemas/UserTransaction]/txn_limits_request` to the response with the `200` status
- …earlier changes not shown

[Full history](https://skmtc.dev/aptoslabs/apis/aptos-node-api/changes/blocks/by_version/:version/get.md)

---

[API](https://skmtc.dev/aptoslabs/apis/aptos-node-api.md) · [All operations](https://skmtc.dev/aptoslabs/apis/aptos-node-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/aptoslabs/aptos-node-api/revisions/4a94534afca7/schema)
