Anton Kim
Anton Kim

Reputation: 943

flight-offers-search and flight-cheapest-date-search - limit by number of connections and layover duration

I am testing flight-offers-search and flight-cheapest-date-search Are there parameters available to limit by number of connections and layover duration, didn't see it in the doc.

Also, is there a functionality to fetch future prices for given period ex: get average price for 2 week trips in the next month, 3 months, 1 year?

Thank you.

Upvotes: 0

Views: 133

Answers (1)

Anthony Roux
Anthony Roux

Reputation: 1481

Regarding your first point: In the Flight Offers Search API: As of today, the API doesn't offer a parameter to control the time of the layover you will have to check the response and do it on your side. For the number of connections, you can filter direct and non-direct flights using the parameter nonStop. Then, if you want to limit the number of stops you have to do it by filtering the response (by looking at the number of segments inside the itineraries).

Flight Cheapest Date Search has a similar parameter to control the direct and non-direct offers: nonStop.

Regarding your second point: not directly, for this, you can do it by:

  • Use the Flight Offers Search and do multiples searches and make an average of the prices you find
  • Use the Flight Cheapest Date Search to do the same (keep in mind that this API uses a pre-computed cache and has a limited number of origin-destination)

Upvotes: 1

Related Questions