Is there any Web API available for us to query Blockchain data in hex format?

The format should follow the standard (https://en.bitcoin.it/wiki/Block#Block_structure) structure rather than JSON.


What kind of API do you want? Do you mean API with your local Bitcoin Core or do you need web-API?

Have a look to http://webbtc.com/block/000000000000000001f942eb4bfa0aeccb6a14c268f4c72d5fff17270da771b9 (this is an example)

It is possible to download block as [json] / [hex] / [binary] there if you know the hash of the block

UPDATE (december'17): block in raw hex example : https://blockchain.info/block/000000000000000000a7b4999c723ed9f308425708577c76827ade51062e135a?format=hex

  • Suffix the above url with .hex, and you'll get the raw block hex. If you use .json, you the parsed block, transactions and all. Not many sites let you get at the block hex, so I believe this is the correct answer.
    – karimkorun
    May 29 '15 at 1:39
  • 3
    Unfortunately, webbtc.com isn't up to date anymore (last block from 2016). Is there a new API available? Thank you!
    – A.c
    Dec 2 '17 at 14:22
  • 1
    answer updated.
    – amaclin
    Dec 2 '17 at 17:55
  • At least webbtc is opensource, can set up own instance.
    – weston
    May 10 '18 at 11:39

Blockchain Data API https://www.blockchain.com/api/blockchain_api:

Single Block

  • https://blockchain.info/rawblock/$block_hash
  • You can also request the block to return in binary form (Hex encoded) using ?format=hex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.