How to Get an Ethereum RPC Endpoint

An Ethereum RPC (Remote Procedure Call) endpoint is a URL that your application uses to send requests to an Ethereum node. When your dApp needs to:

  • Check a wallet balance (eth_getBalance)
  • Read a smart contract (eth_call)
  • Send a transaction (eth_sendRawTransaction)
  • Get block data (eth_getBlockByNumber)
  • Fetch transaction receipts (eth_getTransactionReceipt)

It sends a JSON-RPC request to an Ethereum node through an RPC endpoint. The node processes the request and returns the data.

For example:

json{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": "getblock.io"
  }
json{
  "jsonrpc": "2.0",
  "id": "getblock.io",
  "result": "0x134A5B2"
}
// The result field contains the latest block number in hexadecimal.

Step-by-Step: Get Your Ethereum RPC Endpoint

  1. Create a GetBlock Account

    Go to GetBlock Dashboard and sign up. You can register with email or via Google/GitHub OAuth.

  2. Create an Ethereum Endpoint

    Once logged in:

    1. Click "Shared Nodes" in the left sidebar
    2. Click "Create New Endpoint" or the "+" button
    1. Configure your endpoint:
    • Protocol: Ethereum (ETH)
    • Network: Mainnet (or Sepolia/Holesky for testing)
    • API Interface: JSON-RPC (most common), WebSocket, or Beacon API
    • Region: Choose the closest — Frankfurt (EU), New York (US), or Singapore (APAC)
    1. Click "Create": Your endpoint URL will be generated immediately.
  3. Copy Your Endpoint URL

    Your endpoint URL looks like this:

    https://shared.<region>.getblock.io/<ACCESS-TOKEN>/

    <region> is eu-central-1 (Frankfurt), us-east-1 (New York), or ap-southeast-1 (Singapore) — whichever you picked in step 2. The long string after the host is your access token — keep it private.

  4. Test the Connection

    bashcurl -X POST https://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/ \
      -H "Content-Type: application/json" \
      -d '{
        "jsonrpc": "2.0",
        "method": "eth_blockNumber",
        "params": [],
        "id": "getblock.io"
      }'
    json{
      "jsonrpc": "2.0",
      "id": "getblock.io",
      "result": "0x134A5B2"
    }
    // The result field contains the latest block number in hexadecimal.
javascriptimport { JsonRpcProvider } from "ethers";

const provider = new JsonRpcProvider(
  "https://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/"
);

// Get latest block number
const blockNumber = await provider.getBlockNumber();
console.log("Latest block:", blockNumber);

// Get ETH balance
const balance = await provider.getBalance("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045");
console.log("Balance:", balance.toString(), "wei");
pythonfrom web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/"))

# Check connection
print("Connected:", w3.is_connected())

# Get latest block
block_number = w3.eth.block_number
print(f"Latest block: {block_number}")

# Get balance
balance = w3.eth.get_balance("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")
print(f"Balance: {w3.from_wei(balance, 'ether')} ETH")
pythonimport requests

url = "https://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/"
headers = {"Content-Type": "application/json"}

# Get gas price
payload = {
    "jsonrpc": "2.0",
    "method": "eth_gasPrice",
    "params": [],
    "id": "getblock.io"
}

response = requests.post(url, headers=headers, json=payload)
gas_price = int(response.json()["result"], 16)
print(f"Gas price: {gas_price / 1e9:.2f} Gwei")

WebSocket Endpoint for Real-Time Data

For real-time events (new blocks, pending transactions, log subscriptions), use a WebSocket connection:

WebSocket endpoint format:

wss://shared.<region>.getblock.io/<YOUR-ACCESS-TOKEN>/

Subscribe to new blocks

javascriptimport { WebSocketProvider } from "ethers";

const provider = new WebSocketProvider(
  "wss://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/"
);

provider.on("block", (blockNumber) => {
  console.log("New block:", blockNumber);
});
pythonimport asyncio
import websockets
import json

async def listen_blocks():
    uri = "wss://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/"
    async with websockets.connect(uri) as ws:
        # Subscribe to new block headers
        await ws.send(json.dumps({
            "jsonrpc": "2.0",
            "method": "eth_subscribe",
            "params": ["newHeads"],
            "id": 1
        }))
        
        print("Subscribed to new blocks")
        
        while True:
            response = json.loads(await ws.recv())
            if "params" in response:
                block = response["params"]["result"]
                print(f"Block {int(block['number'], 16)}: {block['hash']}")

asyncio.run(listen_blocks())

Ethereum Testnet Endpoints

For development and testing, use testnet endpoints. GetBlock supports:

TestnetPurposeHow to Get Tokens
SepoliaPrimary Ethereum testnetSepolia faucets

Archive Data Access

Need to query the historical state at any past block? Enable archive mode on your endpoint.

Archive data lets you:

  • Call eth_getBalance at any historical block
  • Execute eth_call against old contract state
  • Run debug_traceTransaction for any past transaction
  • Use trace_block and trace_call for deep analysis

Archive mode is available on all paid plans and Dedicated Nodes.

Example — get balance at a specific historical block:

bashcurl -X POST https://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/ \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045", "0xE8D4A5"],
    "id": "getblock.io"
  }'

What's Next?

Need help choosing the right setup for your Ethereum project? Contact our team, and we'll help you find the best configuration.