This autosuggest service can be used to retrieve a list of hotels and/or geographical locations which can then be used to perform pricing searches in the hotels and car hire APIs. In the case of car hire, use this if you want downtown (non-airport) searches.
The market, currency and locale are passed to the query, along with a user's searched-for text.
The service uses an HTTP GET request.
Common URL Parameters
|market||Yes||the user’s market country||String||Skyscanner country code (ISO code).|
|currency||Yes||The user’s selected currency||String||ISO currency code (example ‘GBP’, ‘USD’). See the the Currencies Service for supported currencies.|
|locale||Yes||The user’s selected language||String||ISO locale code (example ‘en-GB’). See the Locales Service|
|query||Yes||The query string||String||At least two characters long|
|apiKey||Yes||The assigned client api key||String|
The data is returned in XML format by default. For JSON format (recommended) the HTTP Accept header value should be changed to ‘application/json’.
Http Response Codes
|400||Bad Request – Input validation failed.|
|403||Forbidden – The API Key was not supplied, or it was invalid, or it is not authorized to access the service.|
|429||Too Many Requests – There have been too many requests in the last minute.|
|500||Server Error – An internal server error has occurred which has been logged.|
|results||Contains a list of results for the query with:
|places||Contains a list of places that represent lookup geographic places (e.g. cities, countries) for the query.|