
Ethereum runs thousands of apps. Wallets, exchanges, games, and AI agents all read its data. Almost none of them run a full node. They call an Ethereum API instead.
An Ethereum API is the gateway between an app and the chain. It returns balances, token holdings, transaction history, and live events. You ask a question. It answers in clean JSON.
This guide explains what an Ethereum API is, in plain English. It covers the data you can read. It shows how tokens and events work. It helps you choose a provider with confidence.
New to crypto APIs in general? Our beginner's guide to crypto APIs covers the basics across every chain first.
An Ethereum API is a hosted service. It sits between your app and the Ethereum network. Your app sends a request. The service talks to the chain and returns an answer.
Under the hood, Ethereum speaks a format called JSON-RPC. Nodes accept method calls like eth_getBalance or eth_call. An Ethereum API exposes those methods through a managed endpoint. You skip running and syncing a node yourself.
Ethereum has two layers since 2022. The execution layer runs transactions and smart contracts. The consensus layer handles staking and block agreement. Most app data lives on the execution layer. That is the part an Ethereum API reads.
The account model in plain English. Everything on Ethereum lives at an address. A wallet is an address. A token contract is an address. A smart contract is an address too. You query data by naming the address you care about.
There are two account types. An externally owned account is a normal wallet. A contract account holds code, like a token or an app. Reads can target both. The address tells the API what kind of thing it is.
Different goals map to different parts of the API. This table is a quick starting point. Later sections explain each row.
| If you want | Start with |
|---|---|
| A wallet's ETH balance | A REST balance endpoint, or eth_getBalance |
| Token holdings (ERC-20) | A token balances endpoint with metadata |
| NFT holdings | An NFT or digital-asset endpoint |
| Transaction history | An indexed history or activity endpoint |
| Onchain events | Event logs via eth_getLogs |
| Live updates | WebSocket subscriptions (eth_subscribe) |
| Several of these at once | An all-in-one data provider |
| AI agent access | An MCP Server with scoped tools |
Ethereum data comes in a few clear shapes. Each has its own access pattern. Here is the map before we go deeper.
Two of these shape almost every app. Token data and event logs do the heavy lifting. The next two sections cover them in plain English.
A token on Ethereum is just a smart contract. The contract keeps a ledger of who owns what. Standards make these contracts predictable. An API can read any token that follows a standard.
ERC-20 is the standard for fungible tokens. Stablecoins, governance tokens, and most coins use it. Every unit is identical, like dollars. The contract tracks balances with a balanceOf method.
To show a wallet's tokens, an app reads many contracts. It checks the balance for each token address. Good APIs do this for you. One call returns a full token list with balances.
ERC-721 is the standard for NFTs. Each token has a unique id. ownerOf returns who holds a given id. tokenURI points to its image and traits.
ERC-1155 is a multi-token standard. One contract can hold many token types. It suits games and editions. It mixes fungible and non-fungible items in one place.
Why metadata matters. Raw balances are not enough for users. A balance of 1000000000 means little alone. You also need decimals, name, and symbol. That metadata turns a number into "1,000 USDC". A token-aware API returns both together.
ERC standards also run on Ethereum's Layer 2 networks. Base, Arbitrum, and Optimism use the same token rules. One EVM-ready API can read tokens across all of them. See our best crypto wallet APIs for a cross-chain view.
Every action on Ethereum can emit an event. A token transfer emits a Transfer event. A swap emits a swap event. These events become logs stored on the chain. Logs are the activity feed of Ethereum.
Logs explain what happened, in a readable way. A raw transaction only shows that code ran. A log says "this address sent 50 USDC to that address". Apps read logs to build history and alerts.
Each log has an address and a few topics. Topic zero is the event type, stored as a hash. Other topics hold indexed values, like sender and receiver. The data field holds the rest, like the amount.
You fetch logs with a method called eth_getLogs. You filter by contract address and event type. You also set a block range. The API returns every matching event in that window.
Decoding comes next. Raw logs are still encoded. You decode them with the contract's layout. Many APIs decode common events for you. You get clean fields like from, to, and value.
Logs power a lot of features. Wallet history reads Transfer logs for an address. Price tools read swap logs from pools. Alerts watch for one specific event in real time.
A transaction changes the chain. It sends ETH, moves tokens, or calls a contract. You sign it, then submit it through the API. The network includes it in a block.
Every transaction costs gas. Gas measures the work the network does. You pay for that work in ETH. Busy periods cost more. Quiet periods cost less.
Fees have two parts. Since 2021, the fee splits in two. A base fee is set by the network and burned. A priority fee is a tip for validators. You set a cap for each. Your wallet handles the math. This rule is called EIP-1559.
An API can report current fee levels. You read recent fees before you send. Then you pick a fee that lands reliably. This avoids stuck or overpriced transactions.
After a transaction lands, you read its receipt. The receipt shows success or failure. It lists the logs the transaction emitted. It also shows the gas actually used.
Different products need different data. Here are four common shapes.
Spotting your shape early saves work. It tells you which data and transport to pick.
Most reads share the same shape. Here is a balance request, using a neutral host.
POST https://api.example.com/v1/ethereum
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBalance",
"params": ["0xYourAddress", "latest"]
}
The method names what you want. The params name the address and the block. Your key rides in a header. Keys live on your server, never in client code.
Here is what comes back.
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1bc16d674ec80000"
}
That result is hexadecimal wei. Converted to ETH, it equals 2 ETH.
Balances always return in wei, the smallest unit. You divide by 10 to the 18th for ETH. Most APIs can return human units for you.
Apps reach Ethereum in three common ways. Each one fits a different job.
One note on names. Ethereum nodes expose JSON-RPC. Some providers also wrap common tasks in REST endpoints. Examples include token balances or wallet history. JSON-RPC sits closer to the chain. REST is often easier for app features.
| Transport | How it works | Best for | Trade-off |
|---|---|---|---|
| REST / JSON-RPC | Request and reply over HTTPS | Balances, history, one-off reads | Polling adds delay for live data |
| WebSocket | A live socket pushes updates | New blocks, pending txs, events | Needs reconnect handling |
| MCP | Tool calls from an AI agent | Agents reading Ethereum data | Scope and limits per tool |
WebSocket suits live apps. You subscribe to new blocks or a contract's events. The server pushes updates as they happen. You stop polling and save requests.
MCP is the newest option. It lets AI agents call data as named tools. An agent can ask for a wallet's balance. Read-only access is the safe default.
These three terms get mixed up. They solve different problems.
A node provider gives raw access to chain methods. You call JSON-RPC and read low-level results.
An indexer organizes raw data into app-level views. It builds history, balances, and decoded events.
A wallet or portfolio API goes further. It bundles balances, metadata, prices, history, and DeFi positions.
A simple read like eth_getBalance is easy. A full portfolio view is not. That means balances across Ethereum, Base, Arbitrum, and Optimism. It needs indexing, token metadata, and prices. It also needs spam filtering and DeFi decoding. A higher-level API does that work for you.
Most Ethereum API calls are reads. Reads need only an API key. Writes are different. A write sends a transaction to the chain.
You sign writes yourself. The signature uses your private key. You then submit the signed transaction. The provider relays the bytes. It never sees your private key.
This keeps a clean split. The provider moves data and transactions. You keep custody of keys. Custodial setups differ and need separate review.
A safe setup keeps the key on your server. Your frontend asks your backend for data. Your backend calls the Ethereum API with the key. It returns clean values to the frontend. The frontend never sees the key.
A short safety checklist:
Providers price access in a few common ways. Some count requests per second. Some count requests per month. Many use credits, where heavy methods cost more.
A simple balance read is cheap. A wide log query is not. Scanning many blocks costs more credits. Plan for your real traffic, not a demo.
Free tiers are great for testing. They run out under real load. Check the next tier before you build. A steep jump can surprise a growing app.
Model a busy month, not a quiet one. Add headroom for growth and traffic spikes.
A few factors separate a good fit from a bad one. Weigh them against your roadmap.
The table below is not a ranking. Each provider gets the same columns. Verify the details that matter for your app.
| Provider | Best known for | Useful when | Check before choosing |
|---|---|---|---|
| CoinStats Ethereum API | All-in-one wallet, token, and DeFi data | You want clean data without running nodes | Exact chain list, endpoints, and limits |
| Infura | Reliable Ethereum RPC at scale | You need dependable node access | Per-method credit weights and limits |
| Etherscan API | Explorer data: balances, transactions, and logs | You want quick reads and contract data | Rate limits and endpoint coverage |
| The Graph | Indexed onchain data through subgraphs | You query history and events often | Subgraph availability and query costs |
| Ankr | Multichain RPC with a free tier | You want a low-cost backup endpoint | Chain coverage and rate limits |
Here is a friendly first call. It reads a wallet balance. Swap in your own host, key, and address.
async function getBalance(address) {
try {
const res = await fetch("https://api.example.com/v1/ethereum", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-KEY": "YOUR_KEY",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_getBalance",
params: [address, "latest"],
}),
});
if (!res.ok) throw new Error("HTTP " + res.status);
const data = await res.json();
return data.result;
} catch (err) {
console.error("getBalance failed", err);
return null;
}
}
In production, also handle timeouts, retries, and rate limits. Convert wei to ETH before you show it.
Here is a small helper for that conversion.
function weiHexToEth(hexWei) {
return Number(BigInt(hexWei)) / 1e18;
}
This is fine for learning. For production, use a big-number library. Plain numbers lose precision on large balances.
Ethereum keeps getting easier to build on. Two shifts matter most for apps.
The Pectra upgrade went live in May 2025. It brought smart accounts through a rule called EIP-7702. A normal wallet can now batch actions and sponsor gas. Apps can hide some friction from users.
The Fusaka upgrade followed in December 2025. It expands data space for Layer 2 networks. Fees on rollups trend lower over time. More users will hold tokens across many chains.
AI agents are the next big reader of chain data. They call tools instead of reading docs. An MCP Server turns an Ethereum API into agent tools. Read-only defaults keep the blast radius small.
For example, CoinStats Crypto API ships an MCP Server. It exposes wallet, token, and DeFi data to agents. Other providers are moving the same way.
An Ethereum API turns a complex chain into simple requests. You read balances, tokens, events, and history without a node. A good provider hides the plumbing, not the choices.
Start with the data your app truly needs. Most apps begin with balances and tokens. Add events when you need history or alerts. Add writes only when you send transactions.
Then pick a provider that fits your chains and budget. Test it against real traffic, not a demo. The one whose limits and coverage match your numbers wins.
An Ethereum API is a hosted gateway to the Ethereum blockchain. It lets apps read data and send transactions without running a node. Most reads use a standard called JSON-RPC and return JSON.
JSON-RPC is the request format Ethereum nodes accept. You send a method name and parameters. The node returns a JSON result. Methods include eth_getBalance and eth_getLogs.
ERC-20 is for fungible tokens, where every unit is identical. ERC-721 is for NFTs, where each token is unique. ERC-1155 can mix both inside one contract.
Logs are records that contracts emit during actions. A token transfer emits a Transfer log. Apps read logs to build history, alerts, and analytics.
You query token balances by the wallet address. A token-aware API returns balances with decimals and symbols. That turns raw numbers into readable amounts.
Gas is the cost of the work a transaction needs. You pay it in ETH. Since 2021, fees have a base fee and a priority tip.
No. An Ethereum API runs nodes for you. You call a managed endpoint with an API key. This skips syncing and maintenance.
Reads need only a key. For writes, you sign on your side first. The provider relays the signed transaction. It never holds your private key.
Many do. Base, Arbitrum, and Optimism use the same EVM rules. One EVM-ready API can read tokens and events across them.
REST suits one-off reads like balances and history. WebSocket pushes live updates like new blocks. Many apps use both together.
An archive node stores full historical state. It can answer questions about old balances and contract state. Some providers expose archive data on higher tiers.
Pricing varies by provider and usage. Many offer a free tier for testing. Heavy methods and large queries cost more. Model a busy month before you commit.