Etherscan API logo

Etherscan API

Etherscan API

Etherscan API provides Ethereum mainnet block explorer data — transaction history, token holdings, contract source code, internal transactions, ETH gas tracker.

Visit site ↗Documentation ↗Health checked 9h ago
Use it when

De-facto Ethereum block explorer

Watch for

Ethereum mainnet only (other chains use respective *scan)

First check

Create a free API key at etherscan.io. GET https://api.etherscan.io/api?module=account&action=balance&address=0x...&apikey=...

Auth
api_key
CORS
?
HTTPS
Yes
Signup
?
Latency
258 ms
Protocol
REST
Pricing
freemium

Uptime · 30-day window

Probes: 1Uptime: 100%Avg latency: 258ms
01

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.

02

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
03

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
04

Example request

Generic template — replace <endpoint> with the real path from the docs.
curl https://etherscan.io/<endpoint> \
  -H "Authorization: Bearer $API_KEY"
# Some providers use X-Api-Key instead — verify in the docs.
05

Getting started

Create a free API key at etherscan.io. GET https://api.etherscan.io/api?module=account&action=balance&address=0x...&apikey=...

06

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...

07

Technical details

CORS: ?HTTPS: YesSignup: ?Open source: No
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
08

Tags