Alchemy API
Powerful node and data APIs for Ethereum, Polygon, Solana and many chains.
What it does
Alchemy is a blockchain node and data platform. You get standard JSON-RPC access to Ethereum and many other chains, plus ‘Enhanced APIs’ that ordinary nodes don’t offer: asset transfer history, token balances and metadata, a full NFT API, webhooks, and transaction simulation.
Base URL
Authentication
Create a free app to get an API key; it goes in the URL path. The network is chosen by subdomain (eth-mainnet, polygon-mainnet, arb-mainnet, base-mainnet, solana-mainnet…). NFT/Token endpoints live under /nft/v3/{API_KEY} and /v2/{API_KEY}.
Code examples
curl -s -X POST "https://eth-mainnet.g.alchemy.com/v2/$ALCHEMY_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'import requests
r = requests.post(f"https://eth-mainnet.g.alchemy.com/v2/{KEY}", json={
"jsonrpc": "2.0", "id": 1, "method": "alchemy_getAssetTransfers",
"params": [{"fromBlock": "0x0", "toAddress": "0xd8dA6BF...",
"category": ["erc20"], "maxCount": "0x5"}]}, timeout=15)
for t in r.json()["result"]["transfers"]:
print(t["asset"], t["value"], t["hash"])Rate limits & quotas
Free tier: a large monthly allowance of compute units (hundreds of millions) plus a per-second throughput cap. Methods cost different CU amounts — a simple eth_call is cheap, alchemy_getAssetTransfers and archive lookups cost more. Over the throughput cap returns HTTP 429; the dashboard shows CU usage.
Key response fields
| result | JSON-RPC result (hex-encoded numbers for balances, block numbers) |
| error.code / error.message | JSON-RPC error (e.g. -32000 execution reverted) |
| (getAssetTransfers) result.transfers[] | asset, value, from, to, hash, category |
| (NFT API) ownedNfts[] / contract.address / tokenId | NFT holdings and metadata |
| pageKey | Cursor for the next page of transfers/NFTs |
Common errors
| 401 | Missing or wrong API key in the URL. |
| 429 | Compute-unit-per-second throughput exceeded — add backoff/retry. |
| -32000 / -32015 | Execution reverted, or method not supported on that network/tier. |
| (archive data) | Historical state older than 128 blocks needs an archive-capable method — check the method docs. |
When to use it (and alternatives)
A top choice when you need reliable RPC plus ready-made data endpoints (transfer history, NFTs, token balances) without running your own indexer. Infura is the classic RPC alternative; Moralis and Covalent lean more data-API. For account/token history without a node, Etherscan.
FAQ
What is a compute unit?
Alchemy’s billing unit. Each RPC method has a CU cost (from ~10 for basic reads to hundreds for heavy queries). Your plan grants a monthly CU budget and a CU-per-second rate; both matter.
Which networks are supported?
Ethereum and most major L2s and sidechains (Polygon, Arbitrum, Optimism, Base, zkSync, Linea), plus Solana. Each is a different subdomain with the same key.
Do I still need Etherscan?
For verified-contract source and ABIs, and for the simplest ‘all transactions for an address’ call, Etherscan is handier. Alchemy is better for programmatic RPC and app back ends.
New to APIs?
Short guides for working with this API — and any other.