How to Migrate Your Etherscan API Calls to Blockscout

If your app uses Etherscan-style endpoints, switching to Blockscout is simple. Most calls are fully compatible, and in many cases the only change you’ll need is the base URL. This guide walks through the process step-by-step so you can migrate in minutes.

How to Migrate Your Etherscan API Calls to Blockscout

Developers need reliable access to blockchain data. One of Blockscout’s core goals is to support builders with stable, open, multichain APIs that work the way you expect, without requiring major rewrites.

Recently, many developers building on high-growth networks have been affected by changes to the Etherscan free API tier. Several chains are no longer included in the free plan, including ones support by Blockscout such as Base Mainnet, Base Sepolia, OP Mainnet, and OP Sepolia. These adjustments have prompted teams across these ecosystems to look for dependable API alternatives that remain compatible with existing workflows.

If your app uses Etherscan-style endpoints today, switching to Blockscout is simple. Most calls are fully compatible, and in many cases the only change you’ll need is the base URL.

This guide walks through the process step-by-step so you can migrate in minutes.

Why Use the Blockscout API

Blockscout APIs are designed for clarity and predictability.

You get:

  • Free API keys with instant access
  • Support for most EVM chains
  • Familiar Etherscan-style endpoints
  • Stable usage limits
  • A fully open-source explorer and API implementation
  • Community-driven improvements

Because the API follows established conventions, developers can migrate quickly with minimal code changes.


1. Update the Base URL

Blockscout follows the same API structure and request format developers are familiar with, so in most cases migrating simply means updating the base URL to the Blockscout explorer for your chain.

Here are examples of common networks:

Ethereum Mainnet:
https://eth.blockscout.com/api

Optimism Mainnet:
https://explorer.optimism.io/api

Base Mainnet:
https://base.blockscout.com/api

Once you switch the base URL, most modules, actions, and parameters work exactly the same. Each explorer also provides live API docs at /api-docs, for example: https://eth.blockscout.com/api-docs

You can find the full list of supported networks here:
https://docs.blockscout.com/devs/apis/supported-networks

Optional: Programmatic Network List

For developers who need a machine-readable list of all Blockscout explorers and their API endpoints, you can reference the full JSON directory here:

https://github.com/blockscout/chainscout/blob/main/data/chains.json


2. Account Endpoints

Get normal transactions

- https://api.etherscan.io/api?module=account&action=txlist&address=0x...&apikey=KEY
+ https://eth.blockscout.com/api?module=account&action=txlist&address=0x...&apikey=KEY

Get internal transactions

- https://api.etherscan.io/api?module=account&action=txlistinternal&address=0x...&apikey=KEY
+ https://eth.blockscout.com/api?module=account&action=txlistinternal&address=0x...&apikey=KEY

No changes besides the host.


3. Contract Endpoints

Get contract ABI

- https://api.etherscan.io/api?module=contract&action=getabi&address=0x...
+ https://eth.blockscout.com/api?module=contract&action=getabi&address=0x...

Get verified source code

- https://api.etherscan.io/api?module=contract&action=getsourcecode&address=0x...
+ https://eth.blockscout.com/api?module=contract&action=getsourcecode&address=0x...

Blockscout verifies contracts across many chains, and ABI/source endpoints are fully supported.


4. Logs and Event Queries

- https://api.etherscan.io/api?module=logs&action=getLogs&fromBlock=...
+ https://eth.blockscout.com/api?module=logs&action=getLogs&fromBlock=...

Use the same params you already know.


5. Proxy (RPC-style) Endpoints

Blockscout supports the same proxy-style calls for RPC-like responses.

Block by number

- https://api.etherscan.io/api?module=proxy&action=eth_getBlockByNumber&tag=latest
+ https://eth.blockscout.com/api?module=proxy&action=eth_getBlockByNumber&tag=latest

Transaction by hash

- https://api.etherscan.io/api?module=proxy&action=eth_getTransactionByHash&txhash=0x...
+ https://eth.blockscout.com/api?module=proxy&action=eth_getTransactionByHash&txhash=0x...

Receipt by hash

- https://api.etherscan.io/api?module=proxy&action=eth_getTransactionReceipt&txhash=0x...
+ https://eth.blockscout.com/api?module=proxy&action=eth_getTransactionReceipt&txhash=0x...

These require no structural changes.


6. Full Etherscan Migration Example

If your app already uses Etherscan-style requests, migrating to Blockscout usually requires changing a single line.

Before (Etherscan):

const axios = require("axios");

const api = axios.create({
  baseURL: "https://api.etherscan.io/api",
  params: { apikey: process.env.ETHERSCAN_KEY }
});

After (Blockscout):

const axios = require("axios");

const api = axios.create({
  baseURL: "https://eth.blockscout.com/api",
  params: { apikey: process.env.BLOCKSCOUT_KEY }
});

Usage remains identical

async function fetchTxs(address) {
  const { data } = await api.get("", {
    params: {
      module: "account",
      action: "txlist",
      address,
      sort: "desc",
      offset: 10,
    },
  });

  return data;
}

The migration path is intentionally smooth. If your code already uses Etherscan patterns, this requires almost no modification.


Tips for a Smooth Migration

Use your API key

Blockscout provides free API keys with predictable limits. You can generate an API key on supported explorers, for example on the Ethereum API Docs, Base API Docs, and Optimism API Docs.

Check chain-specific quirks

Some newer networks may have slightly different behavior based on underlying node implementations. These are documented in each chain’s explorer.

Full Documentation

You can explore all endpoints, modules, and parameters here:
https://docs.blockscout.com/devs/apis

Developers familiar with Etherscan’s structure will find the transition intuitive. If you’d like a deeper migration guide for a specific framework or chain, feel free to reach out, we’re happy to help.