Hotels
Endpoint
POST https://partners.api.skyscanner.net/apiservices/v3/autosuggest/hotels
Request
Requests to autosuggest/hotels
contain the following:
Field name | Description |
---|---|
query | Object containing parameters for hotels autosuggest search. |
limit (Optional) | Limits number of entities returned in response. Take a min value of 1 and max of 50. |
The query
object contains the following fields:
Field name | Description |
---|---|
market | Market where search is coming from. E.g. UK . |
locale | Language to be used for the search(ISO locale) e.g. en-GB . |
searchTerm | The string to get autosuggest results for. If left blank, the most popular hotels will be returned. E.g.Pari . |
includedEntityTypes (Optional) | Can be used to filter type of places returned. See below for full list of supported entity types. |
Response
Responses from the autosuggest/hotels
are returned as a list of places
. Each places
item will contain the following fields:
Field name | Description |
---|---|
hierarchy | Shows hierarchy of places related to this entity. E.g. City of Edinburgh. |
location | Coordinates of the entity. Expressed as a latitude/longitude pair. E.g. 55.9497, -3.3635 |
score | Relevance score of entry based on character input. |
name | Name of the place e.g. London |
highlight | Indicates emphasis on characters which match the searchTerm |
entityId | A unique ID for the place. It's an internal ID and it doesn't have any meaning outside of our APIs. |
type | Type of place. See section below for possible values for PLACE_TYPE. E.g. PLACE_TYPE_AIRPORT, PLACE_TYPE_CITY, PLACE_TYPE_DISTRICT etc |
pois | A list of points of interest near the given entity. |
Entity Types
Below are the possible entity types.
They can be used to filter the response by being passed in the includedEntityTypes
field in the request. They are also used in the type
field in the response.
Type |
---|
PLACE_TYPE_COUNTRY |
PLACE_TYPE_AIRPORT |
PLACE_TYPE_CITY |
PLACE_TYPE_HOTEL |
PLACE_TYPE_DISTRICT |
PLACE_TYPE_ISLAND |
PLACE_TYPE_FIRST_LEVEL_NATION_ADMINISTRATIVE_DIVISION |
PLACE_TYPE_SECOND_LEVEL_NATION_ADMINISTRATIVE_DIVISION |
PLACE_TYPE_SEA_COAST |
PLACE_TYPE_MOUNTAIN_RANGE |
PLACE_TYPE_SEA |
Autosuggest API reference
See the Autosuggest API reference for more details.