# Retrieve flight details Expand one itinerary into every fare, with a URL that opens the seller’s booking page. Code in cURL, Python, Node, Go, Java, Ruby, and PHP. Base URL: https://api.ktemia.com Authentication: send header `X-API-Key` on every request. `GET /flights/details` Expand one itinerary into booking options with provider URLs. Query parameters are `token` and `resultId`. You do not send the route, dates, cabin, or sort again. This call usually answers in 3–4 seconds and includes a booking link for each fare. ## The booking URL `bookingOptions[].providerUrl` opens the seller’s site with the trip filled in. Open it in a new tab and leave the query string as returned. ## Read more Why details hands off to the seller instead of booking: [GDS vs booking engine vs a search API](https://www.ktemia.com/blog/search-api-vs-gds-booking-engine/). Connecting search to an agent in Cursor or Claude: [flights MCP](https://www.ktemia.com/blog/flights-mcp/). ## Query parameters - `token` (string, required): Any token of the search that produced the flight — the original `searchToken` or a later `nextToken`. - `resultId` (string, required): The `id` of a flight from `/flights/results` for this same token. ## Response fields - `resultId` (string, required): The `id` you asked about. - `tripInfo` (object, optional): Classification of the trip. - `tripType` (string, optional): `oneWay`, `roundTrip`, or `multiCity`. - `isDomestic` (boolean, optional): True when every airport is in the same country. - `isMultiAirport` (boolean, optional): True when a city pair uses more than one airport. - `legs` (array of objects, optional): Same shape as on the flight object. - `departure` (string, optional): Local departure time of the first segment. - `arrival` (string, optional): Local arrival time of the last segment. - `duration` (integer, optional): Total elapsed time in minutes, including layovers. - `stops` (integer, optional): Number of stops. `0` is nonstop. - `segments` (array of objects, optional): The individual flights that make up this leg. - `airline` (string, optional): IATA airline code, e.g. `B6`. - `flightNumber` (string, optional): Airline flight number without the carrier prefix repeated, e.g. `723`. - `origin` (string, optional): Departure airport for this segment. - `destination` (string, optional): Arrival airport for this segment. - `departure` (string, optional): Local departure time, ISO-8601 without a zone, e.g. `2026-12-03T13:59:00`. - `arrival` (string, optional): Local arrival time, same format. - `duration` (integer, optional): Block time in minutes. - `aircraft` (string, optional): Aircraft name when the carrier publishes one. - `bookingOptions` (array of objects, optional): Every fare class on this itinerary, with a provider URL. - `providerCode` (string, optional): IATA code of the seller. - `providerUrl` (string, optional): Booking link on the seller’s site. Open it as returned. - `providerDomain` (string, optional): Host of `providerUrl`. - `price` (number, optional): Per-person fare in the country’s native currency. - `currency` (string, optional): ISO 4217 code of that country’s native currency. - `formattedPrice` (string, optional): Per-person fare, formatted. - `totalPrice` (number, optional): Fare for the whole party. - `formattedTotalPrice` (string, optional): Whole-party fare, formatted. - `bagFees` (object, optional): Carry-on and checked-bag policy for this fare. - `carryOn` (object, optional): Carry-on policy for this fare. - `status` (string, optional): `included`, `fee`, or `unavailable`. - `price` (number, optional): Fee amount when status is `fee`. - `label` (string, optional): Short display label. - `checked` (object, optional): Checked-bag fees. - `firstBag` (object, optional): First checked bag: `status` and `price`. - `secondBag` (object, optional): Second checked bag: `status` and `price`. - `disclosures` (array of strings, optional): Carrier-written size or weight notes. - `policy` (array of objects, optional): Structured bag types with dimension restrictions. - `segmentFares` (array of objects, optional): Cabin and onboard amenities per segment. - `cabin` (string, optional): Cabin of this segment: `economy`, `premiumEconomy`, `business`, or `first`. - `quality` (array of objects, optional): Amenity rows. `type` is one of `aircraft`, `wifi`, `entertainment`, `power`, `seat`, `food`. - `badges` (array of strings, optional): Highlights such as `direct` or `freeCancellation`. - `fareFamilies` (array of objects, optional): Named branded fares with amenity matrices. - `id` (string, optional): Carrier fare-family code. - `name` (string, optional): Display name, e.g. `Main Base`. - `cabin` (string, optional): `economy`, `premiumEconomy`, `business`, or `first`. - `price` (number, optional): Starting fare for this family. - `formattedPrice` (string, optional): Same fare, formatted. - `amenities` (array of objects, optional): `type` is camelCase (`carryOnBag`, `checkedBag`, `seatSelection`, …). `restriction` is `included`, `fee`, or `unavailable`. - `airlines` (object, optional): Map of airline code to `{ name, feePageUrl }`. - `airports` (object, optional): Map of airport code to `{ name, city, cityCode, utcOffsetHours }`. - `providers` (object, optional): Map of provider code to `{ name, type }`. ## Example: One-way itinerary `GET /flights/details` → 200 Request: ```json { "token": "eyJwIjoxLCJzIjoiNDk1NGMzNmY2ZWY1NDdiYWI4NTI3YzA3ZTBlOWNjZjMiLCJ2IjoxfQ", "resultId": "31a71cd28ef337786fe1b368caf96730" } ``` Response: ```json { "resultId": "31a71cd28ef337786fe1b368caf96730", "tripInfo": { "tripType": "oneWay", "isDomestic": true, "isMultiAirport": false }, "legs": [ { "departure": "2026-12-03T13:59:00", "arrival": "2026-12-03T17:17:00", "duration": 378, "stops": 0, "segments": [ { "airline": "B6", "flightNumber": "723", "origin": "JFK", "destination": "LAX", "departure": "2026-12-03T13:59:00", "arrival": "2026-12-03T17:17:00", "duration": 378, "aircraft": "Airbus A318/A319/A320/A321" } ] } ], "bookingOptions": [ { "providerCode": "B6", "providerUrl": "https://www.jetblue.com/booking/trip-summary?searchType=NORMAL&journeySpan=OW&origin=JFK&destination=LAX&departureDate=2026-12-03&numAdults=1&numChildren=0&numInfants=0&bookingClass=L&travelersDetails=true&fareFamily=DN&stop_mobi=true&flightNumbers=723&fareBasisCode=PI2QUEY1&source=ky_ct&referrerCode=KAYAK&kayakclickid=3256415737546D4B48706932526D3224743945413177&t=1793722531663&sig=uum03YWaJMa6nWSvLulM-wk209Y&src=gds", "providerDomain": "www.jetblue.com", "price": 159, "currency": "USD", "formattedPrice": "$159", "totalPrice": 159, "formattedTotalPrice": "$159", "bagFees": { "carryOn": { "status": "included", "price": 0, "label": "Included" }, "checked": { "firstBag": { "status": "fee", "price": 49 }, "secondBag": { "status": "fee", "price": 69 } }, "disclosures": [ "Up to 62in total" ], "policy": [ { "type": "personalItem", "restrictions": { "dimensions": "Up to 16 x 12 x 7in" } }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 21 x 13 x 8in" } }, { "type": "checked", "restrictions": { "dimensions": "Up to 62in total" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi" }, { "type": "entertainment", "label": "Seatback on-demand & live TV" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "33\" seat pitch • 3-3 seat layout" }, { "type": "food", "label": "Light meal (fee)" } ] } ], "badges": [ "direct", "freeCancellation" ] }, { "providerCode": "B6", "providerUrl": "https://www.jetblue.com/booking/trip-summary?searchType=NORMAL&journeySpan=OW&origin=JFK&destination=LAX&departureDate=2026-12-03&numAdults=1&numChildren=0&numInfants=0&bookingClass=P&travelersDetails=true&fareFamily=AN&stop_mobi=true&flightNumbers=723&fareBasisCode=PI2QUEY5&source=ky_ct&referrerCode=KAYAK&kayakclickid=5F6C625155586E6851347A4D53794C3858647A376467&t=1793722531792&sig=HdbMDB8b7DAK0B1II34-NqzNul4&src=gds", "providerDomain": "www.jetblue.com", "price": 214, "currency": "USD", "formattedPrice": "$214", "totalPrice": 214, "formattedTotalPrice": "$214", "bagFees": { "carryOn": { "status": "included", "price": 0, "label": "Included" }, "checked": { "firstBag": { "status": "fee", "price": 49 }, "secondBag": { "status": "fee", "price": 69 } }, "disclosures": [ "Up to 62in total" ], "policy": [ { "type": "personalItem", "restrictions": { "dimensions": "Up to 16 x 12 x 7in" } }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 21 x 13 x 8in" } }, { "type": "checked", "restrictions": { "dimensions": "Up to 62in total" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi" }, { "type": "entertainment", "label": "Seatback on-demand & live TV" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "33\" seat pitch • 3-3 seat layout" }, { "type": "food", "label": "Light meal (fee)" } ] } ], "badges": [ "direct", "freeCancellation" ] }, { "providerCode": "B6", "providerUrl": "https://www.jetblue.com/booking/trip-summary?searchType=NORMAL&journeySpan=OW&origin=JFK&destination=LAX&departureDate=2026-12-03&numAdults=1&numChildren=0&numInfants=0&bookingClass=P&travelersDetails=true&fareFamily=GR&stop_mobi=true&flightNumbers=723&fareBasisCode=PI2QUEY9&source=ky_ct&referrerCode=KAYAK&kayakclickid=745079744E4D5F774B376C545133744978554E725341&t=1793722531681&sig=d96QG5W6i-kmvL0KdYbZ-CPpRN4&src=direct", "providerDomain": "www.jetblue.com", "price": 294, "currency": "USD", "formattedPrice": "$294", "totalPrice": 294, "formattedTotalPrice": "$294", "bagFees": { "carryOn": { "status": "included", "price": 0, "label": "Included" }, "checked": { "firstBag": { "status": "unknown", "price": null }, "secondBag": { "status": "unknown", "price": null } }, "disclosures": [ "Up to 50lbs per bag", "Up to 62in total" ], "policy": [ { "type": "personalItem", "restrictions": { "dimensions": "Up to 16 x 12 x 7in" } }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 21 x 13 x 8in" } }, { "type": "checked", "restrictions": { "weight": "Up to 50lbs per bag" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi" }, { "type": "entertainment", "label": "Seatback on-demand & live TV" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "33\" seat pitch • 3-3 seat layout" }, { "type": "food", "label": "Light meal (fee)" } ] } ], "badges": [ "direct", "freeCancellation" ] }, { "providerCode": "B6", "providerUrl": "https://www.jetblue.com/booking/trip-summary?searchType=NORMAL&journeySpan=OW&origin=JFK&destination=LAX&departureDate=2026-12-03&numAdults=1&numChildren=0&numInfants=0&bookingClass=N&travelersDetails=true&fareFamily=DE&stop_mobi=true&flightNumbers=723&fareBasisCode=PI2ABEN1&source=ky_ct&referrerCode=KAYAK&kayakclickid=4D5A46366F486F6C6261454C526D7044526179727267&t=1793722531750&sig=vJ-qoyhsFLlzTjuZQpNaZ3MdPq8&src=gds", "providerDomain": "www.jetblue.com", "price": 399, "currency": "USD", "formattedPrice": "$399", "totalPrice": 399, "formattedTotalPrice": "$399", "bagFees": { "carryOn": { "status": "included", "price": 0, "label": "Included" }, "checked": { "firstBag": { "status": "unknown", "price": null }, "secondBag": { "status": "unknown", "price": null } }, "disclosures": [ "Up to 62in total" ], "policy": [ { "type": "personalItem", "restrictions": { "dimensions": "Up to 16 x 12 x 7in" } }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 21 x 13 x 8in" } }, { "type": "checked", "restrictions": { "dimensions": "Up to 62in total" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi" }, { "type": "entertainment", "label": "Seatback on-demand & live TV" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "33\" seat pitch • 3-3 seat layout" }, { "type": "food", "label": "Light meal (fee)" } ] } ], "badges": [ "direct", "freeCancellation" ] }, { "providerCode": "B6", "providerUrl": "https://www.jetblue.com/booking/trip-summary?searchType=NORMAL&journeySpan=OW&origin=JFK&destination=LAX&departureDate=2026-12-03&numAdults=1&numChildren=0&numInfants=0&bookingClass=N&travelersDetails=true&fareFamily=EN&stop_mobi=true&flightNumbers=723&fareBasisCode=PI2ABEN5&source=ky_ct&referrerCode=KAYAK&kayakclickid=416E7476434635785236574B54632444455579334B51&t=1793722531709&sig=JJm79PRHdBa_ted1sxfVCKkV-oQ&src=direct", "providerDomain": "www.jetblue.com", "price": 452, "currency": "USD", "formattedPrice": "$452", "totalPrice": 452, "formattedTotalPrice": "$452", "bagFees": { "carryOn": { "status": "included", "price": 0, "label": "Included" }, "checked": { "firstBag": { "status": "unknown", "price": null }, "secondBag": { "status": "unknown", "price": null } }, "disclosures": [ "Up to 50lbs per bag", "Up to 62in total" ], "policy": [ { "type": "personalItem", "restrictions": { "dimensions": "Up to 16 x 12 x 7in" } }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 21 x 13 x 8in" } }, { "type": "checked", "restrictions": { "weight": "Up to 50lbs per bag" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)" }, { "type": "wifi", "label": "Wi-Fi available" }, { "type": "entertainment", "label": "Live TV available" } ] } ], "badges": [ "direct", "freeCancellation" ] }, { "providerCode": "B6", "providerUrl": "https://www.jetblue.com/booking/trip-summary?searchType=NORMAL&journeySpan=OW&origin=JFK&destination=LAX&departureDate=2026-12-03&numAdults=1&numChildren=0&numInfants=0&bookingClass=N&travelersDetails=true&fareFamily=ER&stop_mobi=true&flightNumbers=723&fareBasisCode=PI2ABEN9&source=ky_ct&referrerCode=KAYAK&kayakclickid=467373304D7464626A4C4732524E54325F4942565067&t=1793722531690&sig=NDIMCXfxbON3Q_1O9Dw9gdwfpoU&src=direct", "providerDomain": "www.jetblue.com", "price": 545, "currency": "USD", "formattedPrice": "$545", "totalPrice": 545, "formattedTotalPrice": "$545", "bagFees": { "carryOn": { "status": "included", "price": 0, "label": "Included" }, "checked": { "firstBag": { "status": "unknown", "price": null }, "secondBag": { "status": "unknown", "price": null } }, "disclosures": [ "Up to 50lbs per bag", "Up to 62in total" ], "policy": [ { "type": "personalItem", "restrictions": { "dimensions": "Up to 16 x 12 x 7in" } }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 21 x 13 x 8in" } }, { "type": "checked", "restrictions": { "weight": "Up to 50lbs per bag" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi" }, { "type": "entertainment", "label": "Seatback on-demand & live TV" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "33\" seat pitch • 3-3 seat layout" }, { "type": "food", "label": "Light meal (fee)" } ] } ], "badges": [ "direct", "freeCancellation" ] }, { "providerCode": "B6", "providerUrl": "https://www.jetblue.com/booking/trip-summary?searchType=NORMAL&journeySpan=OW&origin=JFK&destination=LAX&departureDate=2026-12-03&numAdults=1&numChildren=0&numInfants=0&bookingClass=C&travelersDetails=true&fareFamily=FM&stop_mobi=true&flightNumbers=723&fareBasisCode=CI2GHEJ1&source=ky_ct&referrerCode=KAYAK&kayakclickid=5134675A4C376C4D3737787A54357745696273426967&t=1793722531803&sig=2Rp2scVaJ4gK5cQuyAvU6vZ9oRA&src=gds", "providerDomain": "www.jetblue.com", "price": 2418, "currency": "USD", "formattedPrice": "$2,418", "totalPrice": 2418, "formattedTotalPrice": "$2,418", "bagFees": { "carryOn": { "status": "included", "price": 0, "label": "Included" }, "checked": { "firstBag": { "status": "included", "price": 0 }, "secondBag": { "status": "unknown", "price": null } }, "disclosures": [ "Up to 62in total" ], "policy": [ { "type": "personalItem", "restrictions": { "dimensions": "Up to 16 x 12 x 7in" } }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 21 x 13 x 8in" } }, { "type": "checked", "restrictions": { "dimensions": "Up to 62in total" } } ] }, "segmentFares": [ { "cabin": "business", "quality": [ { "type": "aircraft", "label": "Airbus A318/A319/A320/A321 (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi" }, { "type": "entertainment", "label": "Seatback on-demand & live TV" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "Full flat • 2-2 seat layout" }, { "type": "food", "label": "Meal provided" } ] } ], "badges": [ "direct", "freeCancellation" ] } ], "fareFamilies": [ { "id": "DN", "name": "Main Base", "cabin": "economy", "price": 159, "formattedPrice": "$159", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "fee", "prices": { "firstBag": 49, "secondBag": 69 } }, { "type": "seatSelection", "restriction": "fee", "prices": null }, { "type": "legroom", "restriction": "fee", "prices": null }, { "type": "change", "restriction": "fee", "prices": null }, { "type": "refundable", "restriction": "unavailable", "prices": null } ] }, { "id": "AN", "name": "Main", "cabin": "economy", "price": 214, "formattedPrice": "$214", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "fee", "prices": { "firstBag": 49, "secondBag": 69 } }, { "type": "seatSelection", "restriction": "included", "prices": null }, { "type": "legroom", "restriction": "fee", "prices": null }, { "type": "change", "restriction": "included", "prices": null }, { "type": "refundable", "restriction": "unavailable", "prices": null } ] }, { "id": "GR", "name": "Main Flex", "cabin": "economy", "price": 294, "formattedPrice": "$294", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "fee", "prices": null }, { "type": "seatSelection", "restriction": "included", "prices": null }, { "type": "legroom", "restriction": "fee", "prices": null }, { "type": "change", "restriction": "included", "prices": null }, { "type": "refundable", "restriction": "included", "prices": null } ] }, { "id": "DE", "name": "EvenMore Base", "cabin": "economy", "price": 399, "formattedPrice": "$399", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "fee", "prices": null }, { "type": "seatSelection", "restriction": "included", "prices": null }, { "type": "legroom", "restriction": "unavailable", "prices": null }, { "type": "change", "restriction": "fee", "prices": null }, { "type": "refundable", "restriction": "unavailable", "prices": null } ] }, { "id": "EN", "name": "EvenMore", "cabin": "economy", "price": 452, "formattedPrice": "$452", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "fee", "prices": null }, { "type": "seatSelection", "restriction": "included", "prices": null }, { "type": "legroom", "restriction": "included", "prices": null }, { "type": "change", "restriction": "included", "prices": null }, { "type": "refundable", "restriction": "unavailable", "prices": null } ] }, { "id": "ER", "name": "EvenMore Flex", "cabin": "economy", "price": 545, "formattedPrice": "$545", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "fee", "prices": null }, { "type": "seatSelection", "restriction": "included", "prices": null }, { "type": "legroom", "restriction": "included", "prices": null }, { "type": "change", "restriction": "included", "prices": null }, { "type": "refundable", "restriction": "included", "prices": null } ] }, { "id": "FM", "name": "Business Cabin", "cabin": "business", "price": 2418, "formattedPrice": "$2,418", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "seatSelection", "restriction": "unknown", "prices": null }, { "type": "legroom", "restriction": "unknown", "prices": null }, { "type": "change", "restriction": "unknown", "prices": null }, { "type": "refundable", "restriction": "unknown", "prices": null } ] } ], "airports": { "LAX": { "name": "Los Angeles", "city": "Los Angeles", "cityCode": "LAX", "utcOffsetHours": -8 }, "JFK": { "name": "John F Kennedy Intl", "city": "New York", "cityCode": "NYC", "utcOffsetHours": -5 } }, "airlines": { "B6": { "name": "JetBlue", "feePageUrl": "https://www.jetblue.com/at-the-airport/baggage-information" } }, "providers": { "B6": { "name": "JetBlue", "type": "Airline" } } } ``` ## Example: Round-trip itinerary `GET /flights/details` → 200 Request: ```json { "token": "eyJwIjoxLCJzIjoiODRiZjZlYzU3ZGQyNDJkZDk4NmZhNzAzM2JhY2I3ODkiLCJ2IjoxfQ", "resultId": "07804f9e1b83425f0e30951ae0c29a9a" } ``` Response: ```json { "resultId": "07804f9e1b83425f0e30951ae0c29a9a", "tripInfo": { "tripType": "roundTrip", "isDomestic": false, "isMultiAirport": false }, "legs": [ { "departure": "2026-12-03T21:15:00", "arrival": "2026-12-04T09:15:00", "duration": 420, "stops": 0, "segments": [ { "airline": "AA", "flightNumber": "104", "origin": "JFK", "destination": "LHR", "departure": "2026-12-03T21:15:00", "arrival": "2026-12-04T09:15:00", "duration": 420, "aircraft": "Boeing 787-9 Dreamliner" } ] }, { "departure": "2026-12-10T19:20:00", "arrival": "2026-12-10T22:25:00", "duration": 485, "stops": 0, "segments": [ { "airline": "AA", "flightNumber": "6942", "origin": "LHR", "destination": "JFK", "departure": "2026-12-10T19:20:00", "arrival": "2026-12-10T22:25:00", "duration": 485, "aircraft": "Boeing 777" } ] } ], "bookingOptions": [ { "providerCode": "AA", "providerUrl": "https://www.aa.com/goto/metasearch?ITEN=Kayak%2C2WBiFCCrvX%2CUS%2CroundTrip%2C4%2CA2S0C0I0Y0%2C3%2CJFK%2C0%2CLHR%2C0%2Cfalse%2C1796350500000%2Cfalse%2C1796930400000%2C0%2C0%2C1658.18%2C1%2C%23AA%7C104%7CB%7CJFK%7CLHR%7C1796350500000%7C0%7COLN0T1BV%23AA%7C6942%7CO%7CLHR%7CJFK%7C1796930400000%7C1%7COLN0T1BV&locale=en_US&dp=true&c=MSE|KYK|20170213|DST|DST|WEB||BO&trackingid=kayakclickid|eWSdwCLTV52RQUCO3C99jg", "providerDomain": "www.aa.com", "price": 830, "currency": "USD", "formattedPrice": "$830", "totalPrice": 1659, "formattedTotalPrice": "$1,659", "bagFees": { "carryOn": { "status": "included", "price": 0, "label": "Included" }, "checked": { "firstBag": { "status": "unknown", "price": null }, "secondBag": { "status": "unknown", "price": null } }, "disclosures": [ "Up to 50lbs per bag", "Up to 62in total", "Up to 50lbs per bag", "Up to 35 x 29 x 16in" ], "policy": [ { "type": "personalItem", "restrictions": { "dimensions": "Up to 17 x 13 x 7in" } }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 22 x 14 x 9in" } }, { "type": "checked", "restrictions": { "weight": "Up to 50lbs per bag" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 787-9 Dreamliner (Wide-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi" }, { "type": "entertainment", "label": "Seatback on-demand video" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "31\" seat pitch • 3-3-3 seat layout" }, { "type": "food", "label": "Meals provided" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 777 (Wide-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi (fee)" }, { "type": "entertainment", "label": "Seatback on-demand video" }, { "type": "power", "label": "USB outlet" }, { "type": "seat", "label": "31\" seat pitch • 3-4-3 seat layout" }, { "type": "food", "label": "Meal provided" } ] } ], "badges": [ "direct", "freeCancellation" ] }, { "providerCode": "AA", "providerUrl": "https://www.aa.com/goto/metasearch?ITEN=Kayak%2C2WBiFCCrvX%2CUS%2CroundTrip%2C4%2CA2S0C0I0Y0%2C3%2CJFK%2C0%2CLHR%2C0%2Cfalse%2C1796350500000%2Cfalse%2C1796930400000%2C0%2C0%2C2138.18%2C1%2C%23AA%7C104%7CO%7CJFK%7CLHR%7C1796350500000%7C0%7COLN0T1M5%23AA%7C6942%7CO%7CLHR%7CJFK%7C1796930400000%7C1%7COLN0T1M5&locale=en_US&dp=true&c=MSE|KYK|20170213|DST|DST|WEB||OO&trackingid=kayakclickid|qCXzmE0hbq3GTog9Kd9aRg", "providerDomain": "www.aa.com", "price": 1070, "currency": "USD", "formattedPrice": "$1,070", "totalPrice": 2139, "formattedTotalPrice": "$2,139", "bagFees": { "carryOn": { "status": "included", "price": 0, "label": "Included" }, "checked": { "firstBag": { "status": "unknown", "price": null }, "secondBag": { "status": "unknown", "price": null } }, "disclosures": [ "Up to 50lbs per bag", "Up to 62in total", "Up to 50lbs per bag", "Up to 35 x 29 x 16in" ], "policy": [ { "type": "personalItem", "restrictions": { "dimensions": "Up to 17 x 13 x 7in" } }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 22 x 14 x 9in" } }, { "type": "checked", "restrictions": { "weight": "Up to 50lbs per bag" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 787-9 Dreamliner (Wide-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi" }, { "type": "entertainment", "label": "Seatback on-demand video" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "31\" seat pitch • 3-3-3 seat layout" }, { "type": "food", "label": "Meals provided" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 777 (Wide-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi (fee)" }, { "type": "entertainment", "label": "Seatback on-demand video" }, { "type": "power", "label": "USB outlet" }, { "type": "seat", "label": "31\" seat pitch • 3-4-3 seat layout" }, { "type": "food", "label": "Meal provided" } ] } ], "badges": [ "direct", "freeCancellation" ] } ], "fareFamilies": [ { "id": "BASIC", "name": "Basic Economy", "cabin": "economy", "price": 830, "formattedPrice": "$830", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "fee", "prices": null }, { "type": "seatSelection", "restriction": "fee", "prices": null }, { "type": "legroom", "restriction": "fee", "prices": null }, { "type": "change", "restriction": "unavailable", "prices": null }, { "type": "refundable", "restriction": "unavailable", "prices": null } ] }, { "id": "MAIN", "name": "Main Cabin", "cabin": "economy", "price": 1070, "formattedPrice": "$1,070", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "unknown", "prices": null }, { "type": "seatSelection", "restriction": "included", "prices": null }, { "type": "legroom", "restriction": "fee", "prices": null }, { "type": "change", "restriction": "included", "prices": null }, { "type": "refundable", "restriction": "unavailable", "prices": null } ] } ], "airports": { "LHR": { "name": "Heathrow", "city": "London", "cityCode": "LON", "utcOffsetHours": 0 }, "JFK": { "name": "John F Kennedy Intl", "city": "New York", "cityCode": "NYC", "utcOffsetHours": -5 } }, "airlines": { "AA": { "name": "American Airlines", "feePageUrl": "https://www.aa.com/web/i18n/travel-info/baggage/checked-baggage-policy.html" } }, "providers": { "AA": { "name": "American Airlines", "type": "Airline" }, "AS": { "name": "Alaska Airlines", "type": "Airline" }, "AY": { "name": "Finnair", "type": "Airline" }, "IB": { "name": "Iberia", "type": "Airline" }, "ASWHISKY": { "name": "Alaska Airlines", "type": "Airline" }, "BA": { "name": "British Airways", "type": "Airline" } } } ``` ## Example: Multi-city itinerary `GET /flights/details` → 200 Request: ```json { "token": "eyJwIjoxLCJzIjoiZjVmZDc1YzM4NTM5NDhkZGE2ZjAyZjE3MDQ3ZjNmM2EiLCJ2IjoxfQ", "resultId": "84604222a90ff5883c97f139be649c27" } ``` Response: ```json { "resultId": "84604222a90ff5883c97f139be649c27", "tripInfo": { "tripType": "multiCity", "isDomestic": true, "isMultiAirport": false }, "legs": [ { "departure": "2026-12-03T17:29:00", "arrival": "2026-12-03T23:12:00", "duration": 523, "stops": 1, "segments": [ { "airline": "AS", "flightNumber": "41", "origin": "JFK", "destination": "SFO", "departure": "2026-12-03T17:29:00", "arrival": "2026-12-03T21:05:00", "duration": 396, "aircraft": "Boeing 737 MAX 9" }, { "airline": "AS", "flightNumber": "661", "origin": "SFO", "destination": "LAX", "departure": "2026-12-03T21:45:00", "arrival": "2026-12-03T23:12:00", "duration": 87, "aircraft": "Boeing 737-900 (winglets)" } ] }, { "departure": "2026-12-10T13:50:00", "arrival": "2026-12-10T15:16:00", "duration": 86, "stops": 0, "segments": [ { "airline": "AS", "flightNumber": "465", "origin": "LAX", "destination": "SFO", "departure": "2026-12-10T13:50:00", "arrival": "2026-12-10T15:16:00", "duration": 86, "aircraft": "Boeing 737 MAX 9" } ] }, { "departure": "2026-12-17T09:10:00", "arrival": "2026-12-17T22:29:00", "duration": 619, "stops": 1, "segments": [ { "airline": "AS", "flightNumber": "3178", "origin": "SFO", "destination": "PSP", "departure": "2026-12-17T09:10:00", "arrival": "2026-12-17T10:51:00", "duration": 101, "aircraft": "Embraer 175" }, { "airline": "AS", "flightNumber": "242", "origin": "PSP", "destination": "JFK", "departure": "2026-12-17T14:14:00", "arrival": "2026-12-17T22:29:00", "duration": 315, "aircraft": "Boeing 737-800 (winglets)" } ] } ], "bookingOptions": [ { "providerCode": "AS", "providerUrl": "https://www.alaskaair.com/search/cart?FT=MC&F1=JFK%7CSFO%7C12%2F03%2F2026%7C41%2CAS%7CS%7CN%7CFBX%3AOH2OAJBN&F2=SFO%7CLAX%7C12%2F03%2F2026%7C661%2CAS%7CS%7CN%7CFBX%3AOH2OAJBN&F3=LAX%7CSFO%7C12%2F10%2F2026%7C465%2CAS%7CS%7CN%7CFBX%3AGH2OGVBN&F4=SFO%7CPSP%7C12%2F17%2F2026%7C3178%2CAS%7CS%7CN%7CFBX%3AOH2OAJBN&F5=PSP%7CJFK%7C12%2F17%2F2026%7C242%2CAS%7CS%7CN%7CFBX%3AOH2OAJBN&A=1&C=0&L=0&RT=false&ShoppingMethod=multicity&meta=KYK_CS_X&shoppingmethod=standard&requesttype=none&kayakclickid=WdlQ3imwJJ6TRCEzSvqEHg", "providerDomain": "www.alaskaair.com", "price": 463, "currency": "USD", "formattedPrice": "$463", "totalPrice": 463, "formattedTotalPrice": "$463", "bagFees": { "policy": [ { "type": "personalItem", "restrictions": {} }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 21 x 13 x 8in" } }, { "type": "checked", "restrictions": { "dimensions": "Up to 62in total" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 737 MAX 9 (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi (fee)" }, { "type": "entertainment", "label": "Streaming entertainment" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "31\" seat pitch • 3-3 seat layout" }, { "type": "food", "label": "Preorder light meal (fee)" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 737-900 (winglets) (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi (fee)" }, { "type": "entertainment", "label": "Streaming entertainment" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "31\" seat pitch • 3-3 seat layout" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 737 MAX 9 (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi (fee)" }, { "type": "entertainment", "label": "Streaming entertainment" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "31\" seat pitch • 3-3 seat layout" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Embraer 175 (Narrow-body jet)" }, { "type": "wifi", "label": "Ultra-high speed Wi-Fi (Starlink)" }, { "type": "entertainment", "label": "Streaming entertainment" }, { "type": "seat", "label": "31\" seat pitch • 2-2 seat layout" }, { "type": "food", "label": "Snacks provided" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 737-800 (winglets) (Narrow-body jet)" }, { "type": "wifi", "label": "Streaming capable Wi-Fi (fee)" }, { "type": "entertainment", "label": "Streaming entertainment" }, { "type": "power", "label": "Power & USB outlets" }, { "type": "seat", "label": "31\" seat pitch • 3-3 seat layout" }, { "type": "food", "label": "Preorder light meal (fee)" } ] } ], "badges": [ "direct", "freeCancellation" ] }, { "providerCode": "AS", "providerUrl": "https://www.alaskaair.com/search/cart?FT=MC&F1=JFK%7CSFO%7C12%2F03%2F2026%7C41%2CAS%7CC%7CN%7CFBX%3AOH2OAJMN&F2=SFO%7CLAX%7C12%2F03%2F2026%7C661%2CAS%7CC%7CN%7CFBX%3AOH2OAJMN&F3=LAX%7CSFO%7C12%2F10%2F2026%7C465%2CAS%7CC%7CN%7CFBX%3AGH2OGVMN&F4=SFO%7CPSP%7C12%2F17%2F2026%7C3178%2CAS%7CC%7CN%7CFBX%3AOH2OAJMN&F5=PSP%7CJFK%7C12%2F17%2F2026%7C242%2CAS%7CC%7CN%7CFBX%3AOH2OAJMN&A=1&C=0&L=0&RT=false&ShoppingMethod=multicity&meta=KYK_CS_MC&shoppingmethod=standard&requesttype=none&kayakclickid=tunUTbqkpKroQAQu0lOyYA", "providerDomain": "www.alaskaair.com", "price": 628, "currency": "USD", "formattedPrice": "$628", "totalPrice": 628, "formattedTotalPrice": "$628", "bagFees": { "policy": [ { "type": "personalItem", "restrictions": {} }, { "type": "carryOn", "restrictions": { "dimensions": "Up to 21 x 13 x 8in" } }, { "type": "checked", "restrictions": { "dimensions": "Up to 62in total" } } ] }, "segmentFares": [ { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 737 MAX 9 (Narrow-body jet)" }, { "type": "wifi", "label": "Wi-Fi available" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 737-900 (winglets) (Narrow-body jet)" }, { "type": "wifi", "label": "Wi-Fi available" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 737 MAX 9 (Narrow-body jet)" }, { "type": "wifi", "label": "Wi-Fi available" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Embraer 175 (Narrow-body jet)" }, { "type": "wifi", "label": "Wi-Fi available" } ] }, { "cabin": "economy", "quality": [ { "type": "aircraft", "label": "Boeing 737-800 (winglets) (Narrow-body jet)" }, { "type": "wifi", "label": "Wi-Fi available" } ] } ], "badges": [ "direct", "freeCancellation" ] } ], "fareFamilies": [ { "id": "SV", "name": "Saver", "cabin": "economy", "price": 463, "formattedPrice": "$463", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "fee", "prices": null }, { "type": "seatSelection", "restriction": "unavailable", "prices": null }, { "type": "legroom", "restriction": "fee", "prices": null }, { "type": "change", "restriction": "unavailable", "prices": null }, { "type": "refundable", "restriction": "unavailable", "prices": null } ] }, { "id": "MA", "name": "Main", "cabin": "economy", "price": 628, "formattedPrice": "$628", "amenities": [ { "type": "carryOnBag", "restriction": "included", "prices": { "firstBag": 0 } }, { "type": "checkedBag", "restriction": "fee", "prices": null }, { "type": "seatSelection", "restriction": "included", "prices": null }, { "type": "legroom", "restriction": "fee", "prices": null }, { "type": "change", "restriction": "included", "prices": null }, { "type": "refundable", "restriction": "unavailable", "prices": null } ] } ], "airports": { "LAX": { "name": "Los Angeles", "city": "Los Angeles", "cityCode": "LAX", "utcOffsetHours": -8 }, "PSP": { "name": "Palm Springs", "city": "Palm Springs", "cityCode": "PSP" }, "SFO": { "name": "San Francisco", "city": "San Francisco", "cityCode": "SFO", "utcOffsetHours": -8 }, "JFK": { "name": "John F Kennedy Intl", "city": "New York", "cityCode": "NYC", "utcOffsetHours": -5 } }, "airlines": { "AS": { "name": "Alaska Airlines", "feePageUrl": "https://www.alaskaair.com/content/travel-info/policies/baggage-checked.aspx?lid=home-page:quick-links::checked-baggage" } }, "providers": { "AS": { "name": "Alaska Airlines", "type": "Airline" } } } ``` ## Skill Claude Code, Cursor, and Codex can search flights with the Ktemia flight search skill. https://github.com/Ktemiaa/ktemia-flights-skill Install in Claude Code: ``` /plugin marketplace add Ktemiaa/ktemia-flights-skill /plugin install ktemia@ktemia ``` Set `KTEMIA_API_KEY` in the environment. The skill looks up airport codes, asks when a name matches several cities, and returns each seller’s booking URL. It does not book tickets. Do not guess origin, destination, or dates. Docs: https://www.ktemia.com/docs/api/flights/details/