Flight Listings API
Guidance and examples for accessing the Flight Listings API
The Flight Listings API allows you to search Expedia flight inventory by date, origin, destination, and other parameters to return a listing of available flights.
Endpoint
Method | Endpoint |
---|---|
GET | https://apim.expedia.com/flights/listings |
Required Headers
Key: | Expedia API key |
Authorization: | Expedia API Authorization String |
Accept: | application/vnd.exp-flight.v3+json |
Partner-Transaction-Id: | Partner TransactionID String |
Optional Headers
Accept-Encoding: | gzip More info on gzip |
---|
Next Steps
- Deeplink customer to Expedia website for booking.
- Book passenger via Flight Booking API.
- Get details of selected flight via Flight Details API.
- Get baggage details of each flight via Baggage Fee API.
- Get seat occupancy and layout details via Seatmap API.
- Get fare rules details via Fare rules API.
- Build a package with the selected flight via the Package Search API.
Example of Search Request
Query Examples – Traditional (One-Step) Flight Search
Request flight offers with all flight segments listed in a single API response.
The number of segment#.origin
, segment#.destination
, and segment#.departureDate
elements indicate the type of flights requested (one way, roundtrip, or multi-destination).
One Way Search Request
Only one segment requested.
https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=FLL&segment1.departureDate=2022-09-01&adult=1&senior=1&childrenAges=2,3
Round Trip Search Request
Two segments requested.
https://apim.expedia.com/flights/listings?segment1.origin=EWR&segment1.destination=LAX&segment1.departureDate=2022-09-01&segment2.origin=LAX&segment2.destination=EWR&segment2.departureDate=2022-09-05&adult=1
Multiple Stop Search Request
Three to six segments requested.
https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=ATL&segment1.departureDate=2022-09-01&segment2.origin=ATL&segment2.destination=ORD&segment2.departureDate=2022-09-05&segment3.origin=ORD&segment3.destination=SEA&segment3.departureDate=2022-09-10&segment4.origin=SEA&segment4.destination=LAS&segment4.departureDate=2022-09-15&adult=1
Response Example – One-Way Flight
The Flight Search API response can get quite large, but the essential components of all Search API responses can be seen in the simple example below:
{
"Segments": [{
"SegmentId": "MTRfUHVibGlzaGVk",
"FlightDuration": "PT4H34M",
"TotalStops": 0,
"DepartureArrivalDayDifference": 1,
"AirportChange": false,
"SeatsLeft": 10,
"FareType": "PUBLISHED",
"Legs": [{
"DepartureAirport": {
"Code": "LAS",
"Name": "McCarran Intl.",
"City": "Las Vegas",
"Province": "NV",
"Country": "USA",
"Latitude": "36.085393",
"Longitude": "-115.150098"
},
"ArrivalAirport": {
"Code": "FLL",
"Name": "Fort Lauderdale - Hollywood Intl.",
"City": "Fort Lauderdale",
"Province": "FL",
"Country": "USA",
"Latitude": "26.071529",
"Longitude": "-80.1449"
},
"DepartureDateTime": "2022-09-01T22:40:00-07:00",
"ArrivalDateTime": "2022-09-02T06:14:00-04:00",
"FlightNumber": "954",
"MarketingAirlineCode": "NK",
"MarketingAirlineName": "Spirit Airlines",
"EquipmentCode": "32A",
"FlightOnTimePercentage": "80",
"EquipmentName": "AIRBUS INDUSTRIE A320 SHARKLETS",
"FlightDuration": "PT4H34M",
"SeatMapAvailable": false,
"FlightDistance": {
"Value": "2161",
"Unit": "MI"
},
"BookingCode": "R",
"CabinClass": "ECONOMY",
"FareBasisCode": "R7XSNR",
"MealOptions": [
"FOOD_FOR_PURCHASE"
],
"Amenities": [
"ENTERTAINMENT",
"WIFI",
"POWER"
]
}]
},
{
"SegmentId": "MTQwX1B1Ymxpc2hlZA==",
"FlightDuration": "PT6H31M",
"TotalStops": 1,
"DepartureArrivalDayDifference": 0,
"AirportChange": false,
"SeatsLeft": 10,
"FareType": "PUBLISHED",
"Legs": [{
"DepartureAirport": {
"Code": "LAS",
"Name": "McCarran Intl.",
"City": "Las Vegas",
"Province": "NV",
"Country": "USA",
"Latitude": "36.085393",
"Longitude": "-115.150098"
},
"ArrivalAirport": {
"Code": "DFW",
"Name": "Dallas-Fort Worth Intl.",
"City": "Dallas",
"Province": "TX",
"Country": "USA",
"Latitude": "32.897552",
"Longitude": "-97.040434"
},
"DepartureDateTime": "2022-09-01T12:04:00-07:00",
"ArrivalDateTime": "2022-09-01T16:47:00-05:00",
"FlightNumber": "470",
"MarketingAirlineCode": "NK",
"MarketingAirlineName": "Spirit Airlines",
"EquipmentCode": "32B",
"FlightOnTimePercentage": "80",
"EquipmentName": "AIRBUS INDUSTRIE A321 SHARKLETS",
"FlightDuration": "PT2H43M",
"ConnectionTime": "PT1H0M",
"SeatMapAvailable": false,
"FlightDistance": {
"Value": "1050",
"Unit": "MI"
},
"BookingCode": "R",
"CabinClass": "ECONOMY",
"FareBasisCode": "R7XSNR",
"Amenities": [
"WIFI",
"POWER"
]
},
{
"DepartureAirport": {
"Code": "DFW",
"Name": "Dallas-Fort Worth Intl.",
"City": "Dallas",
"Province": "TX",
"Country": "USA",
"Latitude": "32.897552",
"Longitude": "-97.040434"
},
"ArrivalAirport": {
"Code": "FLL",
"Name": "Fort Lauderdale - Hollywood Intl.",
"City": "Fort Lauderdale",
"Province": "FL",
"Country": "USA",
"Latitude": "26.071529",
"Longitude": "-80.1449"
},
"DepartureDateTime": "2022-09-01T17:47:00-05:00",
"ArrivalDateTime": "2022-09-01T21:35:00-04:00",
"FlightNumber": "470",
"MarketingAirlineCode": "NK",
"MarketingAirlineName": "Spirit Airlines",
"EquipmentCode": "32B",
"FlightOnTimePercentage": "80",
"EquipmentName": "AIRBUS INDUSTRIE A321 SHARKLETS",
"FlightDuration": "PT2H48M",
"ConnectionTime": "PT1H0M",
"SeatMapAvailable": false,
"FlightDistance": {
"Value": "1113",
"Unit": "MI"
},
"BookingCode": "R",
"CabinClass": "ECONOMY",
"FareBasisCode": "R7XSNR",
"MealOptions": [
"FOOD_FOR_PURCHASE"
]
}
]
}
],
"Offers": [{
"OfferId": "v5-sos-42b700553889490c9e966329ac528b67-3-1~0.S~AQoCCAESBwjUBBABGAEgASAMIAcgDSAJKAJYAQ~AQoiCiAIzpYBEgM5NTQYi5ABIOVaKLSouwEwxqq7AThSQABYARIKCAEQARgBKgJOSxgEIgQIARABIgQIAhACIgQIAxABKAIoAygEMAI+AQoiCiAIzpYBEgM5NTQYi5ABIOVaKLSouwEwxqq7AThSQABYARIKCAEQARgBKgJOSxgEIgQIARABIgQIAhACIgQIAxABKAIoAygEMAI",
"SplitTicket": false,
"OpaqueFlight": false,
"Free24HourCancellation": false,
"Links": {
"WebDetails": {
"Method": "GET",
"Href": "https://www.expedia.com/go/udp?CCheck=1&NumAdult=1&NumSenior=1&NumChild=2&ChildrenAges=2|3&Class=3&Sort=10&TripType=OneWay&ProductType=air&eapid=0-1&ServiceVersion=V5&MessageGuid=80f50380-34fa-11e9-9415-0a6b914daa30&langid=1033&piid=v5-sos-42b700553889490c9e966329ac528b67-3-1~0.S~AQoCCAESBwjUBBABGAEgASAMIAcgDSAJKAJYAQ~AQoiCiAIzpYBEgM5NTQYi5ABIOVaKLSouwEwxqq7AThSQABYARIKCAEQARgBKgJOSxgEIgQIARABIgQIAhACIgQIAxABKAIoAygEMAI&Price=545.16&CurrencyCode=USD¤cy=USD&DepartureTLA=L1:LAS&ArrivalTLA=L1:FLL&DepartureDate=L1:2022-09-01&ArrivalDate=L1:2022-09-02&RefundableFlightsOnly=N"
}
},
"SegmentIds": [
"MTRfUHVibGlzaGVk"
],
"OfferPrice": {
"TotalPrice": {
"Value": "545.16",
"Currency": "USD"
},
"BasePrice": {
"Value": "453.92",
"Currency": "USD"
},
"TotalTaxes": {
"Value": "91.24",
"Currency": "USD"
},
"TotalTaxesAndFees": {
"Value": "91.24",
"Currency": "USD"
},
"AveragePricePerTicket": {
"Value": "136.29",
"Currency": "USD",
"Count": 4
},
"PricePerPassengerCategory": [{
"Category": "ADULT",
"Count": 1,
"TotalPrice": {
"Value": "136.29",
"Currency": "USD"
},
"BasePrice": {
"Value": "113.48",
"Currency": "USD"
},
"TotalTaxes": {
"Value": "22.81",
"Currency": "USD"
}
},
{
"Category": "CHILD",
"Count": 2,
"TotalPrice": {
"Value": "136.29",
"Currency": "USD"
},
"BasePrice": {
"Value": "113.48",
"Currency": "USD"
},
"TotalTaxes": {
"Value": "22.81",
"Currency": "USD"
}
},
{
"Category": "SENIOR",
"Count": 1,
"TotalPrice": {
"Value": "136.29",
"Currency": "USD"
},
"BasePrice": {
"Value": "113.48",
"Currency": "USD"
},
"TotalTaxes": {
"Value": "22.81",
"Currency": "USD"
}
}
]
},
"Refundable": false,
"RefundPenalty": [{
"SegmentIds": [
"MTRfUHVibGlzaGVk"
],
"PreTripChange": {
"Allow": "YES"
}
}],
"International": false,
"TicketType": "ETicket"
},
{
"OfferId": "v5-sos-42b700553889490c9e966329ac528b67-39-1~0.S~AQoCCAESBwjUBBABGAEgASAMIAcgDSAJKAJYAQ~AQoiCiAIzpYBEgM0NzAYi5ABIOVaKLijuwEwv6a7AThSQABYARIKCAEQARgBKgJOSxgEIgQIARABIgQIAhACIgQIAxABKAIoAygEMAI+AQoiCiAIzpYBEgM0NzAYi5ABIOVaKLijuwEwv6a7AThSQABYARIKCAEQARgBKgJOSxgEIgQIARABIgQIAhACIgQIAxABKAIoAygEMAI",
"SplitTicket": false,
"OpaqueFlight": false,
"Free24HourCancellation": false,
"Links": {
"WebDetails": {
"Method": "GET",
"Href": "https://www.expedia.com/go/udp?CCheck=1&NumAdult=1&NumSenior=1&NumChild=2&ChildrenAges=2|3&Class=3&Sort=10&TripType=OneWay&ProductType=air&eapid=0-1&ServiceVersion=V5&MessageGuid=80f50380-34fa-11e9-9415-0a6b914daa30&langid=1033&piid=v5-sos-42b700553889490c9e966329ac528b67-39-1~0.S~AQoCCAESBwjUBBABGAEgASAMIAcgDSAJKAJYAQ~AQoiCiAIzpYBEgM0NzAYi5ABIOVaKLijuwEwv6a7AThSQABYARIKCAEQARgBKgJOSxgEIgQIARABIgQIAhACIgQIAxABKAIoAygEMAI&Price=561.96&CurrencyCode=USD¤cy=USD&DepartureTLA=L1:LAS&ArrivalTLA=L1:FLL&DepartureDate=L1:2022-09-01&ArrivalDate=L1:2022-09-01&RefundableFlightsOnly=N"
}
},
"SegmentIds": [
"MTQwX1B1Ymxpc2hlZA=="
],
"OfferPrice": {
"TotalPrice": {
"Value": "561.96",
"Currency": "USD"
},
"BasePrice": {
"Value": "453.92",
"Currency": "USD"
},
"TotalTaxes": {
"Value": "108.04",
"Currency": "USD"
},
"TotalTaxesAndFees": {
"Value": "108.04",
"Currency": "USD"
},
"AveragePricePerTicket": {
"Value": "140.49",
"Currency": "USD",
"Count": 4
},
"PricePerPassengerCategory": [{
"Category": "ADULT",
"Count": 1,
"TotalPrice": {
"Value": "140.49",
"Currency": "USD"
},
"BasePrice": {
"Value": "113.48",
"Currency": "USD"
},
"TotalTaxes": {
"Value": "27.01",
"Currency": "USD"
}
},
{
"Category": "CHILD",
"Count": 2,
"TotalPrice": {
"Value": "140.49",
"Currency": "USD"
},
"BasePrice": {
"Value": "113.48",
"Currency": "USD"
},
"TotalTaxes": {
"Value": "27.01",
"Currency": "USD"
}
},
{
"Category": "SENIOR",
"Count": 1,
"TotalPrice": {
"Value": "140.49",
"Currency": "USD"
},
"BasePrice": {
"Value": "113.48",
"Currency": "USD"
},
"TotalTaxes": {
"Value": "27.01",
"Currency": "USD"
}
}
]
},
"Refundable": false,
"RefundPenalty": [{
"SegmentIds": [
"MTQwX1B1Ymxpc2hlZA=="
],
"PreTripChange": {
"Allow": "NO"
}
}],
"International": false,
"TicketType": "ETicket"
}
],
"SearchCities": [{
"Code": "FLL",
"City": "Fort Lauderdale",
"Province": "FL",
"Country": "USA"
},
{
"Code": "LAS",
"City": "Las Vegas",
"Province": "NV",
"Country": "USA"
}
],
"ValidFormsOfPayment": {
"UG9pbnRzRXhwZWRpYVJld2FyZHMwLjAw": [{
"PaymentMethod": "POINTS",
"Name": "EXPEDIAREWARDS",
"Fee": "0.00",
"Currency": "USD"
}]
},
"TransactionId": "80f50380-34fa-11e9-9415-0a6b914daa30"
}
Query Examples – Multi-Step Flight Search
Select flight segments one at a time, cumulatively building a flight itinerary over multiple searches. Note that the API query URL will get longer each time a newly selected segment is added to the next query.
Query Offers for Segment 1 of 3
The first query should contain all trip legs (in this case three) as well as &anchorBy=segment1
to indicate that this is the first request of three. Subsequent API query URLs will be provided in the API response.
https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=LAX&segment1.departureDate=2022-09-01&segment2.origin=LAX&segment2.destination=JFK&segment2.departureDate=2022-09-05&segment3.origin=JFK&segment3.destination=LAS&segment3.departureDate=2022-09-10&adult=1&anchorBy=segment1
Here is the links section from first API response, providing the next query.
{
...
"Offers": [
{
"OfferId": "v5-sos-4e040a7f7fc94eaabc9c4aa9cbf94189-5-2-5-1~2.S~AQoGCAEQqeEIEgcI1AQQARgBIAEgDCAHIA0oAlgDcAA~AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg+AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg",
"SplitTicket": false,
"OpaqueFlight": false,
"Free24HourCancellation": true,
"Links": {
"FlightAnchoredSearch": {
"Accept": "application/vnd.exp-flight.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=LAX&segment1.departureDate=2022-09-01&segment2.origin=LAX&segment2.destination=JFK&segment2.departureDate=2022-09-05&segment3.origin=JFK&segment3.destination=LAS&segment3.departureDate=2022-09-10&adult=1&anchorBy=segment2&selectedOffer=AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg"
}
}
...
}
Note that the new API query is the same as the first one, except that there is now an encoded selectedOffer
element that stores the selected first segment. The anchorBy
element is now showing segment2
because this query will be searching for offers for the second travel segment.
Query Offers for Segment 2 of 3
Now use the query from the first response to get offers for the second segment.
https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=LAX&segment1.departureDate=2022-09-01&segment2.origin=LAX&segment2.destination=JFK&segment2.departureDate=2022-09-05&segment3.origin=JFK&segment3.destination=LAS&segment3.departureDate=2022-09-10&adult=1&anchorBy=segment2&selectedOffer=AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg
Here is one of the offers from the second API response.
{
...
"Offers": [
{
"OfferId": "v5-sos-7f7cd1c80dc341e1a2ca4d1a670ecdbb-5-2-5-1~2.S~AQoGCAEQqeEIEgcI1AQQARgBIAEgDCAHIA0oAlgDcAA~AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg+AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg",
"SplitTicket": false,
"OpaqueFlight": false,
"Free24HourCancellation": true,
"Links": {
"FlightAnchoredSearch": {
"Accept": "application/vnd.exp-flight.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=LAX&segment1.departureDate=2022-09-01&segment2.origin=LAX&segment2.destination=JFK&segment2.departureDate=2022-09-05&segment3.origin=JFK&segment3.destination=LAS&segment3.departureDate=2022-09-10&adult=1&anchorBy=segment3&selectedOffer=AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg"
},
"ChangeFlightForSegment1": {
"Accept": "application/vnd.exp-flight.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=LAX&segment1.departureDate=2022-09-01&segment2.origin=LAX&segment2.destination=JFK&segment2.departureDate=2022-09-05&segment3.origin=JFK&segment3.destination=LAS&segment3.departureDate=2022-09-10&adult=1&anchorBy=segment1"
}
}
...
}
The second API response gives you the final API search query for the third segment, which contains an encoded summary of the first two selected flight segments.
Note that there is also a new element called ChangeFlightForSegment1
, which would be used to enable the user to go back and re-select their first segment, if desired.
Query Offers for Segment 3 of 3
Now use the link from the final FlightAnchoredSearch
for the segment two offer selected by the user from the previous API response to make the final query.
https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=LAX&segment1.departureDate=2022-09-01&segment2.origin=LAX&segment2.destination=JFK&segment2.departureDate=2022-09-05&segment3.origin=JFK&segment3.destination=LAS&segment3.departureDate=2022-09-10&adult=1&anchorBy=segment3&selectedOffer=AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg
The third API response will contain all the offers for the third leg of travel, with pricing that reflects the first two segments chosen by the user.
{
...
"Offers": [
{
"OfferId": "v5-sos-b75b4ee8dd46449a93e4fc1db9717cf0-5-2-5-1~2.S~AQoGCAEQqeEIEgcI1AQQARgBIAEgDCAHIA0oAlgDcAA~AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg+AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg",
"SplitTicket": false,
"OpaqueFlight": false,
"Free24HourCancellation": true,
"Links": {
"WebDetails": {
"Method": "GET",
"Href": "https://www.expedia.com/go/udp?CCheck=1&NumAdult=1&NumSenior=0&NumChild=0&Class=3&Sort=10&TripType=Multicity&ProductType=air&eapid=143529-1&ServiceVersion=V5&MessageGuid=82862e30-db27-11e9-ac9d-0a43870af8ce&langid=1033&piid=v5-sos-b75b4ee8dd46449a93e4fc1db9717cf0-5-2-5-1~2.S~AQoGCAEQqeEIEgcI1AQQARgBIAEgDCAHIA0oAlgDcAA~AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg&Price=362.80&CurrencyCode=USD¤cy=USD&DepartureTLA=L1:LAS|L2:LAX|L3:JFK&ArrivalTLA=L1:LAX|L2:JFK|L3:LAS&DepartureDate=L1:2022-09-01|L2:2022-09-05|L3:2022-09-10&ArrivalDate=L1:2022-09-01|L2:2022-09-05|L3:2022-09-10&RefundableFlightsOnly=N"
},
"ChangeFlightForSegment1": {
"Accept": "application/vnd.exp-flight.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=LAX&segment1.departureDate=2022-09-01&segment2.origin=LAX&segment2.destination=JFK&segment2.departureDate=2022-09-05&segment3.origin=JFK&segment3.destination=LAS&segment3.departureDate=2022-09-10&adult=1&anchorBy=segment1"
},
"ChangeFlightForSegment2": {
"Accept": "application/vnd.exp-flight.v3+json",
"Method": "GET",
"Href": "https://apim.expedia.com/flights/listings?segment1.origin=LAS&segment1.destination=LAX&segment1.departureDate=2022-09-01&segment2.origin=LAX&segment2.destination=JFK&segment2.departureDate=2022-09-05&segment3.origin=JFK&segment3.destination=LAS&segment3.departureDate=2022-09-10&adult=1&anchorBy=segment2&selectedOffer=AQojCiEIwYIBEgM1MDQYi5ABIIu4ASiGstMBMMKy0wE4QkAAWAEKRgohCMGCARIDNzYwGIu4ASDvuQEonNvTATDr29MBOEJAAFgBCiEIwYIBEgQxMzg4GO-5ASCpUSjB3NMBMOze0wE4QkABWAEKIwohCMGCARIEMjgzNhipUSCLkAEo3pXUATC-mNQBOEJAAFgBEgoIARABGAEqAkFBGAEiBAgBEAEoAigDKAQwAg"
}
},
...
}
Notice that there is not another API link (unless you request an API Details or Booking link). What's included now is a deeplink to the Expedia website to book the three segment offer that the user has selected, as well as links that allow the customer to re-select segments one and/or two, if desired.
Response Snippet – Opaque Flight Section
Opaque flight inventory can be included in the Flight Search API response via an Expedia-side configuration. If opaque flights are requested, note that the response elements will be different. Since the exact details of the flight departure and arrival are masked for an opaque flight, these will be represented as time windows, rather than exact times.
If this is not acceptable for your use case, then do not request opaque flights to be included in your API response.
{
...
"Segments": [
{
"SegmentId": "MTFfV2hpdGT3BhcXVlUgTGFiZWw=",
"DepartureArrivalDayDifference": 0,
"OpaqueDepartureTime": "6AM12AM_TO_10PM7:59AM",
"OpaqueNumberOfStops": "ZERO_OR_ONE"
},
{
"SegmentId": "MjNfV2hpdGT3BhcXVlUgTGFiZWw=",
"DepartureArrivalDayDifference": 0,
"OpaqueDepartureTime": "6AM12AM_TO_10PM7:59AM",
"OpaqueNumberOfStops": "ZERO_OR_ONE"
},
{
"SegmentId": "MTVfUHVibGlzaGVk",
...
}
Response Snippet – Non-Flight Leg Section
Airlines will sometimes provide transportation on minor legs of travel using transport modes other than flight. Should this occur as a standard practice (that is, not as a result of a temporary or emergency situation), then the non-flight leg will be called out in the API response similar to the example below.
If you would like to avoid all flights with non-flight legs, then you should include &filterNonFlightOffers=true
in your API queries.
{
...
{
"SegmentId": "MTNfUHVibGlzaGVk",
"FlightDuration": "PT19H10M",
"TotalStops": 2,
"DepartureArrivalDayDifference": 0,
"AirportChange": false,
"SeatsLeft": 11,
"FareType": "PUBLISHED",
"IncludesNonFlightLeg": true,
"Legs": [{
"DepartureAirport": {
"Code": "MBX",
"Name": " ",
"City": "Maribor",
"Country": "SVN",
"Latitude": "46.477094",
"Longitude": "15.682259"
},
"ArrivalAirport": {
"Code": "LJU",
"Name": "Joze Pucnik",
"City": "Ljubljana",
"Country": "SVN",
"Latitude": "46.230905",
"Longitude": "14.45483"
},
"DepartureDateTime": "2022-09-12T03:10:00+01:00",
"ArrivalDateTime": "2022-09-12T05:30:00+01:00",
"FlightNumber": "2571",
"MarketingAirlineCode": "JP",
"MarketingAirlineName": "Adria Airways",
"EquipmentCode": "BUS",
"EquipmentName": "NOTE: THIS IS BUS SERVICE",
"FlightDuration": "PT2H20M",
"ConnectionTime": "PT1H30M",
"SeatMapAvailable": true,
"BookingCode": "M",
"CabinClass": "ECONOMY",
"FareBasisCode": "Q77CSOW"
}
...
}
Error Codes
API details
Here, you can explore the endpoint definitions for this API, then go to the API Explorer to try out all the XAP endpoints, download OpenAPI specs, or download our Postman collections. Testing with one or all of these options will give you an understanding of how the examples and schema definitions compare to the actual output.