Every wallet, script, or dapp that talks to Avalanche needs an RPC endpoint. Here are the official public URLs, copy-paste ready, plus what to do when the free endpoint is no longer enough.
Mainnet (C-Chain)
- HTTP RPC: https://api.avax.network/ext/bc/C/rpc
- WebSocket: wss://api.avax.network/ext/bc/C/ws
- Chain ID: 43114 (hex 0xa86a)
- Currency: AVAX (18 decimals)
- Explorer: https://snowtrace.io
Fuji testnet (C-Chain)
- HTTP RPC: https://api.avax-test.network/ext/bc/C/rpc
- WebSocket: wss://api.avax-test.network/ext/bc/C/ws
- Chain ID: 43113 (hex 0xa869)
- Explorer: https://testnet.snowtrace.io
Quick test
Verify an endpoint responds with a single curl call:
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
https://api.avax.network/ext/bc/C/rpcA healthy endpoint returns the latest block number in hex. You can compare it against the live height on our Avalanche network stats page.
Public endpoint vs dedicated provider
The official endpoint is free, keyless, and rate limited. That is ideal for wallets like MetaMask, one-off scripts, and early development. You will want a dedicated provider (or your own node) when you need:
- sustained request volume without hitting rate limits,
- archive data (historical state older than recent blocks),
- guaranteed uptime SLAs for a production app,
- trace or debug RPC methods.
Most major node providers (Ankr, QuickNode, Infura, Alchemy, dRPC, PublicNode, Chainstack and others) offer Avalanche C-Chain endpoints with free tiers. They all speak the same standard Ethereum JSON-RPC, so switching is a one-line change.
X-Chain and P-Chain endpoints
The URLs above are for the C-Chain, the EVM chain where almost all dapp activity happens. The X-Chain and P-Chain have their own APIs under the same host (/ext/bc/X and /ext/P) with different, non-EVM request formats. If you are unsure which chain you need, it is almost certainly the C-Chain; see our guide to the three Avalanche chains.
Reading reputation instead of raw blocks
An RPC endpoint gives you raw chain data. If what you actually want is an interpretation of an address (its age, activity, and trust signals), the SOCI4L API serves EIP-712 signed reputation attestations for any Avalanche address, so you do not have to index the chain yourself.