Block Explorer API
A programmatic way to read transactions, addresses and mempool state without running a node.
Basically
A block explorer API lets software read Bitcoin data. You can look up transactions, addresses, blocks and the current mempool.
Key Takeaways
- A block explorer API exposes indexed blockchain data, including transactions, addresses, UTXOs, blocks and mempool state, over HTTP. Applications can query on-chain information without running their own full node and indexer.
- Popular Bitcoin explorer APIs include Blockstream's Esplora, which is open source under the MIT licence, Mempool.space, which is open source under AGPL-3.0, and the proprietary multi-chain services Blockchair and BlockCypher. Each offers different rate limits, endpoint coverage and trust trade-offs.
- A third-party block explorer API creates privacy and trust risks. Its operator sees your IP address, every address you query and every transaction you look up. Self-hosting an open-source explorer eliminates this leak entirely.
What Is a Block Explorer API?
A block explorer API is a RESTful, and sometimes WebSocket-based, interface that gives software access to blockchain data. A blockchain explorer presents this data in a web interface for people, while a block explorer API returns the same data as structured JSON for applications. The API is the machine-readable backend behind the human-readable explorer frontend.
Block explorer APIs sit on top of a blockchain indexer. This service reads raw data from a full node, organises it into queryable databases and exposes it through HTTP endpoints. Without an indexer, answering a simple question like "what is the balance of this address?" would require scanning every block in the chain. The API layer hides this complexity and turns millisecond database lookups into simple HTTP GET requests.
Developers use block explorer APIs as their primary interface to blockchain data when building wallets, payment processors, analytics dashboards and compliance tools. For many applications, these APIs are the first, and sometimes only, connection to the Bitcoin network.
How It Works
A block explorer API follows a standard request-response pattern. The client sends an HTTP request to a specific endpoint with parameters, such as a transaction ID, an address or a block height. The server returns structured JSON containing the requested data. Most APIs follow RESTful conventions with predictable URL patterns.
Common Endpoints
Most block explorer APIs expose a consistent set of core endpoints, although each provider has its own URL structure:
Request and Response Example
A typical API call to look up an address's UTXOs follows this pattern:
The response includes the transaction ID, output index, confirmation status and value in satoshis for each unspent output. A wallet application would use this data to calculate the address balance and select inputs for new transactions using a coin selection algorithm.
REST vs WebSocket Interfaces
Most block explorer APIs provide a REST interface for on-demand queries. The client sends a request and receives a response. This works well for lookups like checking a balance or fetching transaction details.
Some APIs also offer WebSocket connections for real-time data. Mempool.space, for example, exposes a WebSocket endpoint at wss://mempool.space/api/v1/ws that supports subscriptions to live data, including new blocks, mempool updates and address activity. Applications can receive instant notifications when a transaction confirms or network conditions change, without repeatedly polling REST endpoints.
Blockstream Esplora
Blockstream's Esplora is an open-source block explorer under the MIT licence, with a well-documented REST API available at blockstream.info/api/. The backend uses esplora-electrs, a Rust-based indexer, to process data from Bitcoin Core.
Esplora supports Bitcoin mainnet, testnet, signet and the Liquid Network, with network-specific API paths such as /testnet/api/ for testnet. Its public instance applies rate limiting of approximately 50 requests per second with a burst allowance of 100 requests. The API is designed with privacy in mind and does not track users or maintain persistent logs.
Esplora is fully open source, so anyone can self-host it alongside their own full node. Self-hosting eliminates reliance on Blockstream's infrastructure entirely.
Mempool.space
Mempool.space provides both a REST API and a WebSocket interface, with real-time mempool and fee data as its defining strength. The /v1/fees/recommended endpoint returns fee rate estimates for different confirmation targets: fastest, half-hour, hour, economy and minimum. Many wallet applications use it as their go-to source for fee estimation.
The public API enforces rate limits of approximately 10 requests per second and returns HTTP 429 errors when they are exceeded. Repeated violations can result in IP bans. Enterprise users can sponsor the project for higher limits.
Mempool.space is open source under the AGPL-3.0 licence and can be self-hosted on platforms like Umbrel and RaspiBlitz. Self-hosted instances have no rate limits, making them ideal for applications that need high query throughput.
Blockchair
Blockchair is a proprietary multi-chain explorer API supporting over 17 blockchains, including Bitcoin, Ethereum, Litecoin and several others. Its API is accessed at api.blockchair.com and provides SQL-like query capabilities for filtering and aggregating blockchain data.
The free tier is limited to 1,440 calls per day, with a soft limit of 5 requests per second and a hard limit of 30 requests per minute. Some endpoints have higher request costs, so a single complex query can consume multiple API credits. Paid tiers range from a pay-as-you-go model for short-term projects to enterprise plans with dedicated infrastructure and SLAs.
BlockCypher
BlockCypher offers a multi-chain API supporting Bitcoin, Litecoin, Dogecoin, Dash and Ethereum. Its free tier allows up to 3 requests per second, 100 requests per hour and 2,000 queries per day.
BlockCypher's confidence factor for unconfirmed transactions is a distinguishing feature. The API returns a probability estimate of whether a zero-confirmation transaction will be included in the next block, based on double-spend detection heuristics. Paid plans start at $119 per month, with a 10% discount for Bitcoin payments.
Self-Hosted vs Third-Party APIs
The choice between running your own block explorer API and relying on a third-party service involves trade-offs across privacy, reliability, cost and operational complexity.
Production applications handling user funds should run their own indexer. This removes the risk of a third-party provider returning incorrect data, going offline or censoring certain transactions. Open-source options like Esplora and Mempool.space make self-hosting practical even for small teams. Third-party APIs offer a fast path to getting started with prototyping, testing and low-volume applications.
A hybrid approach is also common. Your own node and indexer serve as the primary data source, with a third-party API as a fallback for redundancy. This pattern is especially useful during initial block download, when a fresh node is still syncing and cannot serve queries.
Why It Matters
Block explorer APIs connect applications to the Bitcoin blockchain. Nearly every Bitcoin application that is not a full node depends on some form of explorer API to read chain state. Wallets showing your balance, payment processors confirming a deposit and analytics tools charting network activity all rely on indexed blockchain data exposed through an API.
Block explorer APIs remain relevant for developers building on Bitcoin Layer 2 solutions like Spark because they can monitor on-chain entry and exit transactions. Most activity within Spark happens off-chain for speed and privacy, but the bridge transactions that move funds between Layer 1 and Layer 2 are visible on-chain and can be tracked through standard explorer APIs. The article on Electrum server architecture provides a deeper look at how different indexer backends compare in performance and resource requirements.
Privacy and IP Correlation
Every API request reveals information to the service operator. When you query an address, the operator learns that someone at your IP address is interested in that address. Over time, these queries build a profile. The operator can correlate your IP with the addresses you check, the transactions you look up and the fee estimates you request, which hint at when you are about to send a transaction.
Such metadata is valuable for chain analysis. Even without knowing your identity directly, an IP-to-address mapping can be combined with other data sources, such as exchange KYC records and ISP logs, to deanonymise users. Mitigations include routing API requests through Tor, using a VPN or self-hosting an explorer. Both Esplora and Mempool.space support Tor access on their public instances.
Trust and Data Integrity
A third-party API requires you to trust that the operator is running an honest node and returning accurate data. A malicious or compromised API could lie about transaction confirmations, omit UTXOs from address queries or return incorrect fee estimates. Applications handling significant funds face a meaningful risk.
Your own Bitcoin RPC interface lets you control the node and verify data against the consensus rules yourself. A third-party API is an opaque intermediary by comparison. Querying multiple independent APIs and cross-checking results can reduce this risk, but adds complexity. Running an Electrum server alongside your own node is a safer solution.
Rate Limits and Availability
Free tiers on third-party APIs impose strict rate limits. BlockCypher caps at 3 requests per second, Blockchair at 30 requests per minute and Mempool.space at approximately 10 requests per second. These limits are fine for personal projects but can become a bottleneck for production applications with many users.
Exceeding rate limits returns HTTP 429 errors, and repeated violations can result in temporary or permanent IP bans. Applications that depend on a single third-party API also face availability risk. Provider downtime leaves the application without access to blockchain data entirely. Production systems should either self-host or implement fallback logic across multiple providers.
Censorship and Filtering
Third-party API operators can choose to filter or censor certain transactions, addresses or blocks from their responses. Such filtering is rare among established providers, but it remains a structural risk of relying on an intermediary. A self-hosted explorer connected to your own full node is the only way to guarantee unfiltered access to blockchain data.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.