Ethereum
Quick Start
TheRPC gives you a hosted JSON-RPC endpoint for Ethereum mainnet so you can read state, watch blocks, and broadcast transactions without running your own geth or erigon node. Developers reach for it to skip the sync, storage, and uptime work of self-hosting and still talk to chain 1 over the standard protocol their tools already speak. This guide takes you from no account to a working eth_blockNumber response in a few minutes: get a key, point your environment at the Ethereum endpoint, and fire the first call in curl, JavaScript, or Python.
Step 1: Get an API Key
Sign up at TheRPC.io, then open the Dashboard and head to the API Keys section to generate a key or copy an existing one. The key is a single opaque string that becomes part of your endpoint URL — it takes the place of YOUR_API_KEY in https://ethereum.therpc.io/YOUR_API_KEY and is also sent as a Bearer token in the Authorization header. The same key works across every network TheRPC serves, so you only do this once.
Step 2: Choose Your Network
TheRPC serves many networks, and each has its own hostname. For Ethereum mainnet you want ethereum.therpc.io. Set the endpoint and your key as environment variables so the rest of your code stays clean and the key never gets hardcoded. If you later need a testnet, the only thing that changes is the host — the request format and key stay the same.
Step 2: Choose Your Network
Step 3: Make Your First Call
Below is the same eth_blockNumber call in three forms — curl, JavaScript with axios, and Python with requests — so you can run whichever matches your stack. It returns the current chain head as a hex string; decoding it confirms your key and endpoint are live. For other languages and richer client setups, see Tools & SDKs.
Using Curl
Using JavaScript
Using Python
Step 4: Using Web3 Libraries
Raw HTTP is fine for a single call, but once you are encoding contract calldata, decoding return values, signing transactions, or managing nonces, a Web3 library does that work for you. ethers.js and web3.js in JavaScript, or web3.py in Python, handle ABI encoding, unit conversion between wei and ETH, and transaction building so you are not assembling hex by hand. See Tools & SDKs for full, language-specific setups.
Web3.js (JavaScript)
Web3.py (Python)
Available Methods
The All Methods page indexes every Ethereum JSON-RPC method TheRPC serves on chain 1, grouped by namespace. Each method has its own page with a description, the parameter and return tables, the error codes it can raise, a runnable request example, common use cases, and its CU cost. That is where you go once you move past eth_blockNumber into balances, logs, contract calls, or tracing.
Network Selection
Each network TheRPC supports has its own endpoint, distinguished by hostname. For Ethereum mainnet the URL is https://ethereum.therpc.io/YOUR_API_KEY over HTTP, with wss://ethereum.therpc.io/YOUR_API_KEY for WebSocket subscriptions. To target a different chain, you swap the host and keep everything else.
Next Steps
- All Methods — browse the full Ethereum method reference and find what you need next.
- Tools & SDKs — set up ethers.js, web3.js, web3.py, web3j, or another client for chain 1.
- Authentication — secure your key, rotate it, and read auth errors properly.
- Rate Limits — understand CU billing and how to stay within your plan's limits.
- Basic Operations — work through the everyday calls: balances, receipts, blocks, and contract reads.