0

Using the EVERYWHERE quote feature with the Skyscanner API, it is returning quotes with a destinationID but no city or airport name. When I try to search for a flight using the DestinationID as the destination, it throws an error saying "is not a recognised place id". I've also tried using the destinationID as the query in the List Places request, which returns an object with an empty places array. I read the documentation and it looks like the only way to query a destination place is with the code or city, but I am trying to do a reverse search for the city name after I already found flights to "everywhere".

Is there a way to get the placeID or airport name from the Destination ID?

EDIT: While it's not stated in the docs, I figured out that the destination ID and place ID match up, so I stored the destination IDs then looped through the places array to find the matching placeID and city name.

Noelle S.
  • 1
  • 1
  • Please visit [Skyscanner developer](https://skyscanner.github.io/slate/#geo-catalog) and they have listed all the APIs based on your requirement you might need to utilise 2 or more APIs For instance, you can get all list of places supported by them and store the result in DB. Further, consumed by your API. – nikhil84 May 22 '20 at 20:53

1 Answers1

1

Their documentation suggests this is how you can GET places

GET "https://partners.api.skyscanner.net/apiservices/ autosuggest/v1.0/{country}/{currency}/{locale}? query={query}& apiKey={apiKey}"

Based on that, I'd suggest appending ?query=pari to find places in Paris. You'd just replace pari with your destination.

Disclaimer: I've never used this API before, just read their documentation.

Leslie Alldridge
  • 1,427
  • 1
  • 10
  • 26