No Authentication Required
The Mempool API is designed to be publicly accessible and does not require authentication for standard read operations. This makes it easy to integrate Bitcoin data into your applications without managing API keys or tokens.All public endpoints are available without any authentication headers or API keys.
Public Endpoints
The following categories of endpoints are freely accessible:Read Operations
All GET endpoints are publicly accessible without authentication:- Transactions - Query transaction data, status, and outspends
- Addresses - Get address information, balances, and transaction history
- Blocks - Retrieve block data and headers
- Mining - Access mining statistics and pool information
- Fees - Get real-time fee recommendations
- Mempool - View current mempool state
- Lightning Network - Query Lightning Network data
- Statistics - Access historical statistics
Write Operations
Transaction Broadcasting
The API supports broadcasting transactions to the Bitcoin network without authentication:Package Submission
For advanced users, the API supports package submission (Bitcoin Core 28+):POST /txs/package
Backend Requirements
Backend Types
The Mempool backend can be configured with different Bitcoin data sources:| Backend | Description | Address Lookups |
|---|---|---|
| esplora | Mempool/electrs backend | ✅ Supported |
| electrum | Electrum server backend | ✅ Supported |
| none | Direct Bitcoin Core only | ❌ Not supported |
When the backend is set to
none (Bitcoin Core only), certain endpoints like address lookups return a 405 Method Not Allowed error.Endpoint Availability
Some endpoints require specific backend configurations:Address Endpoints (Requires esplora or electrum)
Example Error
Summary Endpoints (Requires esplora)
Esplora Only
Service-Specific Endpoints
Certain advanced features require additional service configuration:Acceleration Services
Acceleration Request
Historical Prices
Price data is only available on mainnet:Price Endpoint
CORS Support
The Mempool API includes full Cross-Origin Resource Sharing (CORS) support:All origins are allowed (
*), making the API accessible from any web application without CORS issues.Request Headers
No special headers are required for most requests:Standard Request
JSON POST Request
Transaction Broadcast
Self-Hosted API Access
If you’re running your own Mempool instance:Configure Your Backend
Set up
MEMPOOL.BACKEND in your configuration:esplora- Full functionality including address lookupselectrum- Full functionality via Electrum servernone- Limited to Bitcoin Core RPC capabilities
Set API URL Prefix
The default API prefix is
/api/v1/ and can be configured via MEMPOOL.API_URL_PREFIX.Security Considerations
No Sensitive Operations
The API does not expose any sensitive operations that would require authentication:- ✅ Read-only data access - Blockchain and mempool data is public
- ✅ Transaction broadcasting - Standard Bitcoin network operation
- ✅ No private data - API does not store user-specific information
- ✅ No write access - Cannot modify blockchain or database state
Input Validation
All inputs are validated using regex patterns:Validation Patterns
Rate Limiting
While no authentication is required, the API implements rate limiting to ensure fair usage. See the Rate Limits documentation for details.Best Practices
Use Appropriate HTTP Methods
Use Appropriate HTTP Methods
- Use
GETfor reading data - Use
POSTfor broadcasting transactions and submitting data - Handle
OPTIONSrequests for CORS preflight
Handle Errors Gracefully
Handle Errors Gracefully
Check HTTP status codes and parse error messages from the JSON response:
Respect Backend Limitations
Respect Backend Limitations
Check which backend your target instance is using and adjust your application accordingly. Some features require specific backends.
Cache Responses
Cache Responses
Many endpoints include cache headers. Respect these to reduce load:
Next Steps
Rate Limits
Learn about API rate limiting policies
API Reference
Explore available endpoints