Base
Ready to call this in production?
Free tier covers personal projects. Pay-as-you-go scales without a card.
Base
Free tier covers personal projects. Pay-as-you-go scales without a card.
TheRPC is a managed JSON-RPC provider that gives you fast, authenticated access to Base (chain ID 8453) — Coinbase's OP Stack rollup — without running your own node. Base developers use it to power apps across Aerodrome, Uniswap, and the chain's large consumer and social ecosystem, with a single endpoint that scales from a hobby project to production traffic. This guide takes you from zero to a working JSON-RPC call in just a few minutes: get a key, point it at the Base endpoint, and run your first request in curl, JavaScript, or Python.
Sign up for a free account at TheRPC.io, then open the Dashboard and go to the API Keys section to create a new key or copy an existing one. The key is a single secret string that you place directly in your Base endpoint URL (https://base.therpc.io/YOUR_API_KEY) and in the Authorization: Bearer header. The same key works across every network TheRPC supports, so you only need one to start building on Base.
TheRPC serves many networks, and you select one purely by its endpoint host. For Base, use https://base.therpc.io/YOUR_API_KEY. Set the endpoint and your key as environment variables (as shown below) so the rest of your code stays clean and you never hardcode secrets — to target a different network later, you only change the host.
Now make your first call against Base. The examples below show the same eth_blockNumber request three ways — curl, JavaScript, and Python — so you can pick whichever fits your stack; each returns the latest block height from the sequencer. For other languages and full client setup, see the Tools & SDKs reference.
For anything beyond simple reads, a Web3 library beats hand-rolling HTTP requests: it handles ABI encoding and decoding, transaction signing, gas estimation, event log parsing, and retries for you — so interacting with Base contracts like Aerodrome or Uniswap stays readable. The examples below show web3.js and web3.py pointed at the Base endpoint; for full, language-specific coverage see the Tools & SDKs documentation.
For the full set of calls available on Base, see the All Methods page. It lists every supported method across the eth_, debug_, trace_, net_, txpool_, and web3_ namespaces, and each method's page includes a description, request and response formats, runnable code examples, and common use cases.
Each network on TheRPC has its own endpoint, selected by the host in the URL. The Base endpoint looks like https://base.therpc.io/YOUR_API_KEY for HTTP and wss://base.therpc.io/YOUR_API_KEY for WebSocket — swap in your real key and you are connected to Base mainnet (chain ID 8453).