---
title: "Get a block by hash in JSON format."
method: GET
path: "/api/v1/block/{hash}/json"
tags: ["block"]
---

# Get a block by hash in JSON format.

`GET /api/v1/block/{hash}/json`

Returns block data with the next block hash.

## Path parameters

- `hash` string, required

## Response `200`

Block with next block hash

- BlockExtended — This structure extends the standard Block model to provide additional blockchain traversal capabilities by including a reference to the next block in the chain. This is particularly useful for blockchain explorers and analysis tools that need to navigate the chain in a forward direction. The structure preserves all fields from the base Block model through embedding, while adding the NextBlock field that can be used for chain traversal. This approach maintains compatibility with existing Block-based code while extending functionality. Fields: Block: Embedded Block model containing all standard block data including header, transactions, etc. NextBlock: Hash of the next block in the chain, or nil if this is the tip of the chain
  - `coinbase_tx` Tx — DO NOT CHANGE ORDER - Optimized memory via malign
    - `inputs` Input[]
      - `PreviousTxOutIndex` integer
      - `PreviousTxSatoshis` integer
      - `PreviousTxScript` integer[] — Script type
      - `SequenceNumber` integer
      - `UnlockingScript` integer[] — Script type
    - `locktime` integer
    - `outputs` Output[]
      - `locking_script` integer[] — Script type
      - `satoshis` integer
    - `version` integer
  - `header` BlockHeader
    - `bits` integer[]
    - `hash_merkle_root` integer[] — Hash is used in several of the bitcoin messages and common structures. It typically represents the double sha256 of data.
    - `hash_prev_block` integer[] — Hash is used in several of the bitcoin messages and common structures. It typically represents the double sha256 of data.
    - `nonce` integer — Nonce used to generate the block.
    - `timestamp` integer — Time the block was created im unix time.
    - `version` integer — Version of the block. This is not the same as the protocol version.
  - `height` integer
  - `id` integer
  - `nextblock` integer[] — Hash is used in several of the bitcoin messages and common structures. It typically represents the double sha256 of data.
  - `size_in_bytes` integer
  - `subtrees` Hash[]
    - integer[] — Hash is used in several of the bitcoin messages and common structures. It typically represents the double sha256 of data.
  - `transaction_count` integer

## Other responses

- `400` — Error response
- `404` — Error response

---

[API](https://skmtc.net/bsv-blockchain/apis/teranode-asset-service-api.md) · [All operations](https://skmtc.net/bsv-blockchain/apis/teranode-asset-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bsv-blockchain/teranode-asset-service-api/versions/5bc9be41e029/schema)
