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

# Check Route Validity (Query)

> Returns a JSON object describing whether the route announcement is RPKI valid, invalid, or not found. Same as the path-based endpoint but with a more form-friendly calling convention.

Returns RPKI validation status for a route using query parameters. More form-friendly than the path-based endpoint.

**Use Cases:**

* Web form-based validation
* Simple API integrations
* Quick validation checks
* Browser-based tools


## OpenAPI

````yaml GET /validity
openapi: 3.0.3
info:
  title: Routinator HTTP API
  description: >-
    HTTP API for Routinator - RPKI validation and Route Origin Authorization
    (ROA) service. Provides endpoints for checking route validity, monitoring
    RPKI infrastructure, and receiving real-time updates.
  version: 0.15.0
  contact:
    name: Routinator Support
    url: https://github.com/NLnetLabs/routinator
  license:
    name: BSD-3-Clause
    url: https://opensource.org/licenses/BSD-3-Clause
servers:
  - url: https://api.hixbe.com/rpki
    description: Production server
security: []
tags:
  - name: Validity
    description: Route validity checking endpoints
  - name: Status
    description: Service status and monitoring
  - name: Delta
    description: Incremental updates and notifications
  - name: Monitoring
    description: Logging and metrics endpoints
paths:
  /validity:
    get:
      tags:
        - Validity
      summary: Check validity of a route (query parameters)
      description: >-
        Returns a JSON object describing whether the route announcement is RPKI
        valid, invalid, or not found. Same as the path-based endpoint but with a
        more form-friendly calling convention.
      operationId: getValidityByQuery
      parameters:
        - name: asn
          in: query
          description: Autonomous System Number
          required: true
          schema:
            type: string
            pattern: ^(AS)?[0-9]+$
            example: AS64496
        - name: prefix
          in: query
          description: IP prefix in CIDR notation
          required: true
          schema:
            type: string
            example: 192.0.2.0/24
      responses:
        '200':
          description: Successful response with validity information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidityResponse'
        '400':
          description: Invalid or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ValidityResponse:
      type: object
      required:
        - validated_route
      properties:
        validated_route:
          $ref: '#/components/schemas/ValidatedRoute'
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
    ValidatedRoute:
      type: object
      required:
        - route
        - validity
      properties:
        route:
          $ref: '#/components/schemas/Route'
        validity:
          $ref: '#/components/schemas/Validity'
        vrps:
          type: object
          description: VRPs (Validated ROA Payloads) that determined the validity
          properties:
            matched:
              type: array
              items:
                $ref: '#/components/schemas/VRP'
            unmatched_as:
              type: array
              items:
                $ref: '#/components/schemas/VRP'
            unmatched_length:
              type: array
              items:
                $ref: '#/components/schemas/VRP'
    Route:
      type: object
      required:
        - origin_asn
        - prefix
      properties:
        origin_asn:
          type: string
          pattern: ^AS[0-9]+$
          example: AS64496
        prefix:
          type: string
          example: 192.0.2.0/24
    Validity:
      type: object
      required:
        - state
      properties:
        state:
          type: string
          enum:
            - valid
            - invalid
            - not-found
          description: RPKI validation state
        reason:
          type: string
          description: Additional information about the validity state
        description:
          type: string
          description: Human-readable description of the validation result
    VRP:
      type: object
      description: Validated ROA Payload
      properties:
        asn:
          type: string
          pattern: ^AS[0-9]+$
          example: AS64496
        prefix:
          type: string
          example: 192.0.2.0/24
        max_length:
          type: integer
          minimum: 0
          maximum: 128
          example: 24

````

## Related topics

- [Check Route Validity (Path)](https://docs.xerobi.com/rpki-api/endpoint/check-validity-path.md)
- [RPKI API](https://docs.xerobi.com/rpki-api/introduction.md)
- [Validate Multiple Routes](https://docs.xerobi.com/rpki-api/endpoint/validate-routes.md)
- [Content Filtering FAQ](https://docs.xerobi.com/faq-guides/content-filtering.md)
- [Certification API FAQ](https://docs.xerobi.com/faq-guides/certification-api-faq.md)


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