Blockchain.com Data API
blockchain.info · Finance
Bitcoin blockchain data — transaction info, block details, wallet balances, exchange rates, and unspent outputs. Free, no API key for most endpoints.
Authentication
No authentication requiredFree to use with no key needed.
Sample Requests
GET
Get BTC/USD rate
Get Bitcoin exchange rates in all major currencies.
https://blockchain.info/ticker
Hover any highlighted part to learn what it does
curl -X GET "https://blockchain.info/ticker"
import requests
response = requests.get(
"https://blockchain.info/ticker",
)
print(response.json())const url = 'https://blockchain.info/ticker'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://blockchain.info/ticker"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://blockchain.info/ticker")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://blockchain.info/ticker";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));
GET
Get wallet balance
Get the satoshi balance of the Bitcoin genesis block address.
https://blockchain.info/q/addressbalance/1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf
Hover any highlighted part to learn what it does
curl -X GET "https://blockchain.info/q/addressbalance/1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf"
import requests
response = requests.get(
"https://blockchain.info/q/addressbalance/1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf",
)
print(response.json())const url = 'https://blockchain.info/q/addressbalance/1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf'; const response = await fetch(url); const data = await response.json(); console.log(data);
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://blockchain.info/q/addressbalance/1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://blockchain.info/q/addressbalance/1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://blockchain.info/q/addressbalance/1A1zP1eP5QGefi2DMPTfTL5SLmv7Divf";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- No API key needed
- BTC price: GET https://blockchain.info/ticker
- Address balance (satoshis): GET https://blockchain.info/q/addressbalance/{address}
- Latest block: GET https://blockchain.info/latestblock
- Transaction: GET https://blockchain.info/rawtx/{txhash}