<p>If you do scientific or academical research, you probably won't use blockchain.info. Because this would mean you basically trust bitcoin.info as blockchain source. <strong>It really would consider creating and querying your own blockchain copy by installing and syncing a Bitcoin-Core node</strong>.</p>

<p>A simple python (or different language) JSON RPC script could solve your problem.
(requires a synced bitcoin-core node)</p>

<ol>
<li>Add 1000 (of the 100'000) addresses over RPC call <code>importaddress</code></li>
<li>Get balance of each address by calling `listreceivedbyaddress</li>
<li>Stop bitcoin-core</li>
<li>Delete wallet.dat</li>
<li>Start bitcoin-core</li>
</ol>

<p>--> go back to 1)</p>

<p>You might increase or decrease the address frame (1000) depending on your system CPU/Mem/Disk resources.</p>

CC BY-SA 3.0
2015-08-18T18:15:59.573Z
Hi. 
Thank you for the input!
I have got to try and code this first, but is it likely to be slower or faster than questioning blockchain? At the moment, my main concern is speed.
MrJanx
CC BY-SA 3.0
2015-08-19T06:28:07.463Z
Very likely that accessing blockchain.info is faster because they have a per-address index. You need to rescan after every frame (+/-1000 address) which can take serval minutes. But blockchain.info might block your access because of high traffic or similar.
Jonas Schnelli
CC BY-SA 3.0
2015-08-18T13:26:05.180Z
2015-08-18T13:26:05.180Z
Jonas Schnelli
<p>I need to go through a large list (about 100 000) of bitcoin addresses, and, if they have a final balance, find that as well as the total sent and recieved. I am working in python, and I have looked through the various API's, but so far I have found the best solution to be getting the JSON data from <a href="https://blockchain.info/" rel="nofollow">https://blockchain.info/</a></p>

<p>I use:</p>

<pre><code>urllib.urlopen("https://blockchain.info/multiaddr?cors=true&amp;active="+testStr)
</code></pre>

<p>where testStr is up to 23 addresses, separated by |</p>

<p>This returns a page which I dump into a json and parse for the data I need. I am just wondering if there is any faster method to get this information, rather than multiple calls to blockchain.info?
thanks</p>

<blockchain><address><python>
Best method for getting bulk address information (total sent, received, and final balance)
MrJanx
# Best method for getting bulk address information (total sent, received, and final balance)

(Asked by: username_0 on 2015-08-18)

I need to go through a large list (about 100 000) of bitcoin addresses, and, if they have a final balance, find that as well as the total sent and recieved. I am working in python, and I have looked through the various API's, but so far I have found the best solution to be getting the JSON data from https://blockchain.info/
I use:
urllib.urlopen("https://blockchain.info/multiaddr?cors=true&active="+testStr)

where testStr is up to 23 addresses, separated by |
This returns a page which I dump into a json and parse for the data I need. I am just wondering if there is any faster method to get this information, rather than multiple calls to blockchain.info?
thanks

**Tags:** blockchain, address, python


---

## 1 answers

### Answer by username_1 on 2015-08-18. Score: 2

If you do scientific or academical research, you probably won't use blockchain.info. Because this would mean you basically trust bitcoin.info as blockchain source. **It really would consider creating and querying your own blockchain copy by installing and syncing a Bitcoin-Core node**.

A simple python (or different language) JSON RPC script could solve your problem.
(requires a synced bitcoin-core node)

1. Add 1000 (of the 100'000) addresses over RPC call `importaddress`
2. Get balance of each address by calling `listreceivedbyaddress
3. Stop bitcoin-core
4. Delete wallet.dat
5. Start bitcoin-core

--> go back to 1)

You might increase or decrease the address frame (1000) depending on your system CPU/Mem/Disk resources.

> **Comments:**
> **username_0**: Hi.  Thank you for the input! I have got to try and code this first, but is it likely to be slower or faster than questioning blockchain? At the moment, my main concern is speed.  
> **username_1**: Very likely that accessing blockchain.info is faster because they have a per-address index. You need to rescan after every frame (+/-1000 address) which can take serval minutes. But blockchain.info might block your access because of high traffic or similar.  

---

