0

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!

Grokify
  • 15,092
  • 6
  • 60
  • 81
CJW
  • 710
  • 9
  • 26

2 Answers2

1

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

Josel567
  • 387
  • 1
  • 2
  • 9
  • Thanks for the reply. I am still having an issue here. It seems that the API does not return the cheapest flights when compared to the skyscanner website, for example: https://skyscanner-skyscanner-flight-search-v1.p.rapidapi.com/apiservices/browsequotes/v1.0/UK/GBP/en-GB/LGW-sky/ARN-sky/2020-04-01/2020-04-10 The above says the cheapest flight is £357, where the website says £125 – CJW Feb 21 '20 at 14:31
0

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.

Pratham
  • 497
  • 3
  • 7