Skip to main content

/nearby-places

Get nearby places for a given place name or place ID. (one of the parameters is required, but if both are specified, the placeId parameter is used)

Endpoint URL

https://partners.api.vio.com/v1/nearby-places

HTTP Method

POST

Headers

NameRequiredDescription
X-Partner-KeyYesPartner's profile key
Content-TypeYesapplication/json
Accept-EncodingNogzip, deflate, br

Request body

NameRequiredTypeDescriptionExample QueryDefault value
placeNameYesstringThe place name to search for.Amsterdam
placeIdNostring(Optional) The place ID to search for. If specified, the placeName parameter is ignored.47319
countryNostring(Optional) The country name for the main place. If not specified, the first place with the matching name will be used. It is used to disambiguate between places with the same name in different countries.Netherlands
radiusNointegerMaximum radius in kilometers to search for nearby places. If not specified, the default value is 50 km.2050
placeCategoriesNostring[]Nearby place categories. If not specified, all categories will be used.city
hitsNointegerMaximum number of results to return. If not specified, the default value is 10.1010
anonymousIdNostringUnique ID identifying users.e0775301-a95a-4b56-a727-9cec40a013af
checkInNostringCheck in date (YYYY-MM-DD).2023-05-10
checkOutNostringCheck out date (YYYY-MM-DD).2023-05-11
currencyYesstring3-char ISO 4217 currency code.EUREUR
labelNostringArbitrary string for tracking and reporting.
languageYesstringLanguage code that will be used for translation of strings for humans.enen
roomsYesstringRoom configuration.22
userCountryYesstringThe 2-char ISO 3166 country code of a user.US
userDeviceYesstringThe type of the user's device."desktop""desktop"

Dynamic Click Tracking

Click tracking is available using Dynamic Click Tracking

Examples

Get nearby places

This example gets nearby places for Amsterdam, Netherlands.


curl --request POST 'https://partners.api.vio.com/v1/nearby-places' \
--header 'X-Partner-Key: partner-profile-key' \
--header 'Content-Type: application/json' \
--data-raw '{
"placeName": "Amsterdam",
"country": "Netherlands",
"radius": 20,
"placeCategories": [
"city"
],
"hits": 10,
"language": "en",
"currency": "USD",
"userCountry": "US",
"userDevice": "desktop"
}'

Response

The response payload has the following fields:

FieldTypeDescription
placesNearbyPlace[]List of nearby places.

NearbyPlace

FieldTypeDescription
placeNamestringPlace name.
placeIdstringPlace ID.
placeCountrystringPlace country.
placeCategorystringPlace category.
distanceKMnumberDistance to the place in kilometers.
hotelsCntintegerNumber of hotels in the place.
urlstringThe URL that redirects a user to the full search results for this place.

Example:

{
"places": [
{
"placeName": "The Hague",
"placeId": "49458",
"placeCategory": "city",
"placeCountry": "The Netherlands",
"distanceKM": 0,
"url": "https://www.vio.com/Hotel/Search?curr=EUR&forceCurrencyChange=1&forceLanguageChange=1&lang=en&placeId=49458&rooms=2&utm_source=kiwi",
"hotelsCnt": 593
},
{
"placeName": "Rotterdam",
"placeId": "56452",
"placeCategory": "city",
"placeCountry": "The Netherlands",
"distanceKM": 0,
"url": "https://www.vio.com/Hotel/Search?curr=EUR&forceCurrencyChange=1&forceLanguageChange=1&lang=en&placeId=56452&rooms=2&utm_source=kiwi",
"hotelsCnt": 380
},
{
"placeName": "Maastricht",
"placeId": "62667",
"placeCategory": "city",
"placeCountry": "The Netherlands",
"distanceKM": 0,
"url": "https://www.vio.com/Hotel/Search?curr=EUR&forceCurrencyChange=1&forceLanguageChange=1&lang=en&placeId=62667&rooms=2&utm_source=kiwi",
"hotelsCnt": 300
},
{
"placeName": "Harderwijk",
"placeId": "50535",
"placeCategory": "city",
"placeCountry": "The Netherlands",
"distanceKM": 0,
"url": "https://www.vio.com/Hotel/Search?curr=EUR&forceCurrencyChange=1&forceLanguageChange=1&lang=en&placeId=50535&rooms=2&utm_source=kiwi",
"hotelsCnt": 220
},
{
"placeName": "Utrecht",
"placeId": "61429",
"placeCategory": "city",
"placeCountry": "The Netherlands",
"distanceKM": 0,
"url": "https://www.vio.com/Hotel/Search?curr=EUR&forceCurrencyChange=1&forceLanguageChange=1&lang=en&placeId=61429&rooms=2&utm_source=kiwi",
"hotelsCnt": 192
}
]
}