Search a multi-city flight itinerary with ordered travel legs
View all Tripadvisor Hotel, Rental & Travel Data endpoints →Search multiple flight legs with required classOfService, sortOrder, and legs query parameters. Each leg uses sourceAirportCode, destinationAirportCode, and date; the documented representation is a JSON array of leg objects, although the declared legs parameter type remains object. The saved example contains historical October 2025 dates and must be replaced for a current trip. currencyCode is optional and is documented as obtainable from Get Currency. Optional pageLoadUid, searchHash, and searchId are documented as values to reuse from a previous call for a complete response; their returned locations and continuation timing are not verified. The truncated, unverified source example shows data.complete and data.flights. Example flight records contain itineraryTag, purchaseLinks with currency, totalPrice, totalPricePerPassenger, and tax fields, plus segments with legs containing departureDateTime, arrivalDateTime, originStationCode, destinationStationCode, and carrier information. No saved operation-specific probe confirms these fields, accepted cabin or sort values, live fares, or booking availability.
API Features
Live API Demo
🔒 Sign in to try it live
Log in to call this API with your own API key. New accounts get 100 free credits — no card required.
Log in / Sign upNo active API key found. Create one in your Dashboard, then reload this page. Dashboard →
/api/project/tripadvisor-data/search-flights-multi-city API Response (JSON)
{} curl -X GET 'https://api.opendata-api.com/api/project/tripadvisor-data/search-flights-multi-city?key=<API_KEY>&classOfService=<classOfService>&legs=%5B%7B%22sourceAirportCode%22%3A%22BOS%22%2C%22destinationAirportCode%22%3A%22LON%22%2C%22date%22%3A%222025-10-18%22%7D%2C%7B%22sourceAirportCode%22%3A%22LON%22%2C%22destinationAirportCode%22%3A%22BOS%22%2C%22date%22%3A%222025-10-26%22%7D%5D&sortOrder=<sortOrder>'
Query Result
Use Cases
- Prototype a three-stop trip planner that serializes one dated leg object for each successive airport pair.
- Model an open-jaw itinerary with distinct arrival and onward-departure airports, then verify returned segment details against the intended route.
- Build a result-retrieval experiment that retains actual searchId, searchHash, and pageLoadUid values when a previous response supplies them.
- Develop a defensive itinerary comparison view that separates example purchase-link totals from segment times and carrier details, with no automatic booking action.
Frequently asked questions
Which inputs are required for a multi-city flight search?
classOfService, legs, and sortOrder are required query parameters. currencyCode, pageLoadUid, searchHash, and searchId are optional. No supported cabin-class or sort-order enum is supplied in the available documentation.
How should I represent the legs parameter?
The documentation shows a JSON array of objects containing sourceAirportCode, destinationAirportCode, and date in YYYY-MM-DD form. The parameter is declared as object and is sent in the query, not as a request body. Verify the actual query encoding before relying on it.
Can I submit the saved dates unchanged for a current itinerary?
The saved example uses 2025-10-18 and 2025-10-26 for a BOS-to-LON return itinerary. Those are historical example dates, not a promise of searchable inventory. Replace them with the dates of the intended trip.
Where does currencyCode come from?
The parameter documentation points to Get Currency, and USD is the supplied example. Read that operation separately and use a code it actually returns; the flight search is not a currency-conversion endpoint.
What are pageLoadUid, searchHash, and searchId used for?
They are optional inputs documented for reusing values from a previous call to obtain a complete response. No saved probe confirms their response locations, polling interval, or completion protocol. Do not invent values or assume every response returns all three.
Which itinerary fields are documented, and are the fares verified?
The truncated source example shows data.complete, data.flights, purchaseLinks pricing fields, and segments containing leg times, station codes, and carriers. This operation has no saved probe observation, so these are unverified example fields, not confirmed live fares or a booking guarantee.