Free Bitcoin API for Developers

Open source. Self-hosted. Apache-2.0 licensed. No node required.

Your node. Your API.
Your rules.

Turn your Bitcoin Core node into a production-ready REST API. One pip install. 73 endpoints. Zero required third-party services.

$ pip install satoshi-api
$ satoshi-api
INFO  Satoshi API running at http://localhost:9332
INFO  73 endpoints ready. Your data stays here.
Live from bitcoinsapi.com
Loading live fee data...
73 endpoints < 50ms response time Open source (Apache-2.0) Monitored by UptimeRobot

Not your node, not your data.

Bitcoin was built to remove middlemen. Your API should be too.

Sovereign

Third-party APIs can change terms, raise prices, or shut down. Satoshi API runs on your machine. You set the rules.

Private

Your queries never leave your infrastructure. No analytics. No tracking. No data harvesting. Just you and your node.

Fast

No network hop to a remote server. Your API talks directly to your local Bitcoin Core. Latency measured in milliseconds, not continents.

A clean REST layer for your Bitcoin node.

Bitcoin Core's JSON-RPC is powerful but awkward. Raw responses, no caching, no rate limiting, no input validation. Satoshi API wraps it in a clean REST interface with typed responses, smart caching, and analyzed data. Instead of calling estimatesmartfee five times and doing math, you get a single endpoint with human-readable recommendations in sat/vB.

bitcoin-mcp
AI agent interface (Claude, GPT)
Satoshi API
REST API (this project)
bitcoinlib-rpc
Typed Python RPC client
Bitcoin Core
Your full node

Everything Bitcoin Core is missing as an API server.

Production features, not raw RPC dumps.

Analyzed Data

Fee recommendations in sat/vB. Mempool congestion scores. Block weight utilization. Not raw hex and BTC/kVB.

Smart Caching

Reorg-aware TTL caching. Deep blocks cached 1 hour, tip blocks 30 seconds, fees every 10 seconds. Near-zero stale data risk.

Rate Limiting

Four tiers with sliding-window per-minute and daily limits. Expose your API safely without worrying about abuse.

API Key Auth

Optional API keys via X-API-Key header. SHA256 hashed storage. Tiered access control. Anonymous read access for public use.

Input Validation

Txids validated as 64-hex before hitting RPC. Block heights checked for bounds. RPC errors mapped to proper HTTP status codes.

Standard Envelope

Every response: { data, meta }. Every error: { error }. Request IDs on everything. Consistent and predictable.

AI-Agent Ready

Pair with bitcoin-mcp to give Claude or GPT direct access to your node via MCP tool calls.

L402 Lightning Payments

Optional L402 support for Bitcoin-native API access. Clients pay per-request via Lightning. Available as an extension.

Self-Hosted

Your node, your data, your API. No third party sees your queries. No vendor lock-in. No surprise pricing changes. Apache-2.0 licensed.

Production Ready

356 tests (335 unit + 21 e2e). Docker support. Cloudflare Tunnel deployment. Structured access logging. Graceful shutdown.

Clean JSON. Real Bitcoin data. Your server.

73 endpoints across blocks, transactions, addresses, mempool, fees, network, and raw operations.

Request

GET /api/v1/blocks/latest

Response

{
  "data": {
    "hash": "00000000000...",
    "height": 885421,
    "tx_count": 3847,
    "size": 1648231
  },
  "meta": {
    "cached": false,
    "node": "local"
  }
}

Explore all endpoints →

Developers who run their own nodes.

And those curious enough to start.

Node Operators

You run a node already. Check fees, monitor the mempool, build a dashboard. Point at your node, done.

curl localhost:9332/api/v1/mempool
# Congestion level, fee buckets,
# next-block minimum fee

Wallet and App Developers

Building a wallet, payment processor, or Bitcoin app? Fee estimates, broadcast transactions, look up UTXOs. All validated and typed.

curl -X POST localhost:9332/api/v1/broadcast \
  -H "X-API-Key: sk_..." \
  -d '{"hex": "0200000001..."}'

AI Agent Builders

Give your AI assistant real-time Bitcoin data. Your node answers directly via MCP.

# claude desktop config
"bitcoin": {
  "command": "bitcoin-mcp",
  "env": {"SATOSHI_API_URL":
    "http://localhost:9332"}
}

Data and Analytics

Pull block stats, mining data, and fee trends into your analytics pipeline. JSON responses, consistent format.

curl localhost:9332/api/v1/mining
# Difficulty, hashrate, next
# retarget height, blocks until

Privacy-Focused Users

Third-party APIs correlate your address lookups with your IP. Self-hosted means zero data leakage. Query your own node, keep your privacy.

Educators and Researchers

Teaching Bitcoin internals? The interactive docs at /docs let students explore blocks, transactions, and the mempool with live data.

73 Endpoints

Blocks, transactions, fees, mempool, mining, network, prices, streams.

