Expedia Flights Filtering API
Our Expedia Flights API filters flights by number of stops and by airline with include_airlines, and by any other filter of Expedia with facet, like departure times or layover airports.
The JSON response includes the filters of the search, with the IDs to use in facet.
The API endpoint is https://serpapi.com/search?engine=expedia_flights
Head to the playground for a live and interactive demo.
API parameters
Advanced filters
stops
Optional
Parameter defines the number of stops of the flights.
Available options:0 - Any number of stops (default)1 - Nonstop only2 - 1 stop or fewer3 - 2 stops or fewer
include_airlines
Optional
Parameter defines the airlines of the flights, as a comma-separated list of up to 40 2-character IATA airline codes (e.g., DL,UA for Delta or United flights).
facet
Optional
Parameter defines Expedia's filters to apply, like departure and arrival times, airports, layover airports, preferred classes, the total travel time, or travel and baggage options. It's a list of filter IDs separated by || (e.g., DEPARTURE_TIME:MORNING||LAYOVER_AIRPORT:ORD), up to 30. Filter IDs are available in filters[].options[].id of the results.
API examples
Result with the filters of the search
filters has the filters of the search, with their options: count is the number of flights of an option, and price their lowest price. The id of an option applies it with facet, and its serpapi_link is the search with the option applied.
{
...
"filters": [
{
"name": "Stops",
"options": [
{
"name": "Nonstop",
"count": 32,
"price": "$215",
"extracted_price": 215,
"id": "NUM_OF_STOPS:0",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=NUM_OF_STOPS%3A0&outbound_date=2027-01-01&type=2"
},
{
"name": "1 Stop",
"count": 45,
"price": "$215",
"extracted_price": 215,
"id": "NUM_OF_STOPS:1",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=NUM_OF_STOPS%3A1&outbound_date=2027-01-01&type=2"
},
{
"name": "2+ Stops",
"count": 3,
"price": "$606",
"extracted_price": 606,
"id": "NUM_OF_STOPS:2+",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=NUM_OF_STOPS%3A2%2B&outbound_date=2027-01-01&type=2"
}
]
},
{
"name": "Airlines",
"options": [
{
"name": "American Airlines",
"count": 37,
"price": "$215",
"extracted_price": 215,
"id": "PREFERRED_AIRLINE:AA",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=PREFERRED_AIRLINE%3AAA&outbound_date=2027-01-01&type=2"
},
{
"name": "Alaska Airlines",
"count": 13,
"price": "$215",
"extracted_price": 215,
"id": "PREFERRED_AIRLINE:AS",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=PREFERRED_AIRLINE%3AAS&outbound_date=2027-01-01&type=2"
},
...
]
},
...
]
}
Result for facet: DEPARTURE_TIME:MORNING||CARRY_ON_BAG:CARRY_ON_BAG
facet applies filters from the id of their options, separated by ||, together with stops and include_airlines. Selected options have selected set to true, and the serpapi_link of a selected option removes it. The links of the options of the stops and airlines filters have the options that stops or include_airlines select in facet, without the parameter. This example shows morning flights with a carry-on bag included.
{
...
"search_parameters": {
"engine": "expedia_flights",
"departure_id": "JFK",
"arrival_id": "LAX",
"outbound_date": "2027-01-01",
"type": "2",
"expedia_domain": "expedia.com",
"facet": "DEPARTURE_TIME:MORNING||CARRY_ON_BAG:CARRY_ON_BAG"
},
...
"filters": [
...
{
"name": "Travel and baggage",
"options": [
{
"name": "Seat choice included",
"price": "$268",
"extracted_price": 268,
"id": "SEAT_CHOICE:SEAT_CHOICE",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=DEPARTURE_TIME%3AMORNING%7C%7CCARRY_ON_BAG%3ACARRY_ON_BAG%7C%7CSEAT_CHOICE%3ASEAT_CHOICE&outbound_date=2027-01-01&type=2"
},
{
"name": "Carry-on bag included",
"price": "$215",
"extracted_price": 215,
"id": "CARRY_ON_BAG:CARRY_ON_BAG",
"selected": true,
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=DEPARTURE_TIME%3AMORNING&outbound_date=2027-01-01&type=2"
},
...
]
},
{
"name": "Departure time in New York",
"options": [
{
"name": "Morning",
"description": "(5:00am - 11:59am)",
"id": "DEPARTURE_TIME:MORNING",
"selected": true,
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=CARRY_ON_BAG%3ACARRY_ON_BAG&outbound_date=2027-01-01&type=2"
},
...
]
},
...
]
}
Result with the preferred class and the total travel time
The preferred classes filter flights by the class of their fares, like basic economy (PREFERRED_CABIN:BASIC_COACH), whose description tells its restrictions. The total travel time is Expedia's slider of the longest travel time: each of its options is a step of the slider, with its number of minutes in its id (e.g. TRAVEL_TIME_SLIDER:480 for flights under 8 hours), and replaces the other steps.
{
...
"filters": [
...
{
"name": "Preferred class",
"options": [
{
"name": "Basic economy",
"count": 67,
"description": "Fares may not include seats or bags",
"price": "$284",
"extracted_price": 284,
"id": "PREFERRED_CABIN:BASIC_COACH",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=PREFERRED_CABIN%3ABASIC_COACH&outbound_date=2027-01-01&type=2"
},
{
"name": "Economy",
"count": 19,
"price": "$414",
"extracted_price": 414,
"id": "PREFERRED_CABIN:COACH",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=PREFERRED_CABIN%3ACOACH&outbound_date=2027-01-01&type=2"
},
...
]
},
...
{
"name": "Total travel time",
"options": [
{
"name": "Under 7h",
"id": "TRAVEL_TIME_SLIDER:420",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=TRAVEL_TIME_SLIDER%3A420&outbound_date=2027-01-01&type=2"
},
{
"name": "Under 8h",
"id": "TRAVEL_TIME_SLIDER:480",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=TRAVEL_TIME_SLIDER%3A480&outbound_date=2027-01-01&type=2"
},
...
{
"name": "Under 33h",
"id": "TRAVEL_TIME_SLIDER:1980",
"serpapi_link": "https://serpapi.com/search.json?arrival_id=LAX&departure_id=JFK&engine=expedia_flights&expedia_domain=expedia.com&facet=TRAVEL_TIME_SLIDER%3A1980&outbound_date=2027-01-01&type=2"
}
]
},
...
]
}