Overview

Etherscan's API gives programmatic access to Ethereum blockchain data — account balances, transaction histories, token transfers, smart contract ABIs, and gas prices. It's the go-to source for on-chain data without running your own node.

Beginner Tip

The free tier allows up to 5 calls/second and 100,000 calls/day — more than enough to start; register at etherscan.io/apis to get your free key.

Available Data

The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.

Use case: Integrate ethereum explorer api data into web and mobile applications
Etherscan data via REST API

Example Response

Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.

JSON Response · Illustrative
{
  "id": "bitcoin",
  "symbol": "btc",
  "current_price": 65432.1,
  "market_cap": 1280000000000,
  "price_change_24h": 1250.5,
  "price_change_percentage_24h": 1.95,
  "total_volume": 28500000000
}

Field Reference

status '1' means the request succeeded; '0' indicates an error — check the message field for details.
message Human-readable status, typically 'OK' on success or an error description on failure.
result The actual data returned — a string for simple queries (e.g. balance in Wei) or an array of objects for lists.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://api.etherscan.io/api?module=account&action=balance&address=0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe&tag=latest&apikey=YOUR_API_KEY";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

NOTOK – Invalid API Key API key is missing, incorrect, or not yet activated
Append '&apikey=YOUR_KEY' to every request URL; keys activate immediately after registration at etherscan.io/myaccount.
Max rate limit reached Exceeding 5 requests per second on the free plan
Add a delay between requests or use Promise queuing; consider upgrading to a paid plan for higher throughput.
Result is 'Error! Invalid address format' Ethereum address is not checksummed or is malformed
Use all-lowercase or EIP-55 checksummed addresses; verify the address is exactly 42 characters including the '0x' prefix.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS YES
Category Blockchain
Difficulty Intermediate
Listing details not endpoint-verified

Related Tags

Similar APIs

View All →