I was looking for an API to download block chain data in real-time so I use the transaction data for analytics.

Is anyone aware of a good API for this?

  • Are you running a bitcoind locally? Or are you after a blockexplorer type website API? Jun 8, 2013 at 14:49
  • @organofcorti running bitcoind locally on a Debian box
    – jazzdawg
    Jun 8, 2013 at 23:57

2 Answers 2


If you are using the bitcoin-qt client https://en.bitcoin.it/wiki/Bitcoin-Qt, you already have the blockchain in your hard drive (in the /bitcoin folder). The files blk000x.dat (blk0001.dat is the first part, blk0002.dat the second ...) contain all the data. blkindex.dat has the index to the blocks.

With the command line version, bitcoind, you can check blocks, transactions. The files can also be studied with bitcointools: https://github.com/gavinandresen/bitcointools

If you are using some other client, the files will be somewhere else, but most likely they will still be there.


Your best bet is to look at something like blockparser to pull data from the existing blockchain, and then using 0.8.2's -blocknotify option to stay relatively up-to-date.

Remember that there is a trade-off between being real-time and being accurate; you will need to consider if you want a particular number of confirmations before considering a transaction legitimate, or if you want to operate x blocks behind to attempt to avoid issues which might occur if you have blocks which are subsequently orphaned.

Your Answer

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

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