Bitcoin REST API
GetBlock provides fast and reliable access to Bitcoin nodes via the Bitcoin Core REST API. Connect to the Bitcoin network without running your own infrastructure.
The Bitcoin REST API is Bitcoin Core's own HTTP interface, served directly by the node. Each endpoint is a path under /rest/, takes its arguments in the path rather than a query string, and ends with the response format. It is read-only: it reads blocks, transactions, outpoints, the mempool, and consensus state.
Base URL
https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/rest/Response Formats
Every path ends with a format suffix:
.json
application/json
Decoded output, as documented on each page
.hex
text/plain
The object serialized and hex-encoded
.bin
application/octet-stream
The object serialized as raw bytes
.hex and .bin apply to blocks, headers, and transactions. .bin is the most compact way to pull a block for local parsing.
Endpoints
/rest/chaininfo.json
Chain height, best block, difficulty, and sync progress
/rest/blockhashbyheight/{height}.json
The block hash at a given height
/rest/block/notxdetails/{hash}.json
Block header fields plus the list of transaction ids
/rest/block/{hash}.json
Block with every transaction decoded in full
/rest/headers/{count}/{hash}.json
A run of block headers walking forward from a block
/rest/tx/{txid}.json
A transaction, decoded
/rest/getutxos/{txid}-{n}.json
Whether given outpoints are unspent
/rest/mempool/info.json
Mempool size, memory usage, and fee floors
/rest/mempool/contents.json
Every mempool transaction with fee and ancestry detail
/rest/deploymentinfo.json
Activation state of each consensus soft fork
Quick check
This request returns the node's chain state and confirms the endpoint is configured correctly:
What this interface cannot do
Address balance, history, or UTXOs
The node keeps no address index
Blockbook api/v2/address and api/v2/utxo
Broadcasting a transaction
The REST interface is read-only
JSON-RPC sendrawtransaction, or Blockbook api/v2/sendtx
A transaction's fee or confirmations
rest/tx returns neither
JSON-RPC getrawtransaction with verbosity 2
Notes
Amounts are in BTC as decimals, not satoshis. Parsing them as floating-point numbers loses precision. Blockbook reports integer satoshi strings instead.
Arguments go in the path, not the query string, and the format suffix is required.
Responses can be very large. A full block runs to megabytes, and
mempool/contentslarger still. Preferblock/notxdetailsandmempool/infowhere they will do.
Support
Support: support@getblock.io
Last updated
Was this helpful?