BitcoinDatabase.com
All posts
Engineering

Bitcoin RPC vs REST API: Which Should You Use to Query the Chain?

Bitcoin RPC vs REST API: JSON-RPC talks to a node you run, a REST data API serves indexed results from someone else's. We compare what each returns, setup and cost, and when to pick which.

By the BitcoinDatabase team

July 2026 · 9 min read

The short answer

Bitcoin RPC (JSON-RPC) is the command interface built into Bitcoin Core: you send calls like getblock or getrawtransaction to a node you run, and it answers from its own copy of the chain. A REST data API is a hosted service that returns the same on-chain facts, plus indexed results a raw node cannot, over ordinary HTTPS with an API key. Use RPC when you must run your own node for trust or broadcasting; use a REST data API when you want address balances, history and analytics without hosting, syncing or indexing anything yourself.

Both let you read the Bitcoin blockchain, but they sit at different layers. One is a protocol interface bolted to a full node; the other is a product that has already done the indexing. Picking the wrong one costs you either weeks of infrastructure work or a capability you cannot get. Here is how they actually differ.

What is Bitcoin JSON-RPC?

Bitcoin JSON-RPC is the remote procedure call interface that ships inside Bitcoin Core. When you run the node, it opens an authenticated port and accepts method calls encoded as JSON: getblockchaininfo for the chain tip and difficulty, getblock and getblockhash for blocks, getrawtransaction for a transaction, sendrawtransaction to broadcast, and dozens more. The node answers from its local, fully-validated copy of the chain. This is the canonical, trust-minimized way to talk to Bitcoin: you are asking software you control, running rules you verify.

The catch is everything around it. To use RPC you first run Bitcoin Core, which means 600+ GB of disk, an initial block download that can take days, and keeping the process synced, reachable and secured. The RPC port has to be firewalled and authenticated. And crucially, RPC answers node-level questions, not analytics ones.

What is a Bitcoin REST API?

A Bitcoin REST API is a hosted HTTP service that returns on-chain data through ordinary web requests. You send an authenticated GET to a versioned URL and receive typed JSON. A good one is backed by an index of the whole chain, so it answers both the node-style lookups (fetch a block, fetch a transaction) and the ones a raw node cannot do directly: an address balance to the satoshi, an address's full transaction history, current UTXOs, a whole-wallet total from an xpub, or entity labels and fund flows.

That indexed layer is the real distinction. A raw node knows every transaction, but it does not keep a running balance per address, because Bitcoin has no account balances, only unspent outputs. To answer "what does this address hold," something has to scan and index every output. A REST data API has done that already. If you want RPC-style calls specifically, a Bitcoin RPC API maps them to REST so you get getblock and getrawtransaction without hosting the node behind them.

Bitcoin RPC vs REST API: a side-by-side comparison

Dimension JSON-RPC (your own node) REST data API (hosted)
Where data lives Your node's local chain copy Provider's indexed database
Setup Run Core, 600+ GB, days to sync API key, minutes
Block and tx lookups Yes, from the node Yes, from the index
Address balance and history No, unless you index it yourself Yes, one call
Broadcasting your own tx Yes, sendrawtransaction Depends on the provider
Trust model Trust-minimized, you validate You trust the provider's data
Ongoing burden Sync, uptime, security, scaling None, provider handles it

Which is faster to build with?

A hosted REST API is faster to build with in almost every case, because there is no infrastructure to stand up. You request a key and start calling within minutes, and the endpoints already return the aggregated answers your app needs. Running your own node for RPC only pays off when you have a hard requirement for it: broadcasting transactions through infrastructure you control, validating the chain yourself for trust reasons, or a privacy posture where no third party should see your queries. For reading balances, powering a dashboard, or building an explorer, indexing is the slow part, and a REST data API has already paid that cost.

Do I need to run a node to use RPC?

To use real Bitcoin JSON-RPC, yes: RPC is the interface to a node, so you either run Bitcoin Core yourself or use a provider that runs one for you. Managed node services and node APIs exist precisely so you can make RPC-style calls against infrastructure you do not maintain. If you go the self-hosted route, budget for the disk, the initial sync, and the operational load of keeping it online. That is also where continuous uptime monitoring earns its keep, because an RPC endpoint that silently falls behind or goes offline breaks everything that depends on it. If you would rather skip node operations entirely, a hosted Bitcoin node API keeps Core synced for you and maps the calls to REST.

When should you use each?

Use JSON-RPC on your own node when you must broadcast transactions yourself, need trustless validation, or run a service where query privacy is non-negotiable. Use a REST data API when you want address balances, transaction history, UTXOs, mempool and fee data, or analytics, and you would rather not run infrastructure. Many teams use both: a node for broadcasting and validation, and a data API for the indexed reads a node cannot answer. If you are starting a new project and just need to read the chain, begin with a Bitcoin API and add a node later only if a specific requirement forces it.

Can one service give me both?

Yes. Some providers expose RPC-style calls (fetch a block, fetch a raw transaction) and indexed lookups (address balance, wallet total, fund flows) through the same REST surface, so you get the node-level and analytics-level answers from one key. That is the model BitcoinDatabase uses: every block since the 2009 genesis is indexed and reconciled, and you query it over REST, SQL or dashboards without running Bitcoin Core. You get the getblock-style calls you expect from RPC and the balance-and-history answers a raw node will not give you, in one place.

RPC and a REST data API are not really competitors; they answer different questions at different layers. Run a node when the trust or broadcasting requirement is real. Reach for an indexed API when you want answers, not infrastructure.

Query Console
btc
try:

Hit Run to query the fully-indexed Bitcoin blockchain.

BTC

30-day trend

informational on-chain data · not financial advice

REST API · SQL · dashboards, one indexed dataset. Querying the indexed Bitcoin blockchain ...

Query the Bitcoin blockchain yourself

Pull balances, UTXOs, transactions, on-chain metrics and fund flows from the fully indexed Bitcoin blockchain by REST API, SQL and dashboards. Indexed since 2009, new blocks within seconds, no node to run.

Query the whole Bitcoin blockchain

BitcoinDatabase indexes the public Bitcoin blockchain block by block and returns balances, UTXOs, transactions, on-chain metrics and fund flows by REST API, SQL and dashboards, with no node to run.

REST + SQL + dashboards · indexed since 2009 · new blocks within seconds

Informational on-chain data only · not financial, investment or legal advice · AML features are compliance tooling to support your own review.