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

# Read airline insights

> Totals, monthly activity, top airports, routes and aircraft, and network, simulator and landing breakdowns, and flights per operation type over time, in one object. Requires statistics:read and costs 20 rows. Results refresh about once a minute.



## OpenAPI

````yaml /virtual-airlines/openapi.json get /api/v1/va/insights
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/insights:
    get:
      tags:
        - public-api
      summary: Read airline insights
      description: >-
        Totals, monthly activity, top airports, routes and aircraft, and
        network, simulator and landing breakdowns, and flights per operation
        type over time, in one object. Requires statistics:read and costs 20
        rows. Results refresh about once a minute.
      operationId: getVaInsights
      parameters:
        - $ref: '#/components/parameters/Period'
        - $ref: '#/components/parameters/IfNoneMatch'
      responses:
        '200':
          $ref: '#/components/responses/InsightsResponse'
        '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:
    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
    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:
    InsightsResponse:
      description: Airline insights.
      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
              - meta
            properties:
              data:
                $ref: '#/components/schemas/Insights'
              meta:
                $ref: '#/components/schemas/Meta'
    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:
    Insights:
      type: object
      description: >-
        Aggregates over completed and diverted flights that count for
        statistics, in the same group scope as flights.
      required:
        - period
        - since
        - totals
        - flightsByMonth
        - topAirports
        - topRoutes
        - topAircraftTypes
        - networks
        - simulators
        - landingRatings
        - flightsByOperation
      properties:
        period:
          type: string
          enum:
            - all
            - month
            - 7d
            - 30d
            - 90d
            - 365d
        since:
          type:
            - string
            - 'null'
          format: date-time
          description: Start of the period, or null for all time.
        totals:
          type: object
          properties:
            flights:
              type: integer
              minimum: 0
            pilots:
              type: integer
              minimum: 0
            airports:
              type: integer
              minimum: 0
            blockHours:
              type: number
            distanceNm:
              type: number
            passengers:
              type: number
            cargoKg:
              type: number
            averageScore:
              type:
                - number
                - 'null'
            averageLandingRateFpm:
              type:
                - number
                - 'null'
        flightsByMonth:
          type: array
          description: UTC calendar months, oldest first, up to the last 24.
          items:
            type: object
            properties:
              month:
                type: string
                example: 2026-10
              flights:
                type: integer
                minimum: 0
              blockHours:
                type: number
              distanceNm:
                type: number
        topAirports:
          type: array
          maxItems: 10
          items:
            type: object
            properties:
              icao:
                type: string
              departures:
                type: integer
                minimum: 0
              arrivals:
                type: integer
                minimum: 0
              movements:
                type: integer
                minimum: 0
        topRoutes:
          type: array
          maxItems: 10
          items:
            type: object
            properties:
              originIcao:
                type: string
              destinationIcao:
                type: string
              flights:
                type: integer
                minimum: 0
        topAircraftTypes:
          type: array
          maxItems: 10
          items:
            type: object
            properties:
              aircraftTypeIcao:
                type: string
              flights:
                type: integer
                minimum: 0
              blockHours:
                type: number
        networks:
          type: array
          items:
            type: object
            properties:
              network:
                type:
                  - string
                  - 'null'
                enum:
                  - vatsim
                  - ivao
                  - offline
                  - null
              flights:
                type: integer
                minimum: 0
        simulators:
          type: array
          maxItems: 10
          items:
            type: object
            properties:
              simulator:
                type: string
              flights:
                type: integer
                minimum: 0
        flightsByOperation:
          type: object
          description: >-
            Accepted flights per operation type over the period, the same data
            as the airline dashboard's completed-flights chart. Buckets are UTC
            days for month, 7d, 30d and 90d, and UTC months for 365d and all;
            empty buckets are included as zero.
          required:
            - bucket
            - totals
            - series
          properties:
            bucket:
              type: string
              enum:
                - day
                - month
            totals:
              type: object
              required:
                - flights
                - byType
              properties:
                flights:
                  type: integer
                  minimum: 0
                byType:
                  type: object
                  required:
                    - schedule
                    - charter
                    - tour
                    - free_flight
                    - other
                  properties:
                    schedule:
                      type: integer
                      minimum: 0
                    charter:
                      type: integer
                      minimum: 0
                    tour:
                      type: integer
                      minimum: 0
                    free_flight:
                      type: integer
                      minimum: 0
                    other:
                      type: integer
                      minimum: 0
            series:
              type: array
              items:
                type: object
                required:
                  - period
                  - flights
                  - byType
                properties:
                  period:
                    type: string
                    format: date
                    description: First UTC day of the bucket.
                  flights:
                    type: integer
                    minimum: 0
                  byType:
                    type: object
                    required:
                      - schedule
                      - charter
                      - tour
                      - free_flight
                      - other
                    properties:
                      schedule:
                        type: integer
                        minimum: 0
                      charter:
                        type: integer
                        minimum: 0
                      tour:
                        type: integer
                        minimum: 0
                      free_flight:
                        type: integer
                        minimum: 0
                      other:
                        type: integer
                        minimum: 0
        landingRatings:
          type: array
          items:
            type: object
            properties:
              rating:
                type: string
              flights:
                type: integer
                minimum: 0
    Meta:
      type: object
      required:
        - apiVersion
      properties:
        apiVersion:
          type: string
          example: '2026-10-25'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  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.