I'm using bitcoin-qt and have a local copy of the blockchain, in which I'm running some analysis with the JSON-RPC API using mostly getblock and getrawtransaction. I have no need writing or sending transactions in this use case. It's overkill to run a full node just to read the blockchain, and it hurts my analysis performance, too.

Is there a (preferrably tested) library to parse the blockchain and return objects, JSON or not? Language doesn't matter much. If not, is there a node implementation that allow turning off network and wallet features?

  • 1
    It should be easy with bitcoin-qt to effectively disable networking with something like -connect= And I don't think the wallet features should have much effect if you just don't use them. – Nate Eldredge Feb 24 '14 at 17:33
  • Here is the lightweight blockchain parser github.com/normanvolt/blockchain-parser – Denis Leonov Jun 22 '18 at 14:48

There are a couple available:

https://github.com/znort987/blockparser Which is c++ based and has some basic analysis functions already written.

http://codesuppository.blogspot.com/2014/01/how-to-parse-bitcoin-blockchain.html describes the basics of parsing the block chain and links to code written by the author of the post.

It looks like most projects don't parse it directly and use the RPC interface of the main bitcoin client.

| improve this answer | |

A good solution would be to use a trusted third-party that has already parsed the entire block chain for you. For example, the Blockchain.info API is quite well suited for your purpose.

Specifically what you want is the Block Explorer API which returns JSON objects.

| improve this answer | |
  • 4
    Given that I have a local blockchain, I think it would be more efficient to reach my disk than the network. I've considered this option and the apparent lack of standalone tools bothers me. – Bruno Kim Feb 21 '14 at 13:36

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.