Getting Started with the Blockchain.info API

← Blockchain API

When to use this API

When you need to look up Bitcoin addresses, decode transactions, check current BTC prices in fiat currencies, or query block data — without an API key or registration. Blockchain.info is one of the oldest public Bitcoin data sources, and its /rawaddr/ endpoint is particularly useful for "has this address ever moved its coins?" questions, because it separately tracks total inflows, total outflows, and unredeemed UTXO counts. This API covers Bitcoin only — reach for CoinGecko or CoinMarketCap if you need other cryptocurrencies or historical price series.

Getting the current Bitcoin price in a specific currency

"What is Bitcoin worth right now in Australian dollars?" The /ticker endpoint returns the current Bitcoin price in all supported fiat currencies simultaneously, with no parameters required.

curl "https://blockchain.info/ticker" | head -c 10000
{
  "AUD": {"15m": 97676.43, "last": 97676.43, "buy": 97676.43, "sell": 97676.43, "symbol": "AUD"},
  "BRL": {"15m": 365527.29, "last": 365527.29, "buy": 365527.29, "sell": 365527.29, "symbol": "BRL"},
  "CHF": {"15m": 54239.53, "last": 54239.53, "buy": 54239.53, "sell": 54239.53, "symbol": "CHF"},
  "ARS": {"15m": 94843749.88, "last": 94843749.88, "buy": 94843749.88, "sell": 94843749.88, "symbol": "ARS"}
  // ... more currencies
}

The 15m field is a lagged reference price, not a 15-minute candle — last is the more current value, though they're often identical. The ARS entry shows Bitcoin at roughly 94.8 million Argentine pesos: a number that climbs week over week and makes this endpoint quietly useful for illustrating currency devaluation without any extra data source.

Bitcoin is currently worth approximately AUD 97,676 (or about 94.8 million Argentine pesos, if that framing is more useful). The Blockchain.info ticker covers over a dozen fiat currencies in a single unauthenticated call.

Checking the balance and activity of a Bitcoin address

"How much Bitcoin is sitting at address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa, and has it ever been spent?" /rawaddr/{address} returns balance totals, transaction count, and recent transactions for any address.

The genesis address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa — the very first Bitcoin address, from Satoshi Nakamoto's block 0 in January 2009 — is the most instructive first call on this endpoint. It has never sent a single satoshi.

curl "https://blockchain.info/rawaddr/1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa" | head -c 10000
{
  "hash160": "62e907b15cbf27d5425399ebf6f0fb50ebb88f18",
  "address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
  "n_tx": 62349,
  "n_unredeemed": 73422,
  "total_received": 10717585453,
  "total_sent": 0,
  "final_balance": 10717585453,
  "txs": [
    {
      "hash": "299d74b7f98cea40698fb019ee03a1b099527407d8bb6491cc471786b7c7506c",
      "fee": 328,
      "time": 1775660277,
      "block_height": 944203
    }
  ]
}

total_sent: 0 paired with 62,349 incoming transactions tells a precise story: people have been sending Bitcoin to this address for over 15 years as tribute or by accident, and none of it has ever moved. n_unredeemed (73,422) exceeds n_tx (62,349) because some transactions sent multiple outputs to this address in a single hop — each output becomes its own UTXO, none ever spent. All amounts are in satoshis; divide by 100,000,000 for BTC. This address holds about 107.18 BTC that cannot be recovered.

Address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa — Satoshi Nakamoto's genesis address — has received 10,717,585,453 satoshis (about 107.18 BTC) across 62,349 transactions and has never spent a single satoshi. Those coins are effectively burned.

Decoding a raw Bitcoin transaction

"What happened in transaction 717046ba...?" /rawtx/{tx_hash} returns the fully decoded transaction: inputs, outputs, fee paid, timestamp, and the block it landed in.

curl "https://blockchain.info/rawtx/717046ba5c309eb86414cfe7b0ebd6b68d901c85ad67e34276e493e2334f61b0" | head -c 10000
{
  "hash": "717046ba5c309eb86414cfe7b0ebd6b68d901c85ad67e34276e493e2334f61b0",
  "ver": 2,
  "vin_sz": 1,
  "vout_sz": 4,
  "size": 378,
  "weight": 1404,
  "fee": 0,
  "lock_time": 0,
  "time": 1775653773,
  "block_index": 944188,
  "block_height": 944188,
  "double_spend": false,
  "inputs": [
    {
      "sequence": 4294967295,
      "script": "033c680e04...Foundry USA Pool #dropgold..."
    }
  ]
}

fee: 0 is the immediate giveaway that this is a coinbase transaction — the block reward a miner collects when they find a new block. Coinbase transactions have no prior input to draw from, so they have no fee. The inputs[0].script field encodes arbitrary data the miner embeds; in this case it contains "Foundry USA Pool", the mining operation that found block 944,188. Regular payment transactions always have fee > 0; if you see fee: 0, you are looking at a miner's reward collection, not a user transfer.

Transaction 717046ba... is a coinbase (block reward) transaction from Foundry USA Pool for block 944,188. It created new Bitcoin from the block subsidy — no sender, no fee, just a miner claiming their reward.

Pitfalls

One-line summary for the user

I can look up Bitcoin address balances, decode transactions, and retrieve current BTC prices in over a dozen fiat currencies using the Blockchain.info API — no API key required, Bitcoin only.