# Get validators

Get a paginated list of validators

```
GET /validators
```

## Query params

| Query param  | Description                                                                                                                                         |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `era_id`     | Active auction era identifier. Data for older eras aren't persistent for long, and will eventually become unavailable. This is a required parameter |
| `is_active`  | Validator active filter param                                                                                                                       |
| `public_key` | Comma-separated list of public key                                                                                                                  |

## Sorting

| Property            | Description                          |
| ------------------- | ------------------------------------ |
| `rank`              | Sort validators by rank              |
| `fee`               | Sort validators by fee               |
| `delegators_number` | Sort validators by delegators number |
| `total_stake`       | Sort validators by total stake       |
| `self_stake`        | Sort validators by self stake        |
| `network_share`     | Sort validators by network share     |

Default sorting is `total_stake DESC`

## Optional properties

| Property              | Type                                                               | Description                          |
| --------------------- | ------------------------------------------------------------------ | ------------------------------------ |
| `account_info`        | [`AccountInfo`](/1.1.x/rest-api/account-info.md)                   | Account info of validator public key |
| `average_performance` | [`ValidatorPerformance`](/1.1.x/rest-api/validator-performance.md) | Validator average performance        |

## Response

[`PaginatedResponse`](/1.1.x/documentation/overview/pagination.md)[`<Validator>`](/1.1.x/rest-api/validator.md)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/validators?era_id=12099' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'

```

```json
{
  "item_count": 100,
  "page_count": 10,
  "data": [
    {
      "delegators_number": 327,
      "delegators_stake": 514860723339425900,
      "era_id": 12099,
      "fee": 15,
      "is_active": true,
      "network_share": "6.16",
      "public_key": "018f84c6fc037284f189cc8cb49f89212ff434a5eb050e48cdd164ff3890fbff69",
      "rank": 1,
      "self_share": "0.3",
      "self_stake": 1524223078827207,
      "total_stake": 516384946418253100
    },
    {
      "delegators_number": 537,
      "delegators_stake": 316963498155044600,
      "era_id": 12099,
      "fee": 10,
      "is_active": true,
      "network_share": "3.78",
      "public_key": "01bf489970ee9ad639854b9a78ed19d08b5f8d8f2185099b44c0fc5f6f467b14b4",
      "rank": 2,
      "self_share": "0",
      "self_stake": 1756858998778,
      "total_stake": 316965255014043400
    },
    ...
    {
      "delegators_number": 122,
      "delegators_stake": 206573767985058270,
      "era_id": 12099,
      "fee": 10,
      "is_active": true,
      "network_share": "2.47",
      "public_key": "015fd964620f98e551065079e142840dac3fb25bd97a0d4722411cb439f9247d72",
      "rank": 10,
      "self_share": "0.2",
      "self_stake": 405441796728029,
      "total_stake": 206979209781786300
    }
  ]
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cspr.cloud/1.1.x/rest-api/validator/get-validators.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
