- Previous: GET /stationlist
- Up: Metasearch API
- Next: Cargo API
GET /lowfaresearch
GET /lowfaresearch
Provides the lowest fares and routing possibilities for a given origin and destination and a given inbound- and outbound date range.
Currently the API only returns itineraries that are sold on klm.com.
RESOURCE
GET /lowfaresearch/
QUERY PARAMETERS
Name |
Type |
Description |
Mandatory |
Example |
msp |
String |
Meta search party identification code. |
Y |
QO (Test account) |
org |
String |
Three letter IATA code of origin airport/city. |
Y |
AMS (Amsterdam) |
dest |
String |
Three letter IATA code of destination airport/city. |
Y |
BCN (Barcelona) |
departureDate |
String |
Departure date (yyyy-mm-dd). |
Y |
2017-07-20 |
arrivalDate |
String |
Arrival date (yyyy-mm-dd) (only for return trips). |
N |
2017-07-27 |
cabinClass |
String |
Cabin class. |
N |
Economy |
numberOfAdults |
Integer |
Number of adults traveling. |
N |
2 |
maxConnections |
Integer |
Maximum number of connections. |
N |
3 |
RESPONSE PARAMETERS
Name |
Type |
Description |
KLM_MetaSearchParty |
String |
Meta search party identification code for which the request has been fulfilled. |
PricedItineraries |
Object |
List containing all priced itineraries found. |
..DeeplinkURL |
String |
Deeplink to airline website page for the itinerary. |
..AirItinerary |
Object |
Object containing routing information for the itinerary. |
….OriginDestinationOptions |
Object |
Object containing routing information for one bound of the itinerary. |
……FlightSegment |
Object |
Object containing routing information for one segment of the itinerary. |
……..FlightNumber |
String |
Flightnumber (Two letters + four numbers) |
……..DepartureAirport |
Object |
Object containing information about the departure airport of the segment. |
……….LocationCode |
String |
Three letter IATA code of the departure airport of the segment. |
……….Terminal |
String |
Name of the terminal from which the flight departs. |
……..ArrivalAirport |
Object |
Object containing information about the arrival airport of the segment. |
……….LocationCode |
String |
Three letter IATA code of the arrival airport of the segment. |
..........Terminal |
String |
Name of the terminal where the flight arrives. |
……..OperatingAirline |
Object |
Object containing information about the airline that operates the flight. |
……….Code |
String |
Two letter code of the airline. |
……….Value |
String |
Full name of the airline. |
……..Equipment |
Object |
Object containing information about the aircraft that is used to operate the flight. |
……….AirEquipType |
String |
Three letter code of the aircraft type. |
……….Value |
String |
Full name of the aircraft type. |
……..DepartureDateTime |
String |
Departure date and time of the flight (yyyy-mm-ddTHH:MM:SS). |
……..ArrivalDateTime |
String |
Arrival date and time of the flight (yyyy-mm-ddTHH:MM:SS). |
……..StopQuantity |
String |
Number of stops the flight makes on its way to its destination. |
.. AirItineraryPricingInfo |
Object |
Object containing fare information for the itinerary. |
….ItinTotalFare |
Object |
Object containing pricing information for the itinerary. |
……BaseFare |
Object |
Object containing information on the base fare for the itinerary. |
……..Amount |
Decimal |
Base fare amount. |
……..CurrencyCode |
String |
Currency in which the base fare amount is provided. |
……Taxes |
Object |
Object containing information on the taxes for the itinerary. |
……..Amount |
Decimal |
Taxes amount. |
……..CurrencyCode |
String |
Currency in which the taxes amount is provided. |
……Fees |
Object |
Object containing information on the fees for the itinerary. |
……..Amount |
Decimal |
Fees amount. |
……..CurrencyCode |
String |
Currency in which the fees are provided. |
……..Value |
String |
Type of fee returned. |
……TotalFare |
Object |
Object containing information on the total price of the itinerary. |
……..Amount |
Decimal |
Total price of the itinerary. |
……..CurrencyCode |
String |
Currency in which the total fare is provided. |
….FareInfos |
Object |
Object containing information on the fare basis. |
……FareReference |
Object |
Object containing information on the fare reference. |
……..Value |
String |
Fare basis code. |
SAMPLE REQUEST
GET https://api.airfranceklm.com/travel/Metasearch/lowfaresearch/QO/AMS/BCN/2017-07-20/2017-07-27?cabinClass=economy&numberOfAdults=2&maxConnections=3
SAMPLE RESPONSE
{ "Success": {}, "Errors": null, "Warnings": null, "KLM_MetaSearchParty": "QO", "PricedItineraries": [ { "DeeplinkURL": "https://www.klm.com/travel/nl_en/apps/ebt/calendar.htm?application=EBT7&country=nl&language=en&numberOfAdults=2&numberOfChildren=0&numberOfInfants=0&msp=Operations+Research+(ITCDOR)&mp=QO&dev=5&cur=EUR&tp=423.88&tf=332.00&tt=81.88&ts=10.00&cabinClass=M&trip=AMS:20170720@1655:KL1675:Q>BCN-BCN:20170727@1955:KL1676:R>AMS&ref=MS,QO,cur=,tpcur=EUR,metascur=,fb=QSRNL.RSRNL,fee=10.00,oper=KL..KL,srv=873", "AirItinerary": { "OriginDestinationOptions": [ { "FlightSegment": [ { "FlightNumber": "KL1675", "DepartureAirport": { "LocationCode": "AMS", "Terminal": "" }, "ArrivalAirport": { "LocationCode": "BCN", "Terminal": "Terminal 1" }, "OperatingAirline": { "Code": "KL", "Value": "KLM Royal Dutch Airlines" }, "Equipment": [ { "AirEquipType": "73H", "Value": "Boeing 737-800 (winglets) Passenger" } ], "DepartureDateTime": "2017-07-20T16:55:00", "ArrivalDateTime": "2017-07-20T19:05:00", "StopQuantity": "0" } ] }, { "FlightSegment": [ { "FlightNumber": "KL1676", "DepartureAirport": { "LocationCode": "BCN", "Terminal": "Terminal 1" }, "ArrivalAirport": { "LocationCode": "AMS", "Terminal": "" }, "OperatingAirline": { "Code": "KL", "Value": "KLM Royal Dutch Airlines" }, "Equipment": [ { "AirEquipType": "73H", "Value": "Boeing 737-800 (winglets) Passenger" } ], "DepartureDateTime": "2017-07-27T19:55:00", "ArrivalDateTime": "2017-07-27T22:10:00", "StopQuantity": "0" } ] } ] }, "AirItineraryPricingInfo": { "ItinTotalFare": [ { "BaseFare": { "Amount": 166.00, "CurrencyCode": "EUR" }, "Taxes": [ { "Amount": 40.94, "CurrencyCode": "EUR" } ], "Fees": [ { "Amount": 5.00, "CurrencyCode": "EUR", "Value": "Booking Fee" } ], "TotalFare": { "Amount": 211.94, "CurrencyCode": "EUR" } } ], "FareInfos": [ { "FareReference": [ { "Value": "QSRNL" } ] }, { "FareReference": [ { "Value": "RSRNL" } ] } ], } }, { "DeeplinkURL": "https://www.klm.com/travel/nl_en/apps/ebt/calendar.htm?application=EBT7&country=nl&language=en&numberOfAdults=2&numberOfChildren=0&numberOfInfants=0&msp=Operations+Research+(ITCDOR)&mp=QO&dev=5&cur=EUR&tp=423.88&tf=332.00&tt=81.88&ts=10.00&cabinClass=M&trip=AMS:20170720@0810:KL1665:Q>BCN-BCN:20170727@1955:KL1676:R>AMS&ref=MS,QO,cur=,tpcur=EUR,metascur=,fb=QSRNL.RSRNL,fee=10.00,oper=KL..KL,srv=873", "AirItinerary": { "OriginDestinationOptions": [ { "FlightSegment": [ { "FlightNumber": "KL1665", "DepartureAirport": { "LocationCode": "AMS", "Terminal": "" }, "ArrivalAirport": { "LocationCode": "BCN", "Terminal": "Terminal 1" }, "OperatingAirline": { "Code": "KL", "Value": "KLM Royal Dutch Airlines" }, "Equipment": [ { "AirEquipType": "73H", "Value": "Boeing 737-800 (winglets) Passenger" } ], "DepartureDateTime": "2017-07-20T08:10:00", "ArrivalDateTime": "2017-07-20T10:20:00", "StopQuantity": "0" } ] }, { "FlightSegment": [ { "FlightNumber": "KL1676", "DepartureAirport": { "LocationCode": "BCN", "Terminal": "Terminal 1" }, "ArrivalAirport": { "LocationCode": "AMS", "Terminal": "" }, "OperatingAirline": { "Code": "KL", "Value": "KLM Royal Dutch Airlines" }, "Equipment": [ { "AirEquipType": "73H", "Value": "Boeing 737-800 (winglets) Passenger" } ], "DepartureDateTime": "2017-07-27T19:55:00", "ArrivalDateTime": "2017-07-27T22:10:00", "StopQuantity": "0" } ] } ] }, "AirItineraryPricingInfo": { "ItinTotalFare": [ { "BaseFare": { "Amount": 166.00, "CurrencyCode": "EUR" }, "Taxes": [ { "Amount": 40.94, "CurrencyCode": "EUR" } ], "Fees": [ { "Amount": 5.00, "CurrencyCode": "EUR", "Value": "Booking Fee" } ], "TotalFare": { "Amount": 211.94, "CurrencyCode": "EUR" } } ], "FareInfos": [ { "FareReference": [ { "Value": "QSRNL" } ] }, { "FareReference": [ { "Value": "RSRNL" } ] } ], } } [...] ], "TimeStamp": "2017-06-09T07:05:58", "Version": 2.0 }
ERROR CODES
Error Code |
Description |
906 |
API error: Response from TripPlanner: XML seems to be invalid. |
907 |
API error: Tagging seems to be invalid. |
908 |
API error: Currency is not supported. |
909 |
Error in request: origin not bookable/unknown. |
999 |
Internal error: General MetaSearch calculation error. |
4001 |
Error in request: there should be 1 or 2 OriginDestinationInformation elements for one way or round-trips. |
4002 |
Error in request: missing origin, destination or departure date. |
4003 |
Error in request: open jaws not allowed at the origin location, only at destination location. |
4004 |
Error in request: the number of adults and children can't exceed 9. |
4005 |
Error in request: Invalid or incorrect formatted date(s) ==> 'yyyy-mm-dd'. |
4006 |
Error in request: Quantity not defined or value not allowed. For each person with BirthDate add new AirTraveler. |
4007 |
Error in request: the number of infants can't exceed the number of adults. |
4008 |
Airport or city code should be an IATA code. |
4009 |
Error in request: Sum of before and after window can't exceed the maximum of 6 days. |
4010 |
Error in request: Date(s) can't be before 2011 or after 2038. |
4011 |
No country found for Airport or city code. |
4012 |
At least one adult must be traveling with child or infant. |
SAMPLE ERROR RESPONSE
{ "Success": null, "Errors": [ { "Type": "1", "ShortText": "Error in request: origin not bookable/unknown.", "Code": "909" } ], "Warnings": null, "KLM_MetaSearchParty": "QO", "PricedItineraries": null, "Version": 1.0 }
- Previous: GET /stationlist
- Up: Metasearch API
- Next: Cargo API
Docs Navigation
- Air France-KLM Documentation
- Open Data
- Baggage allowance API Process flow - Pre-booking (inspiration) context
- Introduction
- Data scope
- Quick peak
- How to use
- Services overview
- Header
- GET All Allowances without Loyalty
- V1- All Allowances without Loyalty- Request
- V1- All Allowances without Loyalty- Response
- GET Base Allowances
- V1- Base Allowance - Request
- V1- Base Allowance - Response
- GET Loyalty Allowances
- V1- Loyalty Allowance - Request
- V1- Loyalty Allowance - Response
- GET Paid Options with Loyalty
- V1- GET Paid Options with Loyalty - Request
- V1- GET Paid Options with Loyalty - Response
- GET Paid Options without Loyalty
- V1- GET Paid Options without Loyalty - Request
- V1- GET Paid Options without Loyalty - Response
- GET All Allowances with Loyalty
- V1- All Allowances with Loyalty- Request
- V1- All Allowances with Loyalty- Response
- Get Started
- Offers API
- GET /reference-data v1
- GET /reference-data/deals v1
- GET /search-context v1
- POST /lowest-fare-offers v1
- GET /lowest-fare-offers v1
- POST /available-offers v1
- GET /available-offers v1
- GET /flightDetails
- POST /upsell-offers v1
- GET /upsell-offers v1
- GET /priceDetails v1
- GET /tax-breakdown
- GET /ticket-conditions
- GET /ticket-conditions with Reservation ID
- GET /ticket-conditions with Trip Parameters
- POST /shopping-carts
- GET /related-products
- POST /related-products/shopping-carts
- POST /mail-my-search
- POST /flights-availability v1
- POST /best-fare-offers v1
- POST/ bestOffers/feed
- Errors Code
- POST /available-offers/all v1
- POST /best-fare-offers/all-deals v1
- Inspire API / Amenities
- Flight Status API
- Network and Schedule API
- Baggage allowance API Process flow - Pre-booking (inspiration) context
- Metasearch API
- Cargo API
- All Other APIS