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 After (V2):
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):4
Migrating Endpoints from Other Explorers
Use the same base path (After (V2):
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):