Etherscan API
Etherscan API
Etherscan API provides Ethereum mainnet block explorer data — transaction history, token holdings, contract source code, internal transactions, ETH gas tracker.
De-facto Ethereum block explorer
Ethereum mainnet only (other chains use respective *scan)
Create a free API key at etherscan.io. GET https://api.etherscan.io/api?module=account&action=balance&address=0x...&apikey=...
Uptime · 30-day window
About this API
Etherscan is one of the most important infrastructures in the Ethereum ecosystem — all transactions, all contract source code, all token info is queryable here. Regular users browse etherscan.io to view their transactions and wallets; developers use Etherscan API to integrate this data into their dApps / wallets / analytics tools. Common use cases: wallet apps displaying user transaction history and token balances, DeFi apps querying user past operations, smart contract audit tools fetching verified source code, gas price trackers showing real-time recommended fees. The same team operates explorers for all major EVM chains: BscScan (BNB Chain), PolygonScan, Arbiscan, Optimistic Etherscan, BaseScan, SnowTrace (Avalanche) — APIs are identical, facilitating multi-chain apps.
What you can build
- 1DeFi apps querying user transaction history
- 2Wallets fetching token balance and NFTs
- 3Smart contract audit fetching source code
- 4Real-time gas price display
- 5On-chain data tracking
Strengths & limitations
Strengths
- De-facto Ethereum block explorer
- Generous free tier (5 calls/sec)
- Companion versions for L2s (BscScan, PolygonScan, Arbiscan, etc.)
Limitations
- Ethereum mainnet only (other chains use respective *scan)
- Some complex queries lack API support — read chain directly
Example request
curl https://etherscan.io/<endpoint> \
-H "Authorization: Bearer $API_KEY"
# Some providers use X-Api-Key instead — verify in the docs.Getting started
Create a free API key at etherscan.io. GET https://api.etherscan.io/api?module=account&action=balance&address=0x...&apikey=...
FAQ
Are BscScan, PolygonScan API keys the same?+
No — each chain explorer has its own API key, but the API interfaces are identical (same team built them).
Can I get contract source code?+
Yes, if the contract is verified. GET ?module=contract&action=getsourcecode&address=0x...
Technical details
- Auth type
- api_key
- Pricing
- freemium
- Rate limit
- 免费 5 calls/秒;Pro 30 calls/秒
- Protocols
- REST
- SDKs
- python, javascript, typescript, go
- Response time
- 258 ms
- Last health check
- 5/12/2026, 7:37:23 AM