---
title: "Request all the KongAir routes"
url: "https://portal.kongair.dev/apis/routes-api/versions/c8d1f163-0e67-4266-a23d-b8d1f86ffded/operations/get-routes"
---

> Full API specification: https://portal.kongair.dev/apis/routes-api/versions/c8d1f163-0e67-4266-a23d-b8d1f86ffded.md

# Request all the KongAir routes

`GET` `/routes`

Operation ID: `get-routes`

Returns all the routes KongAir is currently registered to fly. A Route is a pairing between origin and destination airport codes.

## Query parameters

- `origin` (array, optional) - Filter routes by origin airport code. To filter by multiple origin airports, provide an array of airport codes (e.g., `origin=LHR&origin=JFK`).

## Responses

- `200` - Successful response with the registered Routes

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Routes API
  version: 0.3.0
servers:
  - url: https://api.kongair.dev
    description: KongAir API Dev
paths:
  /routes:
    get:
      summary: Request all the KongAir routes
      description: |-
        Returns all the routes KongAir is currently registered to fly.
        A Route is a pairing between origin and destination airport codes.
      operationId: get-routes
      parameters:
        - name: origin
          in: query
          description: Filter routes by origin airport code.  To filter by multiple origin
            airports, provide an array of airport codes (e.g.,
            `origin=LHR&origin=JFK`).
          required: false
          style: form
          schema:
            type: array
            items:
              type: string
      responses:
        "200":
          description: Successful response with the registered Routes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Route"
              examples:
                lhr-sfo:
                  value: |-
                    [{
                       "id": "LHR-SFO",
                       "origin": "LHR",
                       "destination": "SFO",
                       "avg_duration": 660
                     }]
components:
  schemas:
    Route:
      type: object
      properties:
        id:
          type: string
        origin:
          type: string
        destination:
          type: string
        avg_duration:
          type: integer
      required:
        - id
        - origin
        - destination
        - avg_duration
```
