How to Search for Activity Destinations
Before searching for activities, you need a destinationId. The autocomplete endpoint lets you search for destinations by name and returns matching results with the IDs required for all downstream API calls.
Endpoint
POST {{api_host}}/api/ext/activity/destinations
Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your Xeni API key |
Content-Type | Yes | application/json |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The search query. Minimum 2 characters. |
Example Request
JSON
{
"text": "las vegas"
}Response
| Field | Type | Description |
|---|---|---|
status | boolean | Whether the request was successful. |
data | array | List of matching destinations. |
data[].destinationId | string | Unique identifier for the destination. Use this in search and tag queries. |
data[].destinationName | string | Short name of the destination (e.g., "Las Vegas"). |
data[].destinationType | string | The type of destination (e.g., "CITY", "REGION"). |
data[].destinationCountry | string | Country where the destination is located. |
data[].fullName | string | Full display name including region and country. |
isActivityName | boolean | Indicates whether the search matched an activity name rather than a destination. |
Example Response
JSON
{
"status": true,
"data": [
{
"destinationId": "737",
"destinationName": "Las Vegas",
"destinationType": "CITY",
"destinationCountry": "United States",
"fullName": "Las Vegas, Nevada, United States"
}
],
"isActivityName": false
}Usage Notes
- The
textparameter must be at least 2 characters long. Shorter queries will not return results. - The
isActivityNameflag in the response indicates whether the match is based on a destination name or an activity name. This can help you adjust your UI accordingly. - Store the
destinationIdfrom the response — you will need it for retrieving tags and searching activities.
Next Steps
Once you have a destinationId, you can retrieve available filter tags for that destination. See How to Browse Activity Tags and Categories.