serpapi / public-roadmap

Public Roadmap for SerpApi, LLC (https://serpapi.com)
45 stars 3 forks source link

[Google Flight API] Support multi city search #1503

Open hilmanski opened 3 months ago

hilmanski commented 3 months ago

A user asked if we can perform a "multi city" search on our Google Flight API.

This feature is supported by Google Flight search. CleanShot 2024-03-26 at 12 57 32@2x

Intercom

marm123 commented 1 month ago

A user requested this:

Intercom

corear commented 1 month ago

Is this not going to be implemented anytime soon?

marm123 commented 1 month ago

Hi @corear, thank you for reaching out. Unfortunately, I can't share any ETA for when the feature will be implemented. However, I'll bump this in our queue and change the status to queued. We'll get back to you once it's finished.

stedelmanto1 commented 1 month ago

Thanks for finally queueing this! Really needing this functionality

stedelmanto1 commented 1 month ago

Hi- just wanted to add that for the multi city a key requirement is to be able to add multiple flights (ex: SFO->EWR, EWR->IAH, IAH->ORD), not just a two destination itinerary (ex: SFO->EWR, EWR->IAH). Google flights supports this functionality with the + button when in multi city search mode.

hilmanski commented 4 days ago

A customer requested for this feature.

Front

vuemix commented 3 days ago

We are the customer that recently requested the feature. From google's end, the only key difference between one-way, round-trip, and multi-city is what Serp calls 'type'. Multi-city is type 3. The high-level problem is Serp's API is designed around single departure and arrival ID whereas Google Flight (and every other Flight API I know of e.g. Duffel, Amadeus, TravelPort, etc.) use arrays. Google Flight's native API request is organized roughly like below regardless of type:

{
     type: 1/2/3,
     cabin: <cabin type>,
     passengers: <passenger counts>,
     price-range: <range>,
     route: [ { origin: <code>,
                    destination: <code>,
                    departure-date: <date>,
                    timeofday: <timecode>,
                    stops: <stopcode>,
                    include-airlines:
                    exclude-airlines:
                    ...
                  },  
                  { origin: <code>,
                    destination: <code>,
                    timeofday: <timecode>,
                    ...
                   },
                  ...
                ]
}

which not only has an array of origin/dest but pulls in many of the filters on a per-segment basis. The departure_token / booking_token would likely be similar except there would be multiple departure_token steps as the desired segments get selected for each leg of the itinerary.