# Get validator

Get validator by public key

```
GET /validators/{public_key}?era_id={era_id}
```

## 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 |

## Sorting

None

## Optional properties

| Property                   | Type                                                                                        | Description                                                                                             |
| -------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `account_info`             | [`AccountInfo`](https://docs.cspr.cloud/1.2.x/rest-api/account-info)                        | [Account info](https://github.com/make-software/casper-account-info-contract) provided by the validator |
| `centralized_account_info` | [`CentralizedAccountInfo`](https://docs.cspr.cloud/1.2.x/rest-api/centralized-account-info) | Account information available for known accounts provided by CSPR.cloud team                            |
| `average_performance`      | [`ValidatorPerformance`](https://docs.cspr.cloud/1.2.x/rest-api/validator-performance)      | Validator average performance                                                                           |

## Response

[`Validator`](https://docs.cspr.cloud/1.2.x/rest-api/validator)

## Example

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

```

```json
{
  "data": {
    "delegators_number": 8,
    "delegators_stake": 95108587769764,
    "era_id": 12100,
    "fee": 8,
    "is_active": true,
    "network_share": "0",
    "public_key": "01269c84a9153623fc47288f5a2b1bd681fc7d01b1f6144626583a56d3ba8f7c09",
    "rank": 100,
    "self_share": "26.11",
    "self_stake": 33607218439208,
    "total_stake": 128715806208972
  }
}
```


---

# 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.2.x/rest-api/validator/get-validator.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.
