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

MethodEndpoint
GEThttps://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

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"

}

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&currency=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

Common Error Codes

HTTP Status CodeError CodeError ResponseCause
200FLIGHT_NOT_AVAILABLERequested flight is not availableIn an anchored search, If selected segments having offer is expired while next segment anchored search.
200CHILD_PRICED_AS_ADULT1 child of age group 12-17 in the request are priced as adult in the responseAny child in the age of 12-17 will be priced as adult and this warning message will be given back for notifying the same.
200INVALID_WD_PASSENGER_COMBINATIONWeb link does not support search with infant in lap and infant in seat togetherWhen WD link is requested it will be returned only when infant in seat and infant in lap is not requested together.
200INVALID_WD_PASSENGER_COUNTWeb link does not support search with more than 6 passengersWhen WD link is requested, the deeplink will be returned only when the number of passengers requested is less than or equal to 6.
200NO_RESULTS_FOUNDNo flights solutions found for the request.No flights for a requested criteria from supply.
409NO_RESULTS_FOUNDNo flights solutions found for the request.There are no flights for a requested criteria during flight search API.
500SERVER_ERRORAn error has occurred while processing the requestThere is a server-side issue that has resulted in a failure.
400INVALID_ACCEPT_HEADERPlease provide a valid Accept headerThe accept header provided is not as per the documentation.
400INVALID_PARTNER_TRANSACTION_IDPartner Transaction ID is missing, please provide Partner Transaction IDA Partner-Transaction-Id value must be included in the query header.
400MISSING_ADULT_OR_SENIORInvalid Passenger Information : Must specify at least 1 adult or senior passengerAdult and senior count are both 0, but with Child/Infant in lap/Infant in seat
400INFANT_IN_LAP_ACCOMPANIED_BY_ADULT_OR_SENIORInvalid Passenger Information : Each infant in lap must be accompanied by an adult or seniorInfant on lap is not accompanied with enough adult or senior
400INVALID_CHILD_AGEInvalid Passenger Information : The age of child must be between 2 and 17 years oldChildren ages is given as less than 2 or greater than 17
400INVALID_PASSENGER_COUNTInvalid Passenger Information : Total number of passengers must be between 1 and 9 inclusiveMax number of travelers exceeded 9 (including infants in seats or laps). Passenger limit will be 6 if 'WD' link is requested during search.
400ORIGIN_REQUIREDOrigin is empty in flight segment 1. Please provide a valid airport code or cityOrigin is given as empty
400INVALID_ORIGINInvalid origin. The specified origin CCC in flight segment 1 is unrecognizedInvalid entry given as origin
400DESTINATION_REQUIREDDestination is empty in flight segment 1. Please provide a valid airport code or cityDestination is given as empty
400INVALID_DESTINATIONInvalid destination. The specified destination ORR in flight segment 1 is unrecognizedInvalid entry given as destination
400INVALID_DEPARTURE_DATEDeparture date is missing or invalid in segment 1Empty/invalid departure date is given
400INVALID_DEPARTURE_TIMEDeparture time is missing or invalid in segment 1Empty/invalid departure time is given
400DEPARTURE_TIME_DEPARTURE_TIMESPAN_NOT_ALLOWED_TOGETHEREither Departure time or departure time span is allowedDeparture time and Departure time span given in the same search
400DEPARTURE_DATE_OUT_OF_RANGEDeparture date of segment 1 must be greater than 6 hours from nowWhen departure date is given as previous date
400DEPARTURE_DATE_OUT_OF_RANGEDeparture date of segment 1 must be less than 330 days from nowDeparture date is given 330 days after current date
400INVALID_LOCALEInvalid locale provided. Please provide a valid localeLocale is given as invalid/empty value
400INVALID_ADULT_COUNTInvalid adult count provided. Please provide a valid adult countEmpty/invalid adult count
400INVALID_SENIOR_COUNTInvalid senior count provided. Please provide a valid senior countEmpty/invalid senior count
400INVALID_CHILD_COUNTInvalid child count provided. Please provide a valid senior countEmpty/invalid child count
400INVALID_INFANT_IN_LAP_COUNTInvalid infant in lap count provided. Please provide a valid senior countEmpty/invalid infant in lap count
400INVALID_INFANT_IN_SEAT_COUNTInvalid infant in seat count provided. Please provide a valid senior countEmpty/invalid infant in seat count
400INVALID_SELECTED_CARRIERSInvalid Air Carrier : Specified air carrier code ASA is not valid. Please specify a proper two character IATA codeSelected carrier is given as invalid (Eg: ASA)
400INVALID_SELECTED_CARRIERSSelected carriers is not given. Please specify valid carriers.SelectedCarriers is given as empty
400INVALID_SELECTED_CARRIERSSpecified air carrier codes of exceeds maximum limit of 6SelectedCarriers filtering is given more than 6 carriers
400INVALID_NUMBER_OF_STOPSInvalid number of stops provided. Please provide a valid number of stopsNumber of stops with input other than integers like 0,1,2 etc or leaving it empty
400INVALID_SORT_TYPEInvalid sort type. Allowed values are [Price]Input of sort type other than the defined one. Currently V3 supports sort type as Price
400INVALID_NUMBER_OF_FLIGHTSInvalid number of flights provided. Please provide a valid number of flightsInputs other than Integers or empty
400INVALID_ACCOUNT_CODESInvalid account codes are provided. Please specify a valid account codeInvalid/empty account code provided
400INVALID_AGENTInvalid value for agent. Please provide the value as true or false.Value of agent is given input other than true or false or given as empty
400INVALID_LINKSLinks is not given. Please specify valid Links.Value of links is not given/invalid name given as input to links
400INVALID_DEPARTURE_DATEDeparture date of segment 2 must be after departure date of segment 1Departure date of round trip/multi city is given as an earlier date
400ORIGIN_DESTINATION_SAMESpecified origin and destination are same. Please provide different origin and destinationOrigin and destination is given as same
400MISSING_MANDATORY_SEGMENT_DETAILSMissing segment details.Specify all mandatory segment details.Segment details are missing
400INVALID_DEPARTURE_TIMESPANDeparture time span is missing or invalid in segment 1Invalid input for DepartureTimeSpan
400INVALID_CABIN_CLASSInvalid cabin class. Allowed values are [economy | first | business | premiumeconomy]Invalid input for cabinClass
400INVALID_ANCHORAnchorBy 'value given in anchorBy' is in an invalid formatInvalid information given for parameter anchorBy.

Valid values are:
segment1 | segment2 | segment3 | segment4 | segment5

Only one value may be used at a time.
400SELECTED_FLIGHT_DETAILS_NOT_AVAILABLESelected flight details are not specified in the requestThe value of anchorBy is greater than segment1 and selectedOffer is not given in Request.

The API is stateless, so if the previously selected legs are not carried forward in the request, then there is no way for the API to know which selections have already been made.

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.


Did you find this page helpful?
How can we improve this content?
Thank you for helping us improve!