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

# Active Validators

> Queries active validators on the network. Returns details and the state of validation on the blockchain.



## OpenAPI

````yaml /openapi.json post /validators
openapi: 3.0.0
info:
  title: NEAR Protocol JSON RPC API
  version: 1.2.3
servers:
  - url: https://rpc.mainnet.near.org
    description: Mainnet
  - url: https://rpc.testnet.near.org
    description: Testnet
security: []
paths:
  /validators:
    post:
      summary: Active Validators
      description: >-
        Queries active validators on the network. Returns details and the state
        of validation on the blockchain.
      operationId: validators
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JsonRpcRequest_for_validators'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError
components:
  schemas:
    JsonRpcRequest_for_validators:
      properties:
        id:
          type: string
        jsonrpc:
          type: string
        method:
          enum:
            - validators
          type: string
        params:
          $ref: '#/components/schemas/RpcValidatorRequest'
      required:
        - jsonrpc
        - id
        - params
        - method
      title: JsonRpcRequest_for_validators
      type: object
    JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError:
      oneOf:
        - $ref: >-
            #/components/schemas/JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError_variant0
        - $ref: >-
            #/components/schemas/JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError_variant1
      properties:
        id:
          type: string
        jsonrpc:
          type: string
      required:
        - jsonrpc
        - id
      title: JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError
      type: object
    RpcValidatorRequest:
      oneOf:
        - $ref: '#/components/schemas/RpcValidatorRequest_variant0'
        - $ref: '#/components/schemas/RpcValidatorRequest_variant1'
        - $ref: '#/components/schemas/RpcValidatorRequest_variant2'
      title: RpcValidatorRequest
      type: object
    JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError_variant0:
      properties:
        result:
          $ref: '#/components/schemas/RpcValidatorResponse'
      required:
        - result
      type: object
    JsonRpcResponse_for_RpcValidatorResponse_and_RpcValidatorError_variant1:
      properties:
        error:
          $ref: '#/components/schemas/ErrorWrapper_for_RpcValidatorError'
      required:
        - error
      type: object
    RpcValidatorRequest_variant0:
      properties:
        epoch_id:
          $ref: '#/components/schemas/EpochId'
      required:
        - epoch_id
      type: object
    RpcValidatorRequest_variant1:
      properties:
        block_id:
          $ref: '#/components/schemas/BlockId'
      required:
        - block_id
      type: object
    RpcValidatorRequest_variant2:
      properties:
        latest:
          enum:
            - null
          nullable: true
      required:
        - latest
      type: object
    RpcValidatorResponse:
      description: Information about this epoch validators and next epoch validators
      properties:
        current_fishermen:
          description: Fishermen for the current epoch
          items:
            $ref: '#/components/schemas/ValidatorStakeView'
          type: array
        current_proposals:
          description: Proposals in the current epoch
          items:
            $ref: '#/components/schemas/ValidatorStakeView'
          type: array
        current_validators:
          description: Validators for the current epoch
          items:
            $ref: '#/components/schemas/CurrentEpochValidatorInfo'
          type: array
        epoch_height:
          description: Epoch height
          format: uint64
          minimum: 0
          type: integer
        epoch_start_height:
          description: Epoch start block height
          format: uint64
          minimum: 0
          type: integer
        next_fishermen:
          description: Fishermen for the next epoch
          items:
            $ref: '#/components/schemas/ValidatorStakeView'
          type: array
        next_validators:
          description: Validators for the next epoch
          items:
            $ref: '#/components/schemas/NextEpochValidatorInfo'
          type: array
        prev_epoch_kickout:
          description: Kickout in the previous epoch
          items:
            $ref: '#/components/schemas/ValidatorKickoutView'
          type: array
      required:
        - current_validators
        - next_validators
        - current_fishermen
        - next_fishermen
        - current_proposals
        - prev_epoch_kickout
        - epoch_start_height
        - epoch_height
      type: object
    ErrorWrapper_for_RpcValidatorError:
      oneOf:
        - $ref: '#/components/schemas/ErrorWrapper_for_RpcValidatorError_variant0'
        - $ref: '#/components/schemas/ErrorWrapper_for_RpcValidatorError_variant1'
        - $ref: '#/components/schemas/ErrorWrapper_for_RpcValidatorError_variant2'
    EpochId:
      allOf:
        - $ref: '#/components/schemas/CryptoHash'
      description: |-
        Epoch identifier -- wrapped hash, to make it easier to distinguish.
        EpochId of epoch T is the hash of last block in T-2
        EpochId of first two epochs is 0
    BlockId:
      anyOf:
        - $ref: '#/components/schemas/BlockId_variant0'
        - $ref: '#/components/schemas/CryptoHash'
    ValidatorStakeView:
      oneOf:
        - $ref: '#/components/schemas/ValidatorStakeView_variant0'
    CurrentEpochValidatorInfo:
      description: Describes information about the current epoch validator
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        is_slashed:
          type: boolean
        num_expected_blocks:
          format: uint64
          minimum: 0
          type: integer
        num_expected_chunks:
          default: 0
          format: uint64
          minimum: 0
          type: integer
        num_expected_chunks_per_shard:
          default: []
          description: >-
            Number of chunks this validator was expected to produce in each
            shard.

            Each entry in the array corresponds to the shard in the
            `shards_produced` array.
          items:
            format: uint64
            minimum: 0
            type: integer
          type: array
        num_expected_endorsements:
          default: 0
          format: uint64
          minimum: 0
          type: integer
        num_expected_endorsements_per_shard:
          default: []
          description: >-
            Number of chunks this validator was expected to validate and endorse
            in each shard.

            Each entry in the array corresponds to the shard in the
            `shards_endorsed` array.
          items:
            format: uint64
            minimum: 0
            type: integer
          type: array
        num_produced_blocks:
          format: uint64
          minimum: 0
          type: integer
        num_produced_chunks:
          default: 0
          format: uint64
          minimum: 0
          type: integer
        num_produced_chunks_per_shard:
          default: []
          items:
            format: uint64
            minimum: 0
            type: integer
          type: array
        num_produced_endorsements:
          default: 0
          format: uint64
          minimum: 0
          type: integer
        num_produced_endorsements_per_shard:
          default: []
          items:
            format: uint64
            minimum: 0
            type: integer
          type: array
        public_key:
          $ref: '#/components/schemas/PublicKey'
        shards:
          description: >-
            Shards this validator is assigned to as chunk producer in the
            current epoch.
          items:
            $ref: '#/components/schemas/ShardId'
          type: array
        shards_endorsed:
          default: []
          description: >-
            Shards this validator is assigned to as chunk validator in the
            current epoch.
          items:
            $ref: '#/components/schemas/ShardId'
          type: array
        stake:
          $ref: '#/components/schemas/NearToken'
      required:
        - account_id
        - public_key
        - is_slashed
        - stake
        - shards
        - num_produced_blocks
        - num_expected_blocks
      type: object
    NextEpochValidatorInfo:
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        public_key:
          $ref: '#/components/schemas/PublicKey'
        shards:
          items:
            $ref: '#/components/schemas/ShardId'
          type: array
        stake:
          $ref: '#/components/schemas/NearToken'
      required:
        - account_id
        - public_key
        - stake
        - shards
      type: object
    ValidatorKickoutView:
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        reason:
          $ref: '#/components/schemas/ValidatorKickoutReason'
      required:
        - account_id
        - reason
      type: object
    ErrorWrapper_for_RpcValidatorError_variant0:
      properties:
        cause:
          $ref: '#/components/schemas/RpcRequestValidationErrorKind'
        name:
          enum:
            - REQUEST_VALIDATION_ERROR
          type: string
      required:
        - name
        - cause
      type: object
    ErrorWrapper_for_RpcValidatorError_variant1:
      properties:
        cause:
          $ref: '#/components/schemas/RpcValidatorError'
        name:
          enum:
            - HANDLER_ERROR
          type: string
      required:
        - name
        - cause
      type: object
    ErrorWrapper_for_RpcValidatorError_variant2:
      properties:
        cause:
          $ref: '#/components/schemas/InternalError'
        name:
          enum:
            - INTERNAL_ERROR
          type: string
      required:
        - name
        - cause
      type: object
    CryptoHash:
      type: string
    BlockId_variant0:
      format: uint64
      minimum: 0
      title: block_height
      type: integer
    ValidatorStakeView_variant0:
      allOf:
        - $ref: '#/components/schemas/ValidatorStakeViewV1'
      properties:
        validator_stake_struct_version:
          enum:
            - V1
          type: string
      required:
        - validator_stake_struct_version
      type: object
    AccountId:
      description: >-
        NEAR Account Identifier.


        This is a unique, syntactically valid, human-readable account identifier
        on the NEAR network.


        [See the crate-level docs for information about
        validation.](index.html#account-id-rules)


        Also see [Error kind precedence](AccountId#error-kind-precedence).


        ## Examples


        ```

        use near_account_id::AccountId;


        let alice: AccountId = "alice.near".parse().unwrap();


        assert!("ƒelicia.near".parse::<AccountId>().is_err()); // (ƒ is not f)

        ```
      title: AccountId
      type: string
    PublicKey:
      type: string
    ShardId:
      description: >-
        The shard identifier. It may be an arbitrary number - it does not need
        to be

        a number in the range 0..NUM_SHARDS. The shard ids do not need to be

        sequential or contiguous.


        The shard id is wrapped in a new type to prevent the old pattern of
        using

        indices in range 0..NUM_SHARDS and casting to ShardId. Once the
        transition

        if fully complete it potentially may be simplified to a regular type
        alias.
      format: uint64
      minimum: 0
      type: integer
    NearToken:
      type: string
    ValidatorKickoutReason:
      description: Reasons for removing a validator from the validator set.
      anyOf:
        - $ref: '#/components/schemas/ValidatorKickoutReason_variant0'
        - $ref: '#/components/schemas/ValidatorKickoutReason_variant1'
        - $ref: '#/components/schemas/ValidatorKickoutReason_variant2'
        - $ref: '#/components/schemas/ValidatorKickoutReason_variant3'
        - $ref: '#/components/schemas/ValidatorKickoutReason_variant4'
        - $ref: '#/components/schemas/ValidatorKickoutReason_variant5'
        - $ref: '#/components/schemas/ValidatorKickoutReason_variant6'
        - $ref: '#/components/schemas/ValidatorKickoutReason_variant7'
    RpcRequestValidationErrorKind:
      oneOf:
        - $ref: '#/components/schemas/RpcRequestValidationErrorKind_variant0'
        - $ref: '#/components/schemas/RpcRequestValidationErrorKind_variant1'
    RpcValidatorError:
      oneOf:
        - $ref: '#/components/schemas/RpcValidatorError_variant0'
        - $ref: '#/components/schemas/RpcValidatorError_variant1'
        - $ref: '#/components/schemas/RpcValidatorError_variant2'
    InternalError:
      oneOf:
        - $ref: '#/components/schemas/InternalError_variant0'
    ValidatorStakeViewV1:
      properties:
        account_id:
          $ref: '#/components/schemas/AccountId'
        public_key:
          $ref: '#/components/schemas/PublicKey'
        stake:
          $ref: '#/components/schemas/NearToken'
      required:
        - account_id
        - public_key
        - stake
      type: object
    ValidatorKickoutReason_variant0:
      description: Deprecated
      enum:
        - _UnusedSlashed
      type: string
    ValidatorKickoutReason_variant1:
      additionalProperties: false
      description: Validator didn't produce enough blocks.
      properties:
        NotEnoughBlocks:
          properties:
            expected:
              format: uint64
              minimum: 0
              type: integer
            produced:
              format: uint64
              minimum: 0
              type: integer
          required:
            - produced
            - expected
          type: object
      required:
        - NotEnoughBlocks
      type: object
    ValidatorKickoutReason_variant2:
      additionalProperties: false
      description: Validator didn't produce enough chunks.
      properties:
        NotEnoughChunks:
          properties:
            expected:
              format: uint64
              minimum: 0
              type: integer
            produced:
              format: uint64
              minimum: 0
              type: integer
          required:
            - produced
            - expected
          type: object
      required:
        - NotEnoughChunks
      type: object
    ValidatorKickoutReason_variant3:
      description: Validator unstaked themselves.
      enum:
        - Unstaked
      type: string
    ValidatorKickoutReason_variant4:
      additionalProperties: false
      description: Validator stake is now below threshold
      properties:
        NotEnoughStake:
          properties:
            stake_u128:
              $ref: '#/components/schemas/NearToken'
            threshold_u128:
              $ref: '#/components/schemas/NearToken'
          required:
            - stake_u128
            - threshold_u128
          type: object
      required:
        - NotEnoughStake
      type: object
    ValidatorKickoutReason_variant5:
      description: Enough stake but is not chosen because of seat limits.
      enum:
        - DidNotGetASeat
      type: string
    ValidatorKickoutReason_variant6:
      additionalProperties: false
      description: Validator didn't produce enough chunk endorsements.
      properties:
        NotEnoughChunkEndorsements:
          properties:
            expected:
              format: uint64
              minimum: 0
              type: integer
            produced:
              format: uint64
              minimum: 0
              type: integer
          required:
            - produced
            - expected
          type: object
      required:
        - NotEnoughChunkEndorsements
      type: object
    ValidatorKickoutReason_variant7:
      additionalProperties: false
      description: |-
        Validator's last block proposal was for a protocol version older than
        the network's voted protocol version.
      properties:
        ProtocolVersionTooOld:
          properties:
            network_version:
              format: uint32
              minimum: 0
              type: integer
            version:
              format: uint32
              minimum: 0
              type: integer
          required:
            - version
            - network_version
          type: object
      required:
        - ProtocolVersionTooOld
      type: object
    RpcRequestValidationErrorKind_variant0:
      properties:
        info:
          properties:
            method_name:
              type: string
          required:
            - method_name
          type: object
        name:
          enum:
            - METHOD_NOT_FOUND
          type: string
      required:
        - name
        - info
      type: object
    RpcRequestValidationErrorKind_variant1:
      properties:
        info:
          properties:
            error_message:
              type: string
          required:
            - error_message
          type: object
        name:
          enum:
            - PARSE_ERROR
          type: string
      required:
        - name
        - info
      type: object
    RpcValidatorError_variant0:
      properties:
        name:
          enum:
            - UNKNOWN_EPOCH
          type: string
      required:
        - name
      type: object
    RpcValidatorError_variant1:
      properties:
        name:
          enum:
            - VALIDATOR_INFO_UNAVAILABLE
          type: string
      required:
        - name
      type: object
    RpcValidatorError_variant2:
      properties:
        info:
          properties:
            error_message:
              type: string
          required:
            - error_message
          type: object
        name:
          enum:
            - INTERNAL_ERROR
          type: string
      required:
        - name
        - info
      type: object
    InternalError_variant0:
      properties:
        info:
          properties:
            error_message:
              type: string
          required:
            - error_message
          type: object
        name:
          enum:
            - INTERNAL_ERROR
          type: string
      required:
        - name
        - info
      type: object

````