← Protocols
Blockscout
01Description

Open-source block explorer and data API used by 3,000+ EVM chains. Exposes a REST v2 API, an Etherscan-compatible RPC API, an `eth_*` JSON-RPC proxy, contract verification, and a 1-click 'Autoscout' deployment for new chains.

02Best for
  • 01self-hosted explorer for app-chains and L2s
  • 02Etherscan-compatible API drop-in
  • 03indexed transaction/token/log data via REST
  • 04contract verification and source hosting
  • 05MCP-server backed onchain data for agents
03Install
  • # Hosted: use https://eth.blockscout.com (mainnet) or chain-specific instance like https://base.blockscout.com
  • # Self-host via docker-compose: git clone https://github.com/blockscout/blockscout && cd blockscout/docker-compose && docker compose up
  • # 1-click cloud deploy: https://eaas.blockscout.com (Autoscout)
  • # MCP server: pip install blockscout-mcp-server && blockscout-mcp-server --http --rest
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_BLOCKSCOUT_BASE_URLClientBase URL of the target Blockscout instance, e.g. https://eth.blockscout.com. REST v2 endpoints are under `/api/v2/...`, Etherscan-compatible RPC under `/api`, eth-rpc under `/api/eth-rpc`.
BLOCKSCOUT_API_KEYServerOptional PRO API key for higher rate limits and multichain endpoints (https://docs.blockscout.com/devs/apis/pro). Pass as `?apikey=` query param.
05Prompt snippet
Use Blockscout when you need a self-hostable explorer or an Etherscan-compatible API. Hit the REST v2 API for structured data: `GET ${BASE}/api/v2/addresses/0xabc.../transactions` returns paged decoded txs; `GET ${BASE}/api/v2/tokens/0x.../holders` returns token holders; `GET ${BASE}/api/v2/smart-contracts/0x...` returns verified source. For Etherscan-compat use `${BASE}/api?module=account&action=tokentx&address=0x...&apikey=$BLOCKSCOUT_API_KEY`. For raw chain access use `${BASE}/api/eth-rpc` as a JSON-RPC URL drop-in. To launch an explorer for a new chain, use Autoscout (eaas.blockscout.com) — supply RPC URL, chain ID, and currency symbol, and it provisions a managed instance.
06Gotchas
  • REST v2 (`/api/v2`) and the Etherscan-compatible RPC API (`/api`) are different schemas — do not mix endpoints; v2 is the canonical, evolving API while `/api` is frozen for compatibility.
  • Rate limits on the public hosted instances are aggressive; production apps should self-host or use the Blockscout PRO API with `BLOCKSCOUT_API_KEY` to avoid 429s.
  • Each chain has its own Blockscout subdomain (e.g. `base.blockscout.com`, `gnosis.blockscout.com`) — there is no single canonical host; pin per-chain base URLs in config.
  • Contract verification supports both standard JSON input and Sourcify mirroring; verifying via `/api/v2/smart-contracts/${addr}/verification/via/sourcify` is the most reliable path for existing Sourcify entries.
  • The `eth_getLogs` proxy enforces a max block range (typically 10k blocks); paginate or use the REST v2 `/addresses/{addr}/logs` endpoint for archive-scale queries.
  • Self-hosted Blockscout requires an archive node and substantial Postgres storage; for low-traffic app-chains Autoscout is dramatically cheaper than running it yourself.
07Alternatives