# How to Get an Avalanche RPC Endpoint

> Step-by-step guide to getting a fast, reliable Avalanche RPC endpoint

Avalanche's C-Chain provides EVM-compatible smart contract execution with sub-second finality. Whether you're building DeFi protocols, NFT platforms, or gaming applications on Avalanche, this guide gets you connected in minutes.

### Features

* **C-Chain** — full EVM compatibility
* Archive data access (all plans)
* Trace & Debug methods (Starter+)
* WebSocket support
* Multi-region (Frankfurt, New York, Singapore)
* Dedicated Nodes available

### Step-by-Step: Get Your Avalanche RPC Endpoint

#### Create a GetBlock Account

Go to [GetBlock Dashboard](https://account.getblock.io) and sign up. You can register with email or via Google/GitHub OAuth.

#### Create an Avalanche Endpoint

Once logged in:

1. Click **"Shared Nodes"** in the left sidebar
1. Click **"Create New Endpoint"** or the **"+"** button

![](/docs-assets/image%20%2815%29.png)

3. Select:

   * **Protocol:** Avalanche
   * **Network:** Mainnet or Testnet
   * **API Interface:** JSON-RPC or Websocket
   * **Region:** Frankfurt (EU)

![](/docs-assets/image%20%285%29.png)

4. Click **"Create":** Your endpoint URL will be generated immediately.

#### Copy Your Endpoint URL

Your endpoint URL looks like this:

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

> **Warning:** `<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.

#### Test the Connection

#### cURL

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

#### Response

```bash
{ 
   "result": "0xa86a" (Chain ID 43114)
}
```

#### Code Sample

#### Ethers.js

```javascript
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider("https://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/");
console.log("Block:", await provider.getBlockNumber());
```

#### Python

```python
from web3 import Web3
w3 = Web3(Web3.HTTPProvider("https://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/"))
print("Chain ID:", w3.eth.chain_id)  # 43114
```

#### Viem

```typescript
import { createPublicClient, http } from "viem";
import { arbitrum } from "viem/chains";

const client = createPublicClient({
  chain: avalanche,
  transport: http("https://shared.eu-central-1.getblock.io/<YOUR-ACCESS-TOKEN>/"),
});
```

### What's Next?

* [Full Avalanche API Reference](https://docs.getblock.io/api-reference/avalanche-avax)
* [Dedicated Nodes](https://getblock.io/dedicated-nodes/)
* [Learn about our pricing](https://getblock.io/pricing/)

_Building on Avalanche?_ [_Contact us_](https://getblock.io/contact/) _for custom infrastructure._
