<blockquote>
  <p>How can they list the unspent transactions and the current amount of an address which "is not in their wallet"?</p>
</blockquote>

<p>Block explorer sites maintain a separate database of information which is built by continuously scanning the Bitcoin blockchain. If block explorer sites see a standard locking script in the outputs of the transactions, they scrape the addresses out of those locking script and the amount associated with that output. This information is added to their database. Also, when a user spends bitcoins, he has to reference the <code>txid</code> and the output index in the input of the transaction. The block explorer sites uses this information to locate that output and check the output locking script, from which they derive the 'input address'. All of this information and continuous lookups allows block explorer sites to associate funds with addresses and show whether the bitcoins sent from a transaction have been spent or not. However, if you lock a transaction in a custom script, the block explorer sites won't be able to decode this information.</p>

<blockquote>
  <p>How can they possibly have information from this newly generated address?</p>
</blockquote>

<p>They continuously scan the blockchain from which they can get transactions included in blocks. Also block explorer sites run full nodes that helps them collect transactions relayed by other nodes in the mempool that haven't been confirmed in blocks yet.</p>

CC BY-SA 4.0
2019-08-16T12:25:00.977Z
So you mean that they have a new database (probably a NoSQL like Mongo) and they update infos like spent/unspent so we can have this info on screen?
Allan Romanato
CC BY-SA 4.0
2019-08-16T12:36:43.967Z
@AllanRomanato I don't know the exact database that they use, but yes they maintain a separate one that can be easily queried when an end-user enters an address to check the transactions/addresses.
Ugam Kamat
CC BY-SA 4.0
2019-08-16T12:48:00.213Z
Makes sense since using the full node is easy to query transactions but not addresses. We can get all info as well but always starting from transactions not address.
Allan Romanato
CC BY-SA 4.0
2019-08-16T10:46:26.370Z
2019-08-16T10:46:26.370Z
Ugam Kamat
<p>As I understood in the following post <a href="https://bitcoin.stackexchange.com/questions/37118/how-to-get-unspents-for-a-specified-bitcoin-address">How to get unspents for a specified bitcoin address?</a>, we should use <code>listunspent</code> only on addresses that belong to our own wallet otherwise will return blank.</p>

<p>But let's take an example of blockchain.info or block.io. Once we type in an address - any address, even if we generate it manually (paper wallet, or algorithmically) - and transfer some BTCs, a search of the address in one of those explorers shows me the funds.</p>

<ol>
<li>How can they possibly have information from this newly generated address?</li>
<li>How can they list the unspent transactions and the current amount of an address which "is not in their wallet"?</li>
</ol>

<bitcoin-core><blockchain><bitcoind><json-rpc><blockchain.info>
How do block explorer sites show information that is not available on Bitcoin Core?
Allan Romanato
# How do block explorer sites show information that is not available on Bitcoin Core?

(Asked by: username_0 on 2019-08-16)

As I understood in the following post [How to get unspents for a specified bitcoin address?](https://bitcoin.stackexchange.com/questions/37118/how-to-get-unspents-for-a-specified-bitcoin-address), we should use `listunspent` only on addresses that belong to our own wallet otherwise will return blank.

But let's take an example of blockchain.info or block.io. Once we type in an address - any address, even if we generate it manually (paper wallet, or algorithmically) - and transfer some BTCs, a search of the address in one of those explorers shows me the funds.

1. How can they possibly have information from this newly generated address?
2. How can they list the unspent transactions and the current amount of an address which "is not in their wallet"?

**Tags:** bitcoin-core, blockchain, bitcoind, json-rpc, blockchain.info


---

## 1 answers

### Answer by username_1 on 2019-08-16. Score: 3 | Accepted answer

> How can they list the unspent transactions and the current amount of an address which "is not in their wallet"?

Block explorer sites maintain a separate database of information which is built by continuously scanning the Bitcoin blockchain. If block explorer sites see a standard locking script in the outputs of the transactions, they scrape the addresses out of those locking script and the amount associated with that output. This information is added to their database. Also, when a user spends bitcoins, he has to reference the `txid` and the output index in the input of the transaction. The block explorer sites uses this information to locate that output and check the output locking script, from which they derive the 'input address'. All of this information and continuous lookups allows block explorer sites to associate funds with addresses and show whether the bitcoins sent from a transaction have been spent or not. However, if you lock a transaction in a custom script, the block explorer sites won't be able to decode this information.

> How can they possibly have information from this newly generated address?

They continuously scan the blockchain from which they can get transactions included in blocks. Also block explorer sites run full nodes that helps them collect transactions relayed by other nodes in the mempool that haven't been confirmed in blocks yet.

> **Comments:**
> **username_0**: So you mean that they have a new database (probably a NoSQL like Mongo) and they update infos like spent/unspent so we can have this info on screen?  
> **username_1**: @AllanRomanato I don't know the exact database that they use, but yes they maintain a separate one that can be easily queried when an end-user enters an address to check the transactions/addresses.  
> **username_0**: Makes sense since using the full node is easy to query transactions but not addresses. We can get all info as well but always starting from transactions not address.  

---

