Skip to main content

Welcome to the Mempool API

The Mempool API is a powerful RESTful API that provides comprehensive access to Bitcoin blockchain data, mempool statistics, transaction information, mining data, and more. The API is designed for developers building Bitcoin applications, explorers, analytics tools, and wallets.
The Mempool API is completely free and does not require authentication for public endpoints. All data is returned in JSON format.

Base URL

The official Mempool API is available at:
https://mempool.space/api/v1/
curl https://mempool.space/api/v1/fees/recommended

Network Variations

The Mempool API supports multiple Bitcoin networks:
NetworkBase URL
Mainnethttps://mempool.space/api/v1/
Testnethttps://mempool.space/testnet/api/v1/
Testnet4https://mempool.space/testnet4/api/v1/
Signethttps://mempool.space/signet/api/v1/
Liquidhttps://liquid.network/api/v1/

Response Format

All API responses are returned in JSON format with appropriate HTTP status codes. The API uses standard RESTful conventions:

Success Responses

  • 200 OK - Request succeeded, data returned
  • 204 No Content - Request succeeded, no data to return

Error Responses

Errors are returned with appropriate HTTP status codes and a JSON error object:
{
  "error": "Invalid address"
}

Common HTTP Status Codes

Status CodeMeaningDescription
200OKRequest successful
204No ContentRequest successful, no data
400Bad RequestInvalid parameters or request format
404Not FoundResource not found (transaction, block, etc.)
405Method Not AllowedEndpoint not available with current backend
413Payload Too LargeRequest data exceeds limits
422Unprocessable EntityRequest valid but cannot be processed
500Internal Server ErrorServer error occurred
503Service UnavailableService temporarily unavailable (e.g., syncing)

API Categories

The Mempool API is organized into several categories:

Transactions

Query transaction data, status, outspends, and broadcast transactions

Addresses

Get address balances, transaction history, and UTXOs

Blocks

Access block data, headers, and transaction lists

Mining

Mining pool statistics, hashrate data, and difficulty adjustments

Fees

Real-time fee recommendations and mempool blocks

Mempool

Current mempool state and recent transactions

Lightning Network

Lightning Network nodes, channels, and statistics

Statistics

Historical statistics over various time periods

Data Formats

Transaction IDs (txid)

Transaction IDs are 64-character hexadecimal strings:
15e10745f15593a899cef391191bdd3d7c12412cc4696b7bcb669d0feadc8521

Block Hashes

Block hashes are 64-character hexadecimal strings:
000000000000000000076c036ff5119e5a5a74df77abf64203473364509f7732

Addresses

Bitcoin addresses support multiple formats:
  • Legacy (P2PKH): 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
  • P2SH: 3J98t1WpEZ73CNmYviecrnyiWrnqRhWNLy
  • Bech32 (native SegWit): bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4
  • Bech32m (Taproot): bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297

Amounts

All Bitcoin amounts are returned in satoshis (1 BTC = 100,000,000 satoshis).

Timestamps

All timestamps are Unix timestamps (seconds since January 1, 1970 UTC).

Self-Hosted Instances

You can run your own Mempool instance with the same API. The Mempool project is open-source:
  • GitHub: mempool/mempool
  • Docker: Available via Docker for easy deployment
  • Configuration: Fully configurable with your own Bitcoin node
When running a self-hosted instance, the API base path is /api/v1/ from your server’s root domain.

Getting Started

1

Choose Your Endpoint

Browse the API documentation to find the endpoint that matches your needs.
2

Make a Request

Use any HTTP client to make a GET or POST request to the endpoint.
3

Handle the Response

Parse the JSON response and integrate it into your application.
4

Monitor Rate Limits

Be mindful of rate limits to ensure consistent API access.

Support and Resources

GitHub Repository

View source code, report issues, and contribute

Twitter

Follow for updates and announcements

Telegram

Join the community discussion

API Status

Check current API status and network health

Next Steps

Authentication

Learn about API access and authentication

Rate Limits

Understand rate limiting policies

Build docs developers (and LLMs) love