4

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.

3 Answers 3

7

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

1
  • At least webbtc is opensource, can set up own instance.
    – weston
    Commented May 10, 2018 at 11:39
1

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
0

Blockchair has this api available that currently works (in 2022) https://blockchair.com/api/docs#link_M31

Example for block 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

https://api.blockchair.com/bitcoin/raw/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

and see the raw_block field

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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