---
title: "Get the shortest flight route"
url: "https://kongair.terwilligar.com/apis/kong-air-route-api-2-1-9/versions/f24fd3bb-3f0e-4e64-ad5f-4be59552336a/paths/routes/get"
---

> Full API specification: https://kongair.terwilligar.com/apis/kong-air-route-api-2-1-9/versions/f24fd3bb-3f0e-4e64-ad5f-4be59552336a.md

# Get the shortest flight route

`GET` `/routes`

Retrieve the shortest flight path from the origin airport to the destination airport.

## Query parameters

- `origin` (string, required) - IATA code of the departure airport.
- `destination` (string, required) - IATA code of the arrival airport.

## Responses

- `200` - Shortest flight route retrieved successfully.

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: KongAir Route API
  version: 1.0.0
servers:
  - url: https://api.kongair.com/v1
    description: Production server
paths:
  /routes:
    get:
      summary: Get the shortest flight route
      description: Retrieve the shortest flight path from the origin airport to the
        destination airport.
      parameters:
        - name: origin
          in: query
          required: true
          schema:
            type: string
            example: JFK
          description: IATA code of the departure airport.
        - name: destination
          in: query
          required: true
          schema:
            type: string
            example: LAX
          description: IATA code of the arrival airport.
      responses:
        "200":
          description: Shortest flight route retrieved successfully.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Route"
components:
  schemas:
    Route:
      type: object
      properties:
        origin:
          type: string
          example: JFK
        destination:
          type: string
          example: LAX
        total_distance:
          type: number
          format: float
          example: 3972
          description: Total distance of the route in kilometers.
        total_duration:
          type: string
          example: 06:15:00
          description: Total estimated duration of the route in HH:MM:SS format.
        flights:
          type: array
          description: List of flights in the shortest route.
          items:
            $ref: "#/components/schemas/FlightSegment"
    FlightSegment:
      type: object
      properties:
        flight_number:
          type: string
          example: KA1234
        airline:
          type: string
          example: KongAir
        departure_airport:
          type: string
          example: JFK
        arrival_airport:
          type: string
          example: LAX
        departure_time:
          type: string
          format: date-time
          example: 2025-06-01T08:30:00Z
        arrival_time:
          type: string
          format: date-time
          example: 2025-06-01T11:30:00Z
        duration:
          type: string
          example: 06:15:00
          description: Flight duration in HH:MM:SS format.
```
