<p>If you want to query your full node, you should use the <a href="https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)" rel="nofollow noreferrer">JSON-RPC API</a>. Note that by default, you'll only be able to get blocks, and transactions from your own full node wallet. If you want to be able to query any transactions, you have to add <code>txindex=1</code> to your configuration file. And compared to using blockchain.info, you won't be able to query balances of addresses.</p>

CC BY-SA 3.0
2018-03-03T14:47:43.377Z
That is helpful, thank you. So I assume blockchain.info is aggregating info about the blockchain. I hate being dependent on a third-party centralized source, I will take a close look at the JSON RPC API. Thanks again.
Corbin
CC BY-SA 3.0
2018-03-03T10:23:01.400Z
2018-03-03T10:23:01.400Z
alcio
<p>I'm running a full node on my PC and wondering if there is a way to query the blockchain locally via NodeJS instead of going through blockchain.info? It is very inefficient/slow to run queries through HTTP when I have all the data local.</p>

<blockchain><full-node><node.js><query>
Is there a way to query the blockchain locally if I am running a full node?
Corbin
# Is there a way to query the blockchain locally if I am running a full node?

(Asked by: username_0 on 2018-03-03)

I'm running a full node on my PC and wondering if there is a way to query the blockchain locally via NodeJS instead of going through blockchain.info? It is very inefficient/slow to run queries through HTTP when I have all the data local.

**Tags:** blockchain, full-node, node.js, query


---

## 1 answers

### Answer by username_1 on 2018-03-03. Score: 0 | Accepted answer

If you want to query your full node, you should use the [JSON-RPC API](https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)). Note that by default, you'll only be able to get blocks, and transactions from your own full node wallet. If you want to be able to query any transactions, you have to add `txindex=1` to your configuration file. And compared to using blockchain.info, you won't be able to query balances of addresses.

> **Comments:**
> **username_0**: That is helpful, thank you. So I assume blockchain.info is aggregating info about the blockchain. I hate being dependent on a third-party centralized source, I will take a close look at the JSON RPC API. Thanks again.  

---

