API Directory › 🔗 Blockchain & Web3 › Alchemy
API KeyHTTPSCORS

Alchemy API

Powerful node and data APIs for Ethereum, Polygon, Solana and many chains.

Auth
API Key
HTTPS
Yes
CORS
Yes
Open Alchemy docs ↗

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

https://eth-mainnet.g.alchemy.com/v2/{API_KEY}

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 (JSON-RPC)
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":[]}'
Python (Enhanced API: transfer history)
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

resultJSON-RPC result (hex-encoded numbers for balances, block numbers)
error.code / error.messageJSON-RPC error (e.g. -32000 execution reverted)
(getAssetTransfers) result.transfers[]asset, value, from, to, hash, category
(NFT API) ownedNfts[] / contract.address / tokenIdNFT holdings and metadata
pageKeyCursor for the next page of transfers/NFTs

Common errors

401Missing or wrong API key in the URL.
429Compute-unit-per-second throughput exceeded — add backoff/retry.
-32000 / -32015Execution 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.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

JSON Formatter

Related Blockchain & Web3 APIs

← Back

More Blockchain & Web3 APIs · All 196 APIs