SkyScanner RapidAPI not providing return flight

428 Views Asked by At

For a personal project I am trying to make use of the Sky Scanner API, in GO, via RapidAPI. Here is the URL I am using to perform the API request:

https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/browsequotes/v1.0/UK/GBP/en-US/SFO-sky/JFK-sky/2019-12-01?inboundpartialdate=2019-12-10

The issue is, I am only receiving the following response:

{"Quotes":[{"QuoteId":1,"MinPrice":403.0,"Direct":true,"OutboundLeg":{"CarrierIds":[851],"OriginId":81727,"DestinationId":60987,"DepartureDate":"2019-12-01T00:00:00"},"QuoteDateTime":"2019-11-29T14:24:00"}],"Places":[{"PlaceId":60987,"IataCode":"JFK","Name":"New York John F. Kennedy","Type":"Station","SkyscannerCode":"JFK","CityName":"New York","CityId":"NYCA","CountryName":"United States"},{"PlaceId":81727,"IataCode":"SFO","Name":"San Francisco International","Type":"Station","SkyscannerCode":"SFO","CityName":"San Francisco","CityId":"SFOA","CountryName":"United States"}],"Carriers":[{"CarrierId":851,"Name":"Alaska Airlines"},{"CarrierId":870,"Name":"jetBlue"},{"CarrierId":1065,"Name":"Frontier Airlines"},{"CarrierId":1721,"Name":"Sun Country Airlines"}],"Currencies":[{"Code":"GBP","Symbol":"£","ThousandsSeparator":",","DecimalSeparator":".","SymbolOnLeft":true,"SpaceBetweenAmountAndSymbol":false,"RoundingCoefficient":0,"DecimalDigits":2}]}

As far as I can tell this does not contain the return flight.

I was wondering if anyone had any experience using this/knows where I am going wrong.

Thanks!

2

There are 2 best solutions below

1
Josel567 On BEST ANSWER

You need to use the Browse Quotes Inbound endpoint of RapidApi.

0
Pratham On

I testes this API a little bit. You have to use GET Browse Quotes Inbound in order to retrieve the cheapest flight. The Quotes key inside the response contains two arrays, the value inside those arrays are already sorted according to the price I believe. This means the first value inside the array is the cheapest flight.

Try to play around with more endpoints. You'll get the desired result for sure. Moreover, this API is completely free with no Hard Limit on calls so that won't be an issue.