POST
/
788f110831fe13808302bd79796d55e8
curl --request POST \
  --url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "1.0",
  "method": "getblockheader",
  "params": [
    "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
    true
  ],
  "id": 1
}'
{
  "result": {},
  "error": {},
  "id": 123
}

The getblockheader method retrieves detailed information about a block header given its hash. This includes the block’s hash, the number of confirmations, its height in the blockchain, version, Merkle root, block time, nonce, difficulty, total work done in the chain up to this block, and the hashes of the previous and next blocks if available.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • blockhash (required): The hash of the block header to retrieve.

Response

  • result — an object containing detailed information about the block header, such as its hash, confirmations, height, version, Merkle root, time, nonce, difficulty, total work, number of transactions, and previous and next block hashes.
  • error — an object containing an error message if an error occurred, otherwise null.
  • id — an integer representing the ID of the request.

Use case

The getblockheader method is essential for applications and services that need to verify the blockchain’s integrity or analyze its properties. It provides critical information about individual blocks without the need to download the entire block, making it useful for lightweight clients and block explorers.

Body

application/json
jsonrpc
string
default:1.0
method
string
default:getblockheader
params
(string | boolean)[]

The block hash

id
integer
default:1

Response

200 - application/json
Information about the block header
result
object
error
object
id
integer