rest/block/notxdetails - Bitcoin

This endpoint returns a block's header fields and the list of transaction ids it contains, without decoding each transaction. It is the practical way to read a block: the full form is many times larger.

Parameters

ParameterTypeLocationRequiredDescription
hashstringpathYesThe block hash
formatstringpathYesResponse format appended to the hash: json, hex, or bin

Request

bashcurl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/rest/block/notxdetails/000000000000000000019c481c042c0625abe1dc04fe26795e2e24b152791e5f.json'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/rest/block/notxdetails/000000000000000000019c481c042c0625abe1dc04fe26795e2e24b152791e5f.json'
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/rest/block/notxdetails/000000000000000000019c481c042c0625abe1dc04fe26795e2e24b152791e5f.json')

print(response.json())

Response

json{
    "hash": "000000000000000000019c481c042c0625abe1dc04fe26795e2e24b152791e5f",
    "confirmations": 1,
    "height": 967816,
    "version": 617037824,
    "versionHex": "24c74000",
    "merkleroot": "7b7ffdc51c5adbc40f8c209747b7c82f083f647e555cd0ef80b8acf66df21ebf",
    "time": 1789899076,
    "mediantime": 1789892696,
    "nonce": 1539191330,
    "bits": "17021ec5",
    "target": "000000000000000000021ec50000000000000000000000000000000000000000",
    "difficulty": 132757073449487.5,
    "chainwork": "000000000000000000000000000000000000000148e422b78a65626de4ddb156",
    "nTx": 4131,
    "previousblockhash": "0000000000000000000159d94328a0362aba4418de918cba6830e550f8e50bd8",
    "strippedsize": 800904,
    "size": 1590347,
    "weight": 3993059,
    "tx": [
        "8ba102f12c9bb691f3f553fb958c0c209417b43318318e83940372e37ac245f9",
        "98bde4a7f407769028cbe725695d388324ab6b83fab4f310005082dd9b8b2de9"
    ]
}

The tx array is truncated to two entries; this block holds 4,131 transactions.

Response Parameters

FieldTypeDescription
hashstringThe block hash
confirmationsnumericDepth of the block, or -1 if not on the main chain
heightnumericBlock height
versionnumericBlock version
versionHexstringBlock version in hex
merklerootstringMerkle root of the block's transactions
timenumericBlock time as a Unix timestamp
mediantimenumericMedian time of the preceding 11 blocks
noncenumericProof-of-work nonce
bitsstringCompact difficulty target
targetstringFull proof-of-work target
difficultynumericDifficulty as a multiple of the minimum
chainworkstringCumulative work up to this block
nTxnumericNumber of transactions in the block
previousblockhashstringHash of the preceding block
nextblockhashstringHash of the following block, when one exists
strippedsizenumericBlock size excluding witness data
sizenumericBlock size in bytes
weightnumericBlock weight
txarrayTransaction ids in the block

Prefer this over rest/block unless every transaction is genuinely needed. The block above is 1.59 MB serialized, and its fully decoded form is several times that, while this response is a header plus a list of ids.

Use Cases

  • Block Scanning: Walk a block's transaction ids and fetch only the ones you need
  • Chain Walking: Follow previousblockhash to traverse the chain
  • Header Checks: Read difficulty, timestamps, and work without the payload cost
  • Confirmation Depth: Read confirmations for a known block

Error Handling

HTTP StatusMessageDescription
400Bad requestThe path is malformed, or a hash or height is invalid
403ForbiddenMissing or invalid ACCESS-TOKEN
404Not foundNo object matches the requested hash, height, or outpoint
500Internal errorThe node failed to process the request