> **For AI agents:** this page is a focused, LLM-optimized view of a
> single Fiber AI operation. Before calling it, fetch the routing
> instructions at [`https://api.fiber.ai/llms.txt`](https://api.fiber.ai/llms.txt) and the full operation
> index at [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md).

# flightSearch

`POST /v1/flights/search`

**Tags:** `Market intelligence`

Search flights

**Endpoint:** `https://api.fiber.ai/v1/flights/search`

## Description

Searches flight itineraries between cities of interest and returns trips, fares, timing, etc.

⚡ Rate limit: 120 requests per 1 minute

💰 Cost: 2 credits per search ⓘ

## Request body (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "apiKey": {
      "type": "string",
      "description": "Your Fiber API key"
    },
    "travelClass": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "economy",
        "premiumEconomy",
        "business",
        "first",
        null
      ],
      "description": "Preferred cabin class. Omit to consider flights across all cabin classes."
    },
    "adults": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9,
      "default": 1,
      "description": "Number of adult passengers (ages 12+)."
    },
    "children": {
      "type": "integer",
      "minimum": 0,
      "maximum": 8,
      "default": 0,
      "description": "Number of child passengers (ages 2-11)."
    },
    "infantsInSeat": {
      "type": "integer",
      "minimum": 0,
      "maximum": 8,
      "default": 0,
      "description": "Number of infants (under 2) with their own seat."
    },
    "infantsOnLap": {
      "type": "integer",
      "minimum": 0,
      "maximum": 8,
      "default": 0,
      "description": "Number of infants (under 2) on an adult's lap."
    },
    "maxStops": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 2,
      "description": "Maximum number of stops allowed. 0 = nonstop only, 1 = one stop or fewer, 2 = two stops or fewer. Omit to allow any number of stops."
    },
    "sortBy": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "top",
        "price",
        "departureTime",
        "arrivalTime",
        "duration",
        "emissions",
        null
      ],
      "description": "Sort criterion for results. 'top' ranks by overall value. 'price' sorts cheapest first. 'departureTime' and 'arrivalTime' sort earliest first. 'duration' sorts shortest first. 'emissions' sorts lowest carbon first. Direction is always ascending and cannot be changed. Omit to sort by 'top'."
    },
    "airlines": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "include": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Only return flights operated or marketed by these airlines. Pass 2-letter IATA airline codes (e.g. 'UA' for United, 'AA' for American, 'DL' for Delta, 'B6' for JetBlue). Case-insensitive."
        },
        "exclude": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Exclude flights operated or marketed by these airlines. Pass 2-letter IATA airline codes (e.g. 'UA' for United, 'AA' for American, 'DL' for Delta, 'B6' for JetBlue). Case-insensitive."
        }
      },
      "description": "Filter by airline. By default all airlines are considered. If you pass 'include', only flights from those airlines are returned. If you pass 'exclude', flights from those airlines are removed."
    },
    "minCarryOnBags": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 5,
      "description": "Minimum carry-on bags the itinerary must include. Omit for no requirement."
    },
    "minCheckedBags": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "maximum": 5,
      "description": "Minimum checked bags the itinerary must include. Omit for no requirement. Honored on a best-effort basis: not every itinerary exposes checked-bag inclusion."
    },
    "maxPrice": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 1,
      "description": "Maximum total itinerary price in whole currency units. You may want to set `currencyCode` as well so the price cap is in the currency you expect (default currency is USD). Omit for no price cap."
    },
    "outboundTimeWindow": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "departure": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "startHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23,
              "description": "Start of the hour range (inclusive), in 24-hour format."
            },
            "endHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23,
              "description": "End of the hour range (inclusive), in 24-hour format."
            }
          },
          "required": [
            "startHour",
            "endHour"
          ],
          "description": "Restrict departure times to this hour range."
        },
        "arrival": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "startHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23,
              "description": "Start of the hour range (inclusive), in 24-hour format."
            },
            "endHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23,
              "description": "End of the hour range (inclusive), in 24-hour format."
            }
          },
          "required": [
            "startHour",
            "endHour"
          ],
          "description": "Restrict arrival times to this hour range."
        }
      },
      "description": "Time-of-day window for outbound flights. For multi-city trips this constrains the first segment. Both startHour and endHour must be provided together per sub-window."
    },
    "returnTimeWindow": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "departure": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "startHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23,
              "description": "Start of the hour range (inclusive), in 24-hour format."
            },
            "endHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23,
              "description": "End of the hour range (inclusive), in 24-hour format."
            }
          },
          "required": [
            "startHour",
            "endHour"
          ],
          "description": "Restrict departure times to this hour range."
        },
        "arrival": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "startHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23,
              "description": "Start of the hour range (inclusive), in 24-hour format."
            },
            "endHour": {
              "type": "integer",
              "minimum": 0,
              "maximum": 23,
              "description": "End of the hour range (inclusive), in 24-hour format."
            }
          },
          "required": [
            "startHour",
            "endHour"
          ],
          "description": "Restrict arrival times to this hour range."
        }
      },
      "description": "Time-of-day window for return flights (round-trip only). Both startHour and endHour must be provided together per sub-window."
    },
    "layoverDuration": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "minMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 30,
          "maximum": 1440,
          "description": "Minimum layover duration in minutes. Omit for no minimum."
        },
        "maxMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 30,
          "maximum": 1440,
          "description": "Maximum layover duration in minutes. Omit for no maximum."
        }
      },
      "description": "Constrain layover duration. Omit to allow any layover length."
    },
    "maxFlightDurationMinutes": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 30,
      "maximum": 4320,
      "description": "Maximum total flight duration in minutes. Omit for no limit."
    },
    "connectingAirports": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "include": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Only allow itineraries connecting through at least one of these IATA airports (e.g. 'DFW', 'SFO'). Nonstop flights and itineraries that don't match are filtered out. Narrow allowlists may return zero results. Case-insensitive."
        },
        "exclude": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Drop itineraries connecting through any of these IATA airports (e.g. 'ORD', 'ATL'). Case-insensitive."
        }
      },
      "description": "Filter by connecting airports. By default all connecting airports are allowed. We recommend not passing this unless you have a good reason — it significantly reduces the number of results returned."
    },
    "onlyShowLowEmissionFlights": {
      "type": "boolean",
      "default": false,
      "description": "When true, only return flights with lower-than-typical carbon emissions. When false (default), return all flights."
    },
    "showHidden": {
      "type": "boolean",
      "default": true,
      "description": "When true, include itineraries that would normally be hidden (e.g. very late or undesirable schedules)."
    },
    "hideSeparateTickets": {
      "type": "boolean",
      "default": false,
      "description": "When true, drop itineraries that combine separately-issued tickets (which carry higher disruption risk)."
    },
    "currencyCode": {
      "type": "string",
      "pattern": "^[A-Za-z]{3}$",
      "default": "USD",
      "description": "ISO 4217 currency code for prices in the response (e.g. 'EUR', 'GBP', 'CAD'). Case-insensitive. Defaults to USD."
    },
    "searchMarketCountryCode": {
      "type": "string",
      "pattern": "^[A-Za-z]{3}$",
      "default": "USA",
      "description": "ISO 3166-1 alpha-3 country code that sets the search market (e.g. 'GBR', 'BRA'). This affects regional pricing and flight availability — the same route may show different prices and options depending on the market. Case-insensitive."
    },
    "languageCode": {
      "type": "string",
      "pattern": "^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$",
      "default": "en",
      "description": "Language for search results (airport names, airline names, labels). Pass a BCP-47 language tag such as 'en', 'en-US', 'pt-BR', 'zh-CN', 'ja', 'ko', 'fr', 'de', 'es'."
    },
    "nextPageToken": {
      "type": [
        "string",
        "null"
      ],
      "description": "Token to retrieve the next page. Pass as nextPageToken in the next request. Null if no more pages."
    },
    "trip": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "flightType": {
              "type": "string",
              "enum": [
                "one_way"
              ]
            },
            "departureAirports": {
              "type": "string",
              "description": "Airport(s) to search. Accepts a 3-letter IATA airport code (e.g. 'JFK'), a comma-separated IATA list to search multiple airports (e.g. 'JFK,LGA,EWR'), an X- metro alias that covers every airport in a metro area (e.g. 'X-NYC' — call GET /v1/enums/flight-regions for the full list), or a Freebase ID for a city or metro (e.g. '/m/02_286'). Case-insensitive except Freebase IDs."
            },
            "arrivalAirports": {
              "type": "string",
              "description": "Airport(s) to search. Accepts a 3-letter IATA airport code (e.g. 'JFK'), a comma-separated IATA list to search multiple airports (e.g. 'JFK,LGA,EWR'), an X- metro alias that covers every airport in a metro area (e.g. 'X-NYC' — call GET /v1/enums/flight-regions for the full list), or a Freebase ID for a city or metro (e.g. '/m/02_286'). Case-insensitive except Freebase IDs."
            },
            "outboundDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "ISO date in YYYY-MM-DD format (e.g. '2026-06-10')."
            }
          },
          "required": [
            "flightType",
            "departureAirports",
            "arrivalAirports",
            "outboundDate"
          ]
        },
        {
          "type": "object",
          "properties": {
            "flightType": {
              "type": "string",
              "enum": [
                "round_trip"
              ]
            },
            "departureAirports": {
              "type": "string",
              "description": "Airport(s) to search. Accepts a 3-letter IATA airport code (e.g. 'JFK'), a comma-separated IATA list to search multiple airports (e.g. 'JFK,LGA,EWR'), an X- metro alias that covers every airport in a metro area (e.g. 'X-NYC' — call GET /v1/enums/flight-regions for the full list), or a Freebase ID for a city or metro (e.g. '/m/02_286'). Case-insensitive except Freebase IDs."
            },
            "arrivalAirports": {
              "type": "string",
              "description": "Airport(s) to search. Accepts a 3-letter IATA airport code (e.g. 'JFK'), a comma-separated IATA list to search multiple airports (e.g. 'JFK,LGA,EWR'), an X- metro alias that covers every airport in a metro area (e.g. 'X-NYC' — call GET /v1/enums/flight-regions for the full list), or a Freebase ID for a city or metro (e.g. '/m/02_286'). Case-insensitive except Freebase IDs."
            },
            "outboundDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "ISO date in YYYY-MM-DD format (e.g. '2026-06-10')."
            },
            "returnDate": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "ISO date in YYYY-MM-DD format (e.g. '2026-06-10')."
            }
          },
          "required": [
            "flightType",
            "departureAirports",
            "arrivalAirports",
            "outboundDate",
            "returnDate"
          ]
        },
        {
          "type": "object",
          "properties": {
            "flightType": {
              "type": "string",
              "enum": [
                "multi_city"
              ]
            },
            "segments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "departureAirports": {
                    "type": "string",
                    "description": "Airport(s) to search. Accepts a 3-letter IATA airport code (e.g. 'JFK'), a comma-separated IATA list to search multiple airports (e.g. 'JFK,LGA,EWR'), an X- metro alias that covers every airport in a metro area (e.g. 'X-NYC' — call GET /v1/enums/flight-regions for the full list), or a Freebase ID for a city or metro (e.g. '/m/02_286'). Case-insensitive except Freebase IDs."
                  },
                  "arrivalAirports": {
                    "type": "string",
                    "description": "Airport(s) to search. Accepts a 3-letter IATA airport code (e.g. 'JFK'), a comma-separated IATA list to search multiple airports (e.g. 'JFK,LGA,EWR'), an X- metro alias that covers every airport in a metro area (e.g. 'X-NYC' — call GET /v1/enums/flight-regions for the full list), or a Freebase ID for a city or metro (e.g. '/m/02_286'). Case-insensitive except Freebase IDs."
                  },
                  "outboundDate": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                    "description": "ISO date in YYYY-MM-DD format (e.g. '2026-06-10')."
                  }
                },
                "required": [
                  "departureAirports",
                  "arrivalAirports",
                  "outboundDate"
                ]
              },
              "minItems": 2,
              "maxItems": 5,
              "description": "Provide between 2 and 5 segments."
            }
          },
          "required": [
            "flightType",
            "segments"
          ]
        }
      ],
      "description": "Trip configuration. The shape is determined by flightType — see each variant for its required fields."
    }
  },
  "required": [
    "apiKey",
    "trip"
  ]
}
```

## Response — success (JSON Schema)

```json
{
  "type": "object",
  "properties": {
    "output": {
      "type": "object",
      "properties": {
        "bestFlights": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "segments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "departureAirport": {
                      "type": "object",
                      "properties": {
                        "iataCode": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 3,
                          "maxLength": 3,
                          "description": "3-letter IATA airport code (e.g. 'JFK', 'LAX', 'LHR')."
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Airport display name."
                        },
                        "localDateTime": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Local departure or arrival datetime without timezone offset (format: YYYY-MM-DDTHH:mm:ss)."
                        }
                      },
                      "description": "Departure airport."
                    },
                    "arrivalAirport": {
                      "type": "object",
                      "properties": {
                        "iataCode": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 3,
                          "maxLength": 3,
                          "description": "3-letter IATA airport code (e.g. 'JFK', 'LAX', 'LHR')."
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Airport display name."
                        },
                        "localDateTime": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Local departure or arrival datetime without timezone offset (format: YYYY-MM-DDTHH:mm:ss)."
                        }
                      },
                      "description": "Arrival airport."
                    },
                    "durationMinutes": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Segment duration in minutes."
                    },
                    "airlineName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Operating airline name."
                    },
                    "airlineLogoUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Operating airline logo URL."
                    },
                    "travelClass": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cabin class as labeled in the search results (e.g. 'Economy', 'Premium Economy', 'Business', 'First')."
                    },
                    "flightNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Flight number including airline code (e.g. 'UA 2175', 'DL 1384')."
                    },
                    "aircraftModel": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Aircraft model."
                    },
                    "legroom": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Legroom distance as reported by the airline (e.g. '32 in')."
                    },
                    "isOvernight": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "True when this segment is overnight."
                    },
                    "isOftenDelayed": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "True when this segment is frequently delayed."
                    },
                    "carbonEmissionKg": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Estimated carbon emissions in kilograms."
                    }
                  },
                  "required": [
                    "departureAirport",
                    "arrivalAirport"
                  ]
                },
                "description": "Flight segments for this itinerary."
              },
              "layovers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "iataCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 3,
                      "maxLength": 3,
                      "description": "3-letter IATA code of the layover airport (e.g. 'DFW', 'ORD')."
                    },
                    "airportName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Layover airport name."
                    },
                    "durationMinutes": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Layover duration in minutes."
                    },
                    "isOvernight": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "True when layover spans overnight."
                    }
                  }
                },
                "description": "Layovers for this itinerary."
              },
              "totalDurationMinutes": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Total itinerary duration in minutes."
              },
              "price": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Total itinerary price in whole currency units."
              },
              "bookingToken": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque booking token. Pass as `bookingToken` in POST /v1/flights/booking-options to retrieve booking options for this itinerary."
              },
              "flightType": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "one_way",
                  "round_trip",
                  "multi_city",
                  null
                ],
                "description": "Trip type for this itinerary."
              },
              "mainAirlineLogoUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Logo URL for the primary airline on this itinerary. For multi-airline itineraries this may be a generic multi-carrier logo."
              },
              "carbonEmissions": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "thisFlightKg": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Estimated emissions for this itinerary in kilograms."
                  },
                  "typicalForRouteKg": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Typical route emissions in kilograms."
                  },
                  "differencePercent": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Percent difference versus typical route emissions. Negative means lower than typical, positive means higher."
                  }
                },
                "description": "Carbon emissions summary for this itinerary."
              },
              "alsoSoldBy": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "Full names of other airlines that also sell this itinerary (e.g. 'United', 'Korean Air')."
              },
              "operatingCarrier": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Full name of the airline operating the aircraft and crew, when it differs from the marketing airline (e.g. 'Envoy Air' operating on behalf of American Airlines)."
              }
            },
            "required": [
              "segments",
              "layovers"
            ]
          },
          "description": "Best flight itineraries for this query."
        },
        "otherFlights": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "segments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "departureAirport": {
                      "type": "object",
                      "properties": {
                        "iataCode": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 3,
                          "maxLength": 3,
                          "description": "3-letter IATA airport code (e.g. 'JFK', 'LAX', 'LHR')."
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Airport display name."
                        },
                        "localDateTime": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Local departure or arrival datetime without timezone offset (format: YYYY-MM-DDTHH:mm:ss)."
                        }
                      },
                      "description": "Departure airport."
                    },
                    "arrivalAirport": {
                      "type": "object",
                      "properties": {
                        "iataCode": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "minLength": 3,
                          "maxLength": 3,
                          "description": "3-letter IATA airport code (e.g. 'JFK', 'LAX', 'LHR')."
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Airport display name."
                        },
                        "localDateTime": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Local departure or arrival datetime without timezone offset (format: YYYY-MM-DDTHH:mm:ss)."
                        }
                      },
                      "description": "Arrival airport."
                    },
                    "durationMinutes": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Segment duration in minutes."
                    },
                    "airlineName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Operating airline name."
                    },
                    "airlineLogoUrl": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Operating airline logo URL."
                    },
                    "travelClass": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cabin class as labeled in the search results (e.g. 'Economy', 'Premium Economy', 'Business', 'First')."
                    },
                    "flightNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Flight number including airline code (e.g. 'UA 2175', 'DL 1384')."
                    },
                    "aircraftModel": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Aircraft model."
                    },
                    "legroom": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Legroom distance as reported by the airline (e.g. '32 in')."
                    },
                    "isOvernight": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "True when this segment is overnight."
                    },
                    "isOftenDelayed": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "True when this segment is frequently delayed."
                    },
                    "carbonEmissionKg": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "Estimated carbon emissions in kilograms."
                    }
                  },
                  "required": [
                    "departureAirport",
                    "arrivalAirport"
                  ]
                },
                "description": "Flight segments for this itinerary."
              },
              "layovers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "iataCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "minLength": 3,
                      "maxLength": 3,
                      "description": "3-letter IATA code of the layover airport (e.g. 'DFW', 'ORD')."
                    },
                    "airportName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Layover airport name."
                    },
                    "durationMinutes": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "Layover duration in minutes."
                    },
                    "isOvernight": {
                      "type": [
                        "boolean",
                        "null"
                      ],
                      "description": "True when layover spans overnight."
                    }
                  }
                },
                "description": "Layovers for this itinerary."
              },
              "totalDurationMinutes": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Total itinerary duration in minutes."
              },
              "price": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Total itinerary price in whole currency units."
              },
              "bookingToken": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Opaque booking token. Pass as `bookingToken` in POST /v1/flights/booking-options to retrieve booking options for this itinerary."
              },
              "flightType": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "one_way",
                  "round_trip",
                  "multi_city",
                  null
                ],
                "description": "Trip type for this itinerary."
              },
              "mainAirlineLogoUrl": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Logo URL for the primary airline on this itinerary. For multi-airline itineraries this may be a generic multi-carrier logo."
              },
              "carbonEmissions": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "thisFlightKg": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Estimated emissions for this itinerary in kilograms."
                  },
                  "typicalForRouteKg": {
                    "type": [
                      "integer",
                      "null"
                    ],
                    "description": "Typical route emissions in kilograms."
                  },
                  "differencePercent": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Percent difference versus typical route emissions. Negative means lower than typical, positive means higher."
                  }
                },
                "description": "Carbon emissions summary for this itinerary."
              },
              "alsoSoldBy": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                },
                "description": "Full names of other airlines that also sell this itinerary (e.g. 'United', 'Korean Air')."
              },
              "operatingCarrier": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Full name of the airline operating the aircraft and crew, when it differs from the marketing airline (e.g. 'Envoy Air' operating on behalf of American Airlines)."
              }
            },
            "required": [
              "segments",
              "layovers"
            ]
          },
          "description": "Additional flight itineraries for this query."
        },
        "nextPageToken": {
          "type": [
            "string",
            "null"
          ],
          "description": "Token to retrieve the next page. Pass as `nextPageToken` in the next request. Null if no more pages."
        },
        "currencyCode": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[A-Z]{3}$",
          "description": "ISO 4217 currency code for prices in this response (e.g. 'USD', 'EUR', 'GBP')."
        },
        "priceInsights": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "lowestPrice": {
              "type": [
                "integer",
                "null"
              ],
              "description": "Lowest observed price for this query."
            },
            "priceLevel": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "low",
                "typical",
                "high",
                null
              ],
              "description": "How the current price compares to historical prices for this route."
            },
            "typicalPriceRange": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "lowerBound": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Lower bound of the typical price range."
                },
                "upperBound": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Upper bound of the typical price range."
                }
              },
              "description": "Typical price range for this route in whole currency units."
            },
            "history": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "snapshotDate": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "Date this price was observed (e.g. '2024-09-19')."
                  },
                  "price": {
                    "type": "integer",
                    "description": "Observed price in whole currency units."
                  }
                },
                "required": [
                  "price"
                ]
              },
              "description": "Historical prices for this route."
            }
          },
          "required": [
            "history"
          ],
          "description": "Price-insight summary for this route query."
        },
        "airports": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "departure": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "iataCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "IATA airport code (e.g. 'JFK'). When the search targeted a metro area via an X- alias or Freebase ID input, this will be a Freebase ID (e.g. '/m/02_286') representing the metro rather than a single airport."
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Airport name."
                    },
                    "city": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "City name."
                    },
                    "countryCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO 3166-1 alpha-3 country code (e.g. 'USA', 'GBR')."
                    }
                  }
                },
                "description": "Departure airport options matched for this query."
              },
              "arrival": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "iataCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "IATA airport code (e.g. 'JFK'). When the search targeted a metro area via an X- alias or Freebase ID input, this will be a Freebase ID (e.g. '/m/02_286') representing the metro rather than a single airport."
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Airport name."
                    },
                    "city": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "City name."
                    },
                    "countryCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "ISO 3166-1 alpha-3 country code (e.g. 'USA', 'GBR')."
                    }
                  }
                },
                "description": "Arrival airport options matched for this query."
              }
            },
            "required": [
              "departure",
              "arrival"
            ]
          },
          "description": "Airports recognized for departure and arrival in this query."
        }
      },
      "required": [
        "bestFlights",
        "otherFlights",
        "airports"
      ]
    },
    "chargeInfo": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-now"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged"
          ],
          "description": "Credits were charged immediately for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charging-later"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "Credits will be charged after the operation completes"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "charged-for-async-process"
              ]
            },
            "creditsCharged": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsCharged",
            "message"
          ],
          "description": "Credits that were charged for an asynchronous operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "free"
              ]
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "message"
          ],
          "description": "No credits were charged for this operation"
        },
        {
          "type": "object",
          "properties": {
            "method": {
              "type": "string",
              "enum": [
                "credits-refunded"
              ]
            },
            "creditsRefunded": {
              "type": "number"
            },
            "message": {
              "type": "string"
            },
            "lowCreditAlert": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "getMoreCreditsUrl": {
                  "type": "string",
                  "format": "uri",
                  "description": "URL to top up credits or restart billing cycle to get fresh credits."
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable credits warning."
                },
                "availableCredits": {
                  "type": "number",
                  "description": "Number of credits remaining in the current billing period."
                }
              },
              "required": [
                "getMoreCreditsUrl",
                "message",
                "availableCredits"
              ],
              "description": "Contains a link to get more credits, a warning message, and the remaining credit count."
            }
          },
          "required": [
            "method",
            "creditsRefunded",
            "message"
          ],
          "description": "Credits were refunded for this operation"
        }
      ]
    },
    "warnings": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "Full path to extraneous field (e.g., 'searchParams.ExtraField')"
          },
          "message": {
            "type": "string",
            "description": "Warning message"
          }
        },
        "required": [
          "field",
          "message"
        ]
      },
      "description": "Warnings about extraneous fields in request"
    },
    "advice": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      },
      "description": "Tips, recommendations, and suggestions for using this API effectively."
    }
  },
  "required": [
    "output",
    "chargeInfo"
  ],
  "additionalProperties": false
}
```

---

Canonical JSON: [`https://api.fiber.ai/openapi.json`](https://api.fiber.ai/openapi.json)
Operation index: [`https://api.fiber.ai/ai-docs/index.md`](https://api.fiber.ai/ai-docs/index.md)