MethodEndpointDescription
GET/healthNode reachability check
GET/statusFull node status (sync, peers, disk)
GET/blocks/latestLatest block analysis
GET/blocks/tip/heightCurrent chain height
GET/blocks/tip/hashCurrent tip block hash
GET/blocks/{height_or_hash}Block by height or hash
GET/blocks/{height}/statsDetailed block statistics
GET/blocks/{hash}/txidsTransaction IDs in a block
GET/blocks/{hash}/txsFull transactions in a block
GET/blocks/{hash}/headerRaw block header
GET/tx/{txid}Transaction analysis (fees, SegWit, Taproot)
GET/tx/{txid}/rawRaw decoded transaction
GET/tx/{txid}/hexTransaction as hex string
GET/tx/{txid}/statusConfirmation status
GET/tx/{txid}/outspendsSpending status of each output
GET/utxo/{txid}/{vout}UTXO lookup (spent/unspent)
POST/decodeDecode raw transaction hex
POST/broadcastBroadcast signed transaction
GET/feesFee estimates (all targets)
GET/fees/recommendedHuman-readable fee recommendation
GET/fees/{target}Fee for specific confirmation target
GET/fees/landscapeShould I send now or wait? Decision engine
GET/fees/estimate-txTransaction size and fee cost estimator
GET/fees/historyHistorical fee rates and cheapest hour
GET/fees/mempool-blocksFee distribution by projected blocks
GET/mempoolMempool analysis (congestion, fee buckets)
GET/mempool/infoRaw mempool info
GET/mempool/tx/{txid}Single mempool entry
GET/mempool/txidsAll mempool transaction IDs
GET/mempool/recentRecently added mempool entries
GET/miningMining stats (difficulty, hashrate, retarget)
GET/mining/nextblockNext block template analysis
GET/networkNetwork info (connections, relay fee)
GET/network/forksChain tips and fork detection
GET/network/difficultyCurrent difficulty and retarget info
GET/network/validate-address/{addr}Validate a Bitcoin address
GET/pricesBTC price in 6 fiat currencies Extended
GET/stream/blocksReal-time new block events (SSE)
GET/stream/feesLive fee rate updates every 30s (SSE)
GET/address/{address}Address balance and UTXO summary Extended
GET/address/{address}/utxosList unspent outputs for an address Extended
POST/registerSelf-serve API key registration
GET/tools/exchange-compareCompare exchange prices and fees Extended

All endpoints prefixed with /api/v1. Interactive docs at /docs (Swagger UI) and /redoc.

Follow progress on GitHub.

From zero to Bitcoin data in 60 seconds.

Option 1: Use the hosted API (no setup)

No node, no install, no signup. Just start making requests:

# Get current fee recommendations
curl https://bitcoinsapi.com/api/v1/fees/recommended

# Latest block analysis
curl https://bitcoinsapi.com/api/v1/blocks/latest

# Mempool congestion
curl https://bitcoinsapi.com/api/v1/mempool

# Mining stats
curl https://bitcoinsapi.com/api/v1/mining

No API key needed for GET requests. Try all 73 endpoints in the interactive playground.

Option 2: Get a free API key (10x higher limits)

Unlock 10,000 requests/day and POST access. Takes 5 seconds:

Option 3: Self-host on your own node

Run the full API on your own Bitcoin Core node. Unlimited requests, full privacy.

# Install
pip install satoshi-api

# Configure (point at your node)
export BITCOIN_RPC_USER=your_user
export BITCOIN_RPC_PASSWORD=your_password

# Run
satoshi-api
# API at http://localhost:9332
# Docs at http://localhost:9332/docs

Also available via Docker: docker compose up -d. Requires Bitcoin Core with server=1 and Python 3.10+. txindex=1 recommended.

Python SDK

Use the Python SDK for typed access to all endpoints:

pip install satoshi-api-sdk

Source: github.com/Bortlesboat/bitcoin-api/tree/main/sdk

Free to explore. Upgrade when you are ready.

Self-host for free forever, or use the hosted API at bitcoinsapi.com.

Hosted API

Free
  • No node needed
  • 1,000 requests/day (no signup)
  • Get a free API key for 10,000/day
  • All GET endpoints + POST with key
Try it Now

Enterprise — Need higher limits? Contact api@bitcoinsapi.com for enterprise pricing.

You have options. Here is why this one exists.

FeatureSatoshi APIRaw RPCHosted APIs
Setup time3 linesAlready thereSign up + API key
Self-hostedYesYesNo
PrivacyYour node, your dataYour nodeThey see your queries
Analyzed dataFee recs, congestion, analysisRaw values onlyVaries
CachingReorg-aware TTLNoneVaries
Rate limitingBuilt-in, tieredNoneYes (their limits)
Input validationBefore RPC callNoneYes
Cost at scale$0 (self-host)$0$50-500+/mo
AI agent supportMCP readyNoNo
Vendor lock-inNone (Apache-2.0)NoneYes

Starting with an API. Building toward Bitcoin's data layer.

Now — REST API

73 endpoints. Production-ready. pip installable.

Done — WebSocket Streaming

Real-time block and mempool event feeds via /ws.

Next — Historical Analytics

Time-series queries across Bitcoin's full history.

Vision — The Complete Bitcoin Data Suite

Full data infrastructure for builders, researchers, and institutions.

Follow the journey on GitHub →

From zero to Bitcoin data in 60 seconds.

No signup, no install. Just curl and go.