> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beaconcha.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Learn how to authenticate, make your first request, and understand responses using the beaconcha.in V2 API — the recommended API for all new integrations.

The **V2 API** is the recommended API for all new integrations. It offers richer data, flexible validator selectors, cursor-based pagination, and exclusive features like [BeaconScore®](https://docs.beaconcha.in/use-cases/performance-introduction.md) and [entity benchmarking](https://docs.beaconcha.in/use-cases/rank-and-compare-entities.md). The [V1 API](https://docs.beaconcha.in/api/v1-overview.md) remains available but no new features will be added to V1.

## Build with AI

Give your AI assistant or coding agent the full beaconcha.in documentation, so it answers from the current API reference instead of guessing endpoints and fields. One line connects Cursor, Claude, or any other MCP client to our docs server:

```
https://docs.beaconcha.in/mcp
```

> [card] [MCP Server](https://docs.beaconcha.in/api/ai-integration.md#mcp-server-for-supported-tools)
>
> Connect Cursor, Claude Desktop, or any MCP-compatible tool directly to the docs.

> [card] [llms.txt](https://docs.beaconcha.in/api/ai-integration.md#llms-txt-universal)
>
> A complete documentation index for any LLM that follows the llms.txt standard.

> [card] [skill.md](https://docs.beaconcha.in/api/ai-integration.md#skill-md-for-ai-agents)
>
> Capabilities, workflows, and staking context written for AI agents.

> [card] [Set up AI Integration](https://docs.beaconcha.in/api/ai-integration.md)
>
> Step-by-step setup for every tool, and what your assistant can do once connected

## Pricing

| Plan | Price | Features | Ratelimit | Requests | API keys |
| - | - | - | - | - | - |
| Free Trial | 0€ (30 days) | Basic | 1/sec | 1000 | 1 |
| Hobbyist | 59€/mo\* | Basic | 1/sec | Unlimited | 2 |
| Business | 99€/mo\* | Basic | 2/sec | Unlimited | 5 |
| Scale | 399€/mo\* | Basic & Pro 💎 | 5/sec | Unlimited | 10 |
| Enterprise | [Contact us](https://beaconcha.in/api/pricing#contact-sales) | Basic & Pro 💎 | [Contact us](https://beaconcha.in/api/pricing#contact-sales) | Unlimited | [Contact us](https://beaconcha.in/api/pricing#contact-sales) |

\*Prices shown are for annual billing, excluding VAT

* **Free Trial:** Test the API with a 30-day free trial. The trial does not auto-renew; access ends after 30 days unless you upgrade. [Start your free trial and create an API key](https://beaconcha.in/user/api-key-management).
* **Access:** API endpoints require an API key. Free Trial and paid users have access to both V1 and V2 APIs.
* **Pro 💎 features:** available for users on the Scale and Enterprise plans.
* **Attribution:** See [API Terms and Conditions](https://docs.beaconcha.in/legal/api-terms.md) for details.

## Attribution Requirements

If you use beaconcha.in API data in your application or website, please follow these attribution guidelines:

### BeaconScore®

After an agreement the BeaconScore® badge may be required. See [API Terms and Conditions](https://docs.beaconcha.in/legal/api-terms.md) for details.

![BeaconScore®](https://mintcdn.com/bitflyexplorergmbh/u4FDQLNfRccMj2Kg/images/license-materials/beaconscore_black.svg?fit=max\&auto=format\&n=u4FDQLNfRccMj2Kg\&q=85\&s=af3f46de08814ba4df3fdea7290973a5)

### Powered by beaconcha.in

After an agreement the "Powered by beaconcha.in" logo may be required. See [API Terms and Conditions](https://docs.beaconcha.in/legal/api-terms.md) for details.

![Powered by beaconcha.in](https://mintcdn.com/bitflyexplorergmbh/wvIFUZajcQb_cYrx/images/license-materials/poweredby_black.svg?fit=max\&auto=format\&n=wvIFUZajcQb_cYrx\&q=85\&s=9a3d6d39c5b4f1b1bf509fdf84a0040d)

> [card] [License Materials](https://docs.beaconcha.in/legal/license-materials.md)
>
> Download official BeaconScore® and "Powered by beaconcha.in" badges in SVG format

For full terms and conditions, see our [BeaconScore® License](https://docs.beaconcha.in/legal/beaconscore-license.md).

## API Keys

API keys can be obtained in the [user portal](https://beaconcha.in/user/api-key-management) and must be included in requests either as a query string parameter or in the request header.

> [!NOTE]
>
> V1 and V2 APIs use the same authentication method. A single API key is valid for all endpoints.

## Quick Start — Your First Request

The simplest V2 API call is the [Chain State](https://docs.beaconcha.in/api-reference/ethereum/state.md) endpoint, which returns the current state of the Ethereum network with a single field in the request body:

> [tab] curl
>
> ```bash theme={null}
> curl -X POST 'https://beaconcha.in/api/v2/ethereum/state' \
>   -H 'Authorization: Bearer <YOUR_API_KEY>' \
>   -H 'Content-Type: application/json' \
>   -d '{"chain": "mainnet"}'
> ```

> [tab] Python
>
> ```python theme={null}
> import requests
>
> response = requests.post(
>     "https://beaconcha.in/api/v2/ethereum/state",
>     headers={
>         "Authorization": "Bearer <YOUR_API_KEY>",
>         "Content-Type": "application/json"
>     },
>     json={"chain": "mainnet"}
> )
> print(response.json())
> ```

> [tab] TypeScript
>
> ```typescript theme={null}
> const response = await fetch("https://beaconcha.in/api/v2/ethereum/state", {
>   method: "POST",
>   headers: {
>     "Authorization": "Bearer <YOUR_API_KEY>",
>     "Content-Type": "application/json"
>   },
>   body: JSON.stringify({ chain: "mainnet" })
> });
> const data: {
>   data: {
>     chain_health: { is_finalizing: boolean };
>     chain_view: Record<string, unknown>;
>     data_freshness: { slot_lag: number; finality_slot_lag: number };
>   };
> } = await response.json();
> console.log(data);
> ```

> [tab] JavaScript
>
> ```javascript theme={null}
> const response = await fetch("https://beaconcha.in/api/v2/ethereum/state", {
>   method: "POST",
>   headers: {
>     "Authorization": "Bearer <YOUR_API_KEY>",
>     "Content-Type": "application/json"
>   },
>   body: JSON.stringify({ chain: "mainnet" })
> });
> const data = await response.json();
> console.log(data);
> ```

> [!NOTE]
>
> All V2 API endpoints use the `POST` method with a JSON request body. The `chain` field (`"mainnet"` or `"hoodi"`) selects the network and defaults to `"mainnet"` on most endpoints.

## Full Example — Validator Rewards

This example uses the [Rewards](https://docs.beaconcha.in/api-reference/ethereum/validators/rewards-list.md) endpoint to get validator rewards data.

### Request

> [tab] curl
>
> ```bash theme={null}
> curl -X POST 'https://beaconcha.in/api/v2/ethereum/validators/rewards-list' \
>   -H 'Authorization: Bearer <YOUR_API_KEY>' \
>   -H 'Content-Type: application/json' \
>   -d '{
>     "validator": {
>       "validator_identifiers": [1]
>     },
>     "chain": "mainnet",
>     "page_size": 10,
>     "epoch": 347566
>   }'
> ```

> [tab] Python
>
> ```python theme={null}
> import requests
>
> API_KEY = "<YOUR_API_KEY>"
> BASE_URL = "https://beaconcha.in"
>
> response = requests.post(
>     f"{BASE_URL}/api/v2/ethereum/validators/rewards-list",
>     headers={
>         "Authorization": f"Bearer {API_KEY}",
>         "Content-Type": "application/json"
>     },
>     json={
>         "validator": {"validator_identifiers": [1]},
>         "chain": "mainnet",
>         "page_size": 10,
>         "epoch": 347566
>     }
> )
>
> if response.status_code == 200:
>     data = response.json()
>     print(data)
> else:
>     print(f"Error {response.status_code}: {response.json()}")
> ```

> [tab] TypeScript
>
> ```typescript theme={null}
> const API_KEY = "<YOUR_API_KEY>";
> const BASE_URL = "https://beaconcha.in";
>
> interface RewardsResponse {
>   data: Array<{
>     validator: { index: number; public_key: string };
>     total: string;
>     total_reward: string;
>     total_penalty: string;
>   }>;
>   paging: { next_cursor?: string };
> }
>
> async function getValidatorRewards(): Promise<RewardsResponse> {
>   const response = await fetch(
>     `${BASE_URL}/api/v2/ethereum/validators/rewards-list`,
>     {
>       method: "POST",
>       headers: {
>         "Authorization": `Bearer ${API_KEY}`,
>         "Content-Type": "application/json"
>       },
>       body: JSON.stringify({
>         validator: { validator_identifiers: [1] },
>         chain: "mainnet",
>         page_size: 10,
>         epoch: 347566
>       })
>     }
>   );
>
>   if (!response.ok) {
>     const error = await response.json();
>     throw new Error(`API error ${response.status}: ${error.error}`);
>   }
>
>   return response.json();
> }
> ```

> [tab] JavaScript
>
> ```javascript theme={null}
> const API_KEY = "<YOUR_API_KEY>";
> const BASE_URL = "https://beaconcha.in";
>
> async function getValidatorRewards() {
>   const response = await fetch(
>     `${BASE_URL}/api/v2/ethereum/validators/rewards-list`,
>     {
>       method: "POST",
>       headers: {
>         "Authorization": `Bearer ${API_KEY}`,
>         "Content-Type": "application/json"
>       },
>       body: JSON.stringify({
>         validator: { validator_identifiers: [1] },
>         chain: "mainnet",
>         page_size: 10,
>         epoch: 347566
>       })
>     }
>   );
>
>   if (!response.ok) {
>     const error = await response.json();
>     throw new Error(`API error ${response.status}: ${error.error}`);
>   }
>
>   return response.json();
> }
> ```

### Response

```json theme={null}
{
  "data": [
    {
      "total": "80660680222696592",
      "validator": {
        "index": 1,
        "public_key": "0xa1d1ad0714035353258038e964ae9675dc0252ee22cea896825c01458e1807bfad2f9969338798548d9858a571f7425c"
      },
      "total_reward": "80660680222696592",
      "total_penalty": "0",
      "total_missed": "132644000000000",
      "attestation": {
        "total": "9371000000000",
        "head": {
          "total": "2408000000000",
          "reward": "2408000000000",
          "penalty": "0",
          "missed_reward": "0"
        },
        "source": {
          "total": "2437000000000",
          "reward": "2437000000000",
          "penalty": "0",
          "missed_reward": "0"
        },
        "target": {
          "total": "4526000000000",
          "reward": "4526000000000",
          "penalty": "0",
          "missed_reward": "0"
        },
        "inactivity_leak_penalty": "0",
        "inclusion_delay": null
      },
      "sync_committee": {
        "total": "0",
        "reward": "0",
        "penalty": "0",
        "missed_reward": "0"
      },
      "proposal": {
        "total": "80651309222696592",
        "execution_layer_reward": "35087332222696592",
        "attestation_inclusion_reward": "43946801000000000",
        "sync_inclusion_reward": "1617176000000000",
        "slashing_inclusion_reward": "0",
        "missed_cl_reward": "132644000000000",
        "missed_el_reward": "0"
      },
      "finality": "finalized"
    }
  ],
  "paging": {},
  "range": {
    "slot": {
      "start": 11122112,
      "end": 11122143
    },
    "epoch": {
      "start": 347566,
      "end": 347566
    },
    "timestamp": {
      "start": 1740289367,
      "end": 1740289750
    }
  }
}
```

> [card] [View Full API Documentation](https://docs.beaconcha.in/api-reference/ethereum/validators/rewards-list.md)
>
> See all parameters, response fields, and try the Rewards endpoint


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.