Skip to main content
Contract verification using Hardhat/Remix/Foundry also support using a single Etherscan API key for all chains
As of August 15th, 2025, the legacy Etherscan API V1 endpoints have been deprecated in favor of the new Etherscan API V2, which introduces a unified multichain experience across 60+ supported networks 🌈. You’ll see a deprecation error message like this if you’re still using V1:
{
   "status":"0",
   "message":"NOTOK",
   "result":"You are using a deprecated V1 endpoint, switch to Etherscan API V2."
}
All existing endpoints remain compatible once you update them to the V2 format.

How to Migrate

1

Create an Etherscan account

Sign up if you don’t have an account or if you’re using other explorers like BaseScan, BscScan, Polygonscan, etc.
2

Create an Etherscan API Key

Under your Etherscan API dashboard, create a new key. This key can be used to access all supported chains under API V2.
3

Migrating Endpoints from Etherscan API V1

Use https://api.etherscan.io/v2/api as your base path, and include a chainid for your target network (e.g., 1 for Ethereum).Before (V1):
https://api.etherscan.io/api?&action=balance&apikey=YourEtherscanApiKey
After (V2):
https://api.etherscan.io/v2/api?chainid=1&action=balance&apikey=YourEtherscanApiKey
4

Migrating Endpoints from Other Explorers

Use the same base path (https://api.etherscan.io/v2/api) and include a chainid for the relevant chain from this list, in this case 137 for Polygon.Pass in your Etherscan API key instead of the old explorer-specific one.Before (PolygonScan V1):
https://api.polygonscan.com/api?&action=balance&apikey=YourPolygonscanApiKey
After (V2):
https://api.etherscan.io/v2/api?chainid=137&action=balance&apikey=YourEtherscanApiKey