API Directory › 🔗 Blockchain & Web3 › Ankr
No authHTTPSCORS

Ankr API

Multi-chain RPC and advanced APIs for reading blockchain data.

Auth
No auth needed
HTTPS
Yes
CORS
Yes
Open Ankr docs ↗

What it does

Ankr offers public and premium RPC endpoints for 75+ chains, plus an ‘Advanced API’ that answers multichain data questions in one call — token balances, NFT holdings, transaction history, token prices and logs across many networks — via extra JSON-RPC methods.

Base URL

https://rpc.ankr.com/{chain}

Authentication

The public endpoints (rpc.ankr.com/eth, /polygon, /bsc…) need no key but are rate-limited. Premium RPC and the Advanced API use a key in the path: rpc.ankr.com/{chain}/{API_KEY} and rpc.ankr.com/multichain/{API_KEY}.

Code examples

curl (public RPC, no key)
curl -s -X POST https://rpc.ankr.com/eth \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
Python (Advanced API: balances across chains)
import requests

r = requests.post(f"https://rpc.ankr.com/multichain/{KEY}", json={
  "jsonrpc": "2.0", "id": 1, "method": "ankr_getAccountBalance",
  "params": {"walletAddress": "0xd8dA6BF...", 
             "blockchain": ["eth", "polygon", "bsc"]}}, timeout=15)
for a in r.json()["result"]["assets"]:
    print(a["blockchain"], a["tokenSymbol"], a["balance"])

Rate limits & quotas

Public endpoints: roughly 30 requests/second per IP, no archive data, best-effort availability — fine for testing, not production. A free registered plan raises limits and unlocks the Advanced API with a monthly credit budget. Over the limit: HTTP 429.

Key response fields

resultStandard JSON-RPC result for eth_* methods
(ankr_getAccountBalance) result.assets[]Per-chain token balances with USD value
(ankr_getNFTsByOwner) result.assets[]NFTs with collection, image and traits
(ankr_getTokenPrice) result.usdPriceCurrent price for a token contract
result.nextPageTokenCursor for paginated Advanced API results

Common errors

429Public-endpoint rate limit — register for a key or slow down.
-32600 / -32602Malformed JSON-RPC request or bad params (e.g. unknown blockchain value).
401Advanced API called without a valid key in the path.

When to use it (and alternatives)

Great for a quick keyless RPC during development, and the Advanced API is a tidy way to get cross-chain balances/NFTs without wiring up per-chain calls. For heavier production RPC, Alchemy or Infura; for GraphQL-style on-chain analytics, Bitquery.

FAQ

Can I use the public endpoints in production?

Not recommended — they are shared, rate-limited to ~30 rps, lack archive data and have no uptime guarantee. Register for a free key and use a dedicated endpoint for anything real.

What is the multichain endpoint?

rpc.ankr.com/multichain/{key} exposes the Advanced API methods (ankr_*) that aggregate data across chains in a single request — balances, NFTs, transfers, prices, logs.

Which chains are supported?

75+, including all major EVM L1s/L2s and several non-EVM chains. The chain slug goes in the URL path for RPC; the blockchain param lists them for Advanced API calls.

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