Blockchain.com API
Bitcoin blockchain data — blocks, transactions, addresses and stats.
What it does
Blockchain.com’s Data API is a Bitcoin blockchain explorer over HTTP: look up addresses and their transaction history, individual transactions and blocks, mempool and chain stats, plus a simple price ticker across fiat currencies.
Base URL
Authentication
Basic use needs no key. Heavy use should request a free API key (via their form) and pass it as ?api_code=YOUR_CODE to lift the rate limit. Add ?cors=true for browser requests.
Code examples
curl -s "https://blockchain.info/rawaddr/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?limit=3" curl -s "https://blockchain.info/ticker" curl -s "https://blockchain.info/q/getblockcount"
import requests
addr = "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
r = requests.get(f"https://blockchain.info/rawaddr/{addr}",
params={"limit": 5}, timeout=15)
d = r.json()
print(d["final_balance"] / 1e8, "BTC across", d["n_tx"], "txs")Rate limits & quotas
Without a key, expect tight throttling — roughly one request every 10 seconds on the explorer endpoints and hard IP blocks for bursts (HTTP 429). A free api_code raises this substantially. All Bitcoin amounts are in satoshis (divide by 100,000,000 for BTC).
Key response fields
| final_balance | Address balance in satoshis |
| n_tx | Number of transactions for the address |
| txs[].inputs / txs[].out | Transaction input and output entries |
| /ticker → USD.last | Latest BTC price in that currency |
| /q/getblockcount | Plain-text current block height |
Common errors
| 429 / "Rate limited" | Too many requests without a key — add api_code or slow down. |
| 404 | Unknown address, tx hash or block hash. |
| 500 | Occasional on very large addresses — page with offset/limit. |
When to use it (and alternatives)
Fine for occasional Bitcoin address and transaction lookups and a quick price ticker. For multi-chain exploration use Blockchair or Blockscout; for Ethereum specifically use Etherscan.
FAQ
Why are the balances such huge numbers?
They are in satoshis, the smallest Bitcoin unit. 100,000,000 satoshis = 1 BTC, so divide by 1e8.
Do I need an API key?
Not for light use, but the unauthenticated rate limit is aggressive. Request a free api_code for anything beyond occasional lookups.
Can I call this from a browser?
Add ?cors=true to the request so the response includes the right CORS headers. Never expose an api_code in client-side code, though.
New to APIs?
Short guides for working with this API — and any other.