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

# Rank airline pilots

> Pilots ranked by hours, flights, distance, average score or average landing rate over a period. Requires pilots:read. Results refresh about once a minute.



## OpenAPI

````yaml /virtual-airlines/openapi.json get /api/v1/va/leaderboard
openapi: 3.1.0
info:
  title: FlyHub Virtual Airlines API
  version: '2026-10-25'
  description: >-
    Read-only airline information and Discord notification payloads for Virtual
    Airlines integrations. Resources are scoped to the airline that issued the
    fhva_live bearer key.
servers:
  - url: https://flyhub.app
    description: FlyHub production API
security: []
tags:
  - name: public-api
    description: >-
      Read-only resources for airline websites, dashboards, and private
      integrations.
    x-group: Public VA API
  - name: discord-webhooks
    description: Discord notification payloads for selected airline activity.
    x-group: Discord webhooks
paths:
  /api/v1/va/leaderboard:
    get:
      tags:
        - public-api
      summary: Rank airline pilots
      description: >-
        Pilots ranked by hours, flights, distance, average score or average
        landing rate over a period. Requires pilots:read. Results refresh about
        once a minute.
      operationId: getVaLeaderboard
      parameters:
        - $ref: '#/components/parameters/LeaderboardMetric'
        - $ref: '#/components/parameters/Period'
        - $ref: '#/components/parameters/LeaderboardLimit'
        - $ref: '#/components/parameters/IfNoneMatch'
      responses:
        '200':
          $ref: '#/components/responses/LeaderboardResponse'
        '304':
          $ref: '#/components/responses/NotModified'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - vaApiKey: []
components:
  parameters:
    LeaderboardMetric:
      name: metric
      in: query
      description: Ranking metric. score and landing need at least 3 flights in the period.
      schema:
        type: string
        enum:
          - hours
          - flights
          - distance
          - score
          - landing
        default: hours
    Period:
      name: period
      in: query
      description: >-
        Reporting period. month is the current UTC calendar month; 7d to 365d
        are rolling. Unknown values fall back to all.
      schema:
        type: string
        enum:
          - all
          - month
          - 7d
          - 30d
          - 90d
          - 365d
        default: all
    LeaderboardLimit:
      name: limit
      in: query
      description: Number of ranked pilots, 1–100.
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 10
    IfNoneMatch:
      name: If-None-Match
      in: header
      description: >-
        ETag from an earlier response. When the body is unchanged the API
        returns 304 and charges one row.
      schema:
        type: string
  responses:
    LeaderboardResponse:
      description: Ranked pilots.
      headers:
        Cache-Control:
          $ref: '#/components/headers/CacheControl'
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/RateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/RateLimitReset'
        ETag:
          $ref: '#/components/headers/ETag'
        X-RateLimit-Row-Limit:
          $ref: '#/components/headers/RateLimitRowLimit'
        X-RateLimit-Row-Remaining:
          $ref: '#/components/headers/RateLimitRowRemaining'
        X-RateLimit-Row-Reset:
          $ref: '#/components/headers/RateLimitRowReset'
        X-RateLimit-Row-Cost:
          $ref: '#/components/headers/RateLimitRowCost'
      content:
        application/json:
          schema:
            type: object
            required:
              - data
              - pagination
              - meta
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/LeaderboardEntry'
              meta:
                $ref: '#/components/schemas/Meta'
              pagination:
                $ref: '#/components/schemas/Pagination'
    NotModified:
      description: >-
        The body has not changed since the ETag sent in If-None-Match. Costs one
        row.
    Unauthorized:
      description: A valid FlyHub VA API key is required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The key does not include the required read scope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: The request rate is temporarily limited.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: FlyHub cannot safely serve the request at the moment.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    CacheControl:
      description: >-
        The response is private and should not be stored as a shared cache
        entry.
      schema:
        type: string
        example: private, no-store
    RateLimitLimit:
      description: Requests allowed in the current public API window.
      schema:
        type: integer
    RateLimitRemaining:
      description: Requests remaining in the current public API window.
      schema:
        type: integer
    RateLimitReset:
      description: ISO timestamp when the public API request window resets.
      schema:
        type: string
        format: date-time
    ETag:
      description: >-
        Weak validator of the response body. Send it back in If-None-Match; an
        unchanged body returns 304 and costs one row.
      schema:
        type: string
        example: W/"q8ZK2yE0p3l6tB0mXx1cWQ9dTnR4aSfh"
    RateLimitRowLimit:
      description: Rows one API key can read per hour.
      schema:
        type: integer
    RateLimitRowRemaining:
      description: Rows left this hour, the lower of the key and its airline allowance.
      schema:
        type: integer
    RateLimitRowReset:
      description: ISO timestamp when the hourly row window resets.
      schema:
        type: string
        format: date-time
    RateLimitRowCost:
      description: >-
        Rows this response consumed: the rows returned for a list, a fixed cost
        for single objects, 1 for a 304.
      schema:
        type: integer
    RetryAfter:
      description: Seconds to wait before retrying after a rate limit.
      schema:
        type: integer
  schemas:
    LeaderboardEntry:
      type: object
      required:
        - position
        - pilot
        - flights
        - blockHours
        - distanceNm
        - averageScore
        - averageLandingRateFpm
        - bestLandingRateFpm
        - lastFlightAt
      properties:
        position:
          type: integer
          minimum: 1
        pilot:
          $ref: '#/components/schemas/PublicPilot'
        flights:
          type: integer
          minimum: 0
        blockHours:
          type: number
        distanceNm:
          type: number
        averageScore:
          type:
            - number
            - 'null'
        averageLandingRateFpm:
          type:
            - number
            - 'null'
          description: >-
            Average touchdown rate (negative). Closest to zero ranks first for
            metric=landing.
        bestLandingRateFpm:
          type:
            - number
            - 'null'
        lastFlightAt:
          type:
            - string
            - 'null'
          format: date-time
    Meta:
      type: object
      required:
        - apiVersion
      properties:
        apiVersion:
          type: string
          example: '2026-10-25'
    Pagination:
      type: object
      required:
        - offset
        - limit
        - total
      properties:
        offset:
          type: integer
          minimum: 0
        limit:
          type: integer
          minimum: 1
          maximum: 100
        total:
          type:
            - integer
            - 'null'
          minimum: 0
          description: >-
            Records matching the filters. Null on cursor pages of flights and on
            the leaderboard.
        hasMore:
          type: boolean
          description: Whether another page exists after this one.
        nextCursor:
          type:
            - string
            - 'null'
          description: >-
            Flights only. Opaque position to pass as cursor for the next page.
            With order=asc it is always returned, so an incremental sync can
            store it.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
    PublicPilot:
      type: object
      description: >-
        Public pilot identity: a display name and a public avatar URL only. User
        IDs are never exposed.
      required:
        - displayName
        - avatarUrl
      properties:
        displayName:
          type: string
        avatarUrl:
          description: >-
            Public, unsigned FlyHub avatar URL, or null when the pilot has no
            avatar.
          type:
            - string
            - 'null'
          format: uri
  securitySchemes:
    vaApiKey:
      type: http
      scheme: bearer
      bearerFormat: fhva_live_...
      description: >-
        A read-only FlyHub VA API key created from Ownership. Keep it on your
        integration server.

````

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