Appearance
/suggest
Get suggested search results for a given query.
Endpoint URL
https://partners.api.vio.com/v1/suggest
HTTP Method
GET
Headers
| Name | Required | Description |
|---|---|---|
X-Partner-Key | Yes | Partner's profile key |
Accept-Encoding | No | gzip, deflate, br |
Query parameters
| Name | Required | Type | Description | Example | Default |
|---|---|---|---|---|---|
query | No | string | Free-text query. Maximum length is 256 characters. | "Amsterdam" | |
language | No | string | Language code of the query. Used to translate suggestions. See supported languages | "en" | "en" |
type | No | string | Filter suggestions by object type. This value is forwarded as an objectType filter. Examples: place, hotel, address. | "hotel" | |
limit | No | integer | Maximum number of suggestions to return. Non-positive values fall back to the default. | 30 | 30 |
Dynamic Click Tracking
Click tracking is available using Dynamic Click Tracking
Examples
Suggest places
bash
curl --location --request GET 'https://partners.api.vio.com/v1/suggest?query=Amsterdam' \
--header 'X-Partner-Key: <profile key>'Suggest hotels
bash
curl --location --request GET 'https://partners.api.vio.com/v1/suggest?query=Park plaza hotel' \
--header 'X-Partner-Key: <profile key>'Response
The response payload has the following fields:
| Field | Required | Type | Description |
|---|---|---|---|
suggestions | Yes | Suggestion[] | The list of suggestions. |
Suggestion
| Field | Required | Type | Description |
|---|---|---|---|
objectID | Yes | string | Object ID. |
objectId | Yes | string | Object ID with legacy casing, preserved for backward compatibility. |
objectType | Yes | string | Object type: place, hotel, nearby. |
placeDisplayName | Yes | string | Address display name. |
placeTypeName | Yes | string | Suggested place type: property, country, city, airport, station, area. |
value | Yes | string | Full name of the suggestion. |
highlightValue | Yes | string | Markup text with occurrences highlighted. |