---
title: "Base RPC Quickstart"
description: "Get an API key, make your first Base JSON-RPC request over HTTP, and subscribe to events over WebSocket with ERPC."
canonical: "https://erpc.global/en/doc/base-rpc/quickstart/"
locale: "en"
---

# Base RPC Quickstart

## Base RPC Quickstart

This guide takes you from zero to your first Base JSON-RPC response with ERPC.

### 1. Get Your API Key

You can obtain and check your API key on the ERPC Web Dashboard: [ERPC Web Dashboard](https://dashboard.erpc.global/en)

Already using ERPC for Solana, Ethereum, or Avalanche? You can use the same RPC key.

### 2. Make Your First Request

Send a JSON-RPC 2.0 request as an HTTP POST, with your API key in the `api-key` parameter:

```bash
curl 'https://edge.erpc.global/base?api-key=<YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{
  "jsonrpc":"2.0","id":1,
  "method":"eth_blockNumber"
}'
```

The response returns the latest block number in hexadecimal:

```json
{ "jsonrpc": "2.0", "id": 1, "result": "0x..." }
```

On the Free plan, your account can send one request per 10 seconds, and a request to another chain can also count toward this limit. Wait 10 seconds before sending the next request.

You can check which chain the endpoint serves with `eth_chainId`:

```bash
curl 'https://edge.erpc.global/base?api-key=<YOUR_API_KEY>' --header 'Content-Type: application/json' --data '{
  "jsonrpc":"2.0","id":1,
  "method":"eth_chainId"
}'
```

### 3. Subscribe over WebSocket

For subscriptions, connect over WebSocket to:

```text
wss://edge.erpc.global/base?api-key=<YOUR_API_KEY>
```

For the available subscription types, refer to the official Base documentation linked below. On the Free plan, WebSocket connections are not available and are answered with HTTP `403`.

### 4. Batch Requests

You can send up to 256 JSON-RPC calls in a single HTTP request. Each call in a batch is metered as its own call. On the Free plan, send one call per request: a request with two or more calls is answered with HTTP `429`.

### Next Steps

- Endpoints, metering, and status codes: [Base RPC Endpoint Documentation](https://erpc.global/en/doc/base-rpc/general/)
- Official Base documentation: [https://docs.base.org/get-started/connect-to-base](https://docs.base.org/get-started/connect-to-base)
