<p>You can use the new <code>scantxoutset</code> method to check for UTXOs matching a given script, address, or key descriptor.</p>

<p>For example, to scan an address, you can use:</p>

<pre><code>bitcoin-cli scantxoutset start "[\"addr(1....)\"]"
</code></pre>

CC BY-SA 4.0
2020-02-11T22:35:25.553Z
Does it scan all the txs in the bitcoin db to find that specific tx which that specific adress is in the utxo set of that tx?
Efe
CC BY-SA 4.0
2020-02-11T22:40:29.297Z
It only scans the txs in the utxo set - any outputs that have already been spent will not be considered
Raghav Sood
CC BY-SA 4.0
2020-02-13T22:54:59.650Z
When I run that comment, it takes 1-2 min but when I do the query on blockchain.info, it happens in seconds. Why? Can it be that they downloaded the bitcoin database and tweaked it so it computes very fast? I am asking because I need fast results too if possible. Do you have an idea?
Efe
CC BY-SA 4.0
2020-02-14T03:35:09.167Z
@EfeCini Explorers extract all this information into a separate database optimized for their query patterns. You will not be able to match that speed using just Bitcoin Core, and should consider running a service such as Insight or ElectrumX on top of it
Raghav Sood
CC BY-SA 4.0
2020-02-11T21:08:17.410Z
2020-02-11T21:08:17.410Z
Raghav Sood
<p>I am trying to make a query about a bitcoin address's btc amount. As I've <a href="https://bitcoin.stackexchange.com/questions/57065/why-bitcoin-cli-getreceivedbyaddress-always-returns-0">read</a>, <strong>getreceivedbyaddress</strong> rpc command can only be used for the addresses of a wallet that one owns and that command is awallet command. I want to make a query about any bitcoin addresses btc amount. Is it possible? If yes, how do I do it?</p>

<bitcoin-cli>
How can I get the bitcoin amount of an bitcoin address which doesn't belong to my wallet?
Efe
# How can I get the bitcoin amount of an bitcoin address which doesn't belong to my wallet?

(Asked by: username_0 on 2020-02-11)

I am trying to make a query about a bitcoin address's btc amount. As I've [read](https://bitcoin.stackexchange.com/questions/57065/why-bitcoin-cli-getreceivedbyaddress-always-returns-0), **getreceivedbyaddress** rpc command can only be used for the addresses of a wallet that one owns and that command is awallet command. I want to make a query about any bitcoin addresses btc amount. Is it possible? If yes, how do I do it?

**Tags:** bitcoin-cli


---

## 1 answers

### Answer by username_1 on 2020-02-11. Score: 1 | Accepted answer

You can use the new scantxoutset method to check for UTXOs matching a given script, address, or key descriptor.
For example, to scan an address, you can use:
bitcoin-cli scantxoutset start "[\"addr(1....)\"]"

> **Comments:**
> **username_0**: Does it scan all the txs in the bitcoin db to find that specific tx which that specific adress is in the utxo set of that tx?  
> **username_1**: It only scans the txs in the utxo set - any outputs that have already been spent will not be considered  
> **username_0**: When I run that comment, it takes 1-2 min but when I do the query on blockchain.info, it happens in seconds. Why? Can it be that they downloaded the bitcoin database and tweaked it so it computes very fast? I am asking because I need fast results too if possible. Do you have an idea?  
> **username_1**: @username_0Cini Explorers extract all this information into a separate database optimized for their query patterns. You will not be able to match that speed using just Bitcoin Core, and should consider running a service such as Insight or ElectrumX on top of it  

---

