<p>If you are using the bitcoin-qt client <a href="https://en.bitcoin.it/wiki/Bitcoin-Qt" rel="nofollow">https://en.bitcoin.it/wiki/Bitcoin-Qt</a>, 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. </p>

<p>With the command line version, bitcoind, you can check blocks, transactions. The files can also be studied with bitcointools:
<a href="https://github.com/gavinandresen/bitcointools" rel="nofollow">https://github.com/gavinandresen/bitcointools</a></p>

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

CC BY-SA 3.0
2013-06-08T11:34:01.303Z
2013-06-08T11:34:01.303Z
halftimepad
<p>Your best bet is to look at something like <a href="https://github.com/znort987/blockparser" rel="nofollow">blockparser</a> to pull data from the existing blockchain, and then using 0.8.2's <code>-blocknotify</code> option to stay relatively up-to-date.</p>

<p>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.</p>

CC BY-SA 3.0
2013-06-08T11:39:33.500Z
2013-06-08T11:39:33.500Z
jgm
<p>I was looking for an API to download block chain data in real-time so I use the transaction data for analytics.</p>

<p>Is anyone aware of a good API for this?</p>

CC BY-SA 3.0
2013-06-08T14:49:06.377Z
Are you running a bitcoind locally? Or are you after a blockexplorer type website API?
organofcorti
CC BY-SA 3.0
2013-06-08T23:57:15.043Z
@organofcorti running bitcoind locally on a Debian box
jazzdawg
<api>
API for downloading block chain data
jazzdawg
# API for downloading block chain data

(Asked by: username_0 on 2013-06-08)

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?

**Tags:** api

> **Comments:**
> **username_1**: Are you running a bitcoind locally? Or are you after a blockexplorer type website API?  
> **username_0**: @username_1 running bitcoind locally on a Debian box  

---

## 2 answers

### Answer by username_2 on 2013-06-08. Score: 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.


---

### Answer by username_3 on 2013-06-08. Score: 1

Your best bet is to look at something like [blockparser](https://github.com/znort987/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.


---

