Search flights

Search flights

POST/flights/search

This call returns a searchToken. It does not return flights. A domestic one-way usually answers in 2–5 seconds; a long-haul can take longer.

Country and currency

Send country to pick the market. Prices come back in that country’s native currency. GB returns GBP, DE returns EUR, US returns USD. Omit country and the market is the US, so prices are USD.

There is no currency field on this call. Sending one is rejected. You cannot ask for US prices in GBP, or UK prices in USD — the country decides the currency.

One-way, round trip, multi-city

Send origin, destination, and departureDate for a one-way. Add returnDate for a round trip. Send legs instead for multi-city. Mixing the two forms answers 400 TRIP_CONFLICT. A legs array of length 1 answers 400 TOO_FEW_LEGS — use the flat form.

Origin and destination are codes, not names. Look them up with Search airports and send code. A code with allAirports true (NYC, LON) covers every airport in that city. Origin and destination on a single leg must differ.

When there is nothing to page

If there are no flights, the call returns 404 NO_RESULTS and no token. Schedules are usually published under a year ahead, so a date further out is the usual cause.

Read more

What a flight search API does, and what it does not: flight search API. Moving from another provider: Kiwi Tequila API, Amadeus API vs Skyscanner API, and why there is no Google Flights API. Claude Code skill: [Ktemiaa/ktemia-flights-skill](https://github.com/Ktemiaa/ktemia-flights-skill).

Parameters

The body of the request.

originstring

IATA airport or city code, 3 or 4 letters. Required for a one-way or round trip. Do not send it together with legs. Look the code up with Search airports and send code from that response.

destinationstring

IATA airport or city code. Required when origin is set, and it must be different from origin. Look the code up with Search airports and send code from that response.

departureDatestring

Outbound date, YYYY-MM-DD. Required when origin is set. Cannot be in the past. Schedules are usually published under a year ahead.

returnDatestring

Return date, YYYY-MM-DD. Sending it makes the search a round trip. Cannot be before departureDate. Omit it for a one-way.

legsarray of objects

Multi-city trip. Send 2 to 6 legs, in travel order. Do not send origin, destination, departureDate, or returnDate in the same request. One leg is not enough — use the flat fields for a one-way.

originstringRequired

IATA airport or city code, 3 or 4 letters. Look the code up with Search airports. Airport codes such as JFK and city codes such as NYC are both accepted.

destinationstringRequired

IATA airport or city code. Must be different from origin on this same leg. Look the code up with Search airports.

datestringRequired

Departure date for this leg, YYYY-MM-DD. Cannot be in the past, and cannot be earlier than the previous leg.

cabinstring

Which cabin to search. Defaults to economy.

Possible values

economy

Default. Results can include every cabin.

premiumEconomy

Only premium economy fares.

business

Only business fares.

first

Only first fares.

passengersobject

How many travellers of each fare type. Defaults to one adult. The counts added together must be at least 1 and at most 9.

adultsinteger

Ages 18–64. Defaults to 1. Each count is 0–9, and all counts together must be at least 1 and at most 9.

seniorsinteger

Ages 65 and over. Defaults to 0.

studentsinteger

Ages 18 and over, on a student fare. Defaults to 0.

youthsinteger

Ages 12–17. Defaults to 0.

childreninteger

Ages 2–11. Defaults to 0.

infantsInSeatinteger

Under 2, in their own seat. Defaults to 0.

infantsOnLapinteger

Under 2, on a lap. Defaults to 0. Cannot be higher than adults + seniors + students.

maxStopsinteger

How many stops to allow. Omit it to allow any number of stops.

Possible values

0

Nonstop only.

1

At most one stop.

2

At most two stops.

airlinesarray of strings

IATA airline codes to keep, 2 characters each, for example ["B6", "DL"]. Send 1 to 20 codes. Every itinerary in the results uses only these airlines. Omit it to allow any airline.

alliancesarray of strings

Alliances to keep. Send one or more. Every itinerary in the results belongs to one of them.

Possible values

oneworld

oneworld carriers only.

skyteam

SkyTeam carriers only.

starAlliance

Star Alliance carriers only.

maxPriceinteger

Highest per-person fare to return, as a whole number in the country’s native currency. Minimum is 1. Omit it for no price cap.

sortBystring

How to order the results. Defaults to bestValue.

Possible values

bestValue

Default. Recommended order.

price

By fare.

duration

By total travel time.

departure

By departure time.

arrival

By arrival time.

sortOrderstring

Direction for sortBy. Defaults to asc.

Possible values

asc

Default. Lowest price, shortest time, or earliest time first.

desc

The other direction.

countrystring

ISO 3166-1 alpha-2 market. Prices come back in that country’s native currency — GB returns GBP, DE returns EUR, US returns USD. There is no separate currency field; sending currency is rejected. Omit country for US. Any other value is rejected.

Possible values

US

Prices in USD.

GB

Prices in GBP.

DE

Prices in EUR.

FR

Prices in EUR.

ES

Prices in EUR.

IT

Prices in EUR.

NL

Prices in EUR.

BE

Prices in EUR.

AT

Prices in EUR.

CH

Prices in CHF.

IE

Prices in EUR.

PT

Prices in EUR.

GR

Prices in EUR.

PL

Prices in PLN.

CZ

Prices in CZK.

RO

Prices in EUR.

SE

Prices in SEK.

NO

Prices in NOK.

DK

Prices in DKK.

FI

Prices in EUR.

TR

Prices in TRY.

AE

Prices in AED.

SA

Prices in SAR.

IL

Prices in ILS.

IN

Prices in INR.

JP

Prices in JPY.

KR

Prices in KRW.

HK

Prices in HKD.

TW

Prices in TWD.

SG

Prices in SGD.

MY

Prices in MYR.

TH

Prices in THB.

ID

Prices in IDR.

PH

Prices in PHP.

VN

Prices in VND.

AU

Prices in AUD.

NZ

Prices in NZD.

CA

Prices in CAD.

MX

Prices in MXN.

BR

Prices in BRL.

AR

Prices in ARS.

CL

Prices in CLP.

CO

Prices in COP.

PE

Prices in PEN.

UY

Prices in USD.

PY

Prices in USD.

BO

Prices in USD.

EC

Prices in USD.

VE

Prices in USD.

CR

Prices in USD.

PA

Prices in USD.

GT

Prices in USD.

HN

Prices in USD.

NI

Prices in USD.

SV

Prices in USD.

DO

Prices in USD.

PR

Prices in USD.

ZA

Prices in ZAR.

UA

Prices in UAH.

Returns

A successful response, captured live.

                        {
  "searchToken": "eyJwIjoxLCJzIjoiNDk1NGMzNmY2ZWY1NDdiYWI4NTI3YzA3ZTBlOWNjZjMiLCJ2IjoxfQ",
  "expiresIn": 3600
}