What are tags & why they matter
Tags are numeric identifiers used to categorize products. For example, tags allow you to distinguish walking tours and bus tours from other sightseeing tours. There are a variety of functions beyond categorization that tags offer and can be used creatively to fit the needs of your integration with Viator. Because all products have tags, they can be used to include or exclude products.
Simply put, tags offer customization and flexibility to your integration that cannot be achieved otherwise. In this article, we’ll cover many of the use cases for and benefits of using tags.
Quick find
Here are some examples of different types of tags
Tags are unique and are not defined for a single use case. For example, you’ll notice that some tags align closely with product categories (e.g. helicopter tours), while others align closely with product features (e.g. Wi-Fi available).
Tags related to product categories, for example:
- tagId 12026 – Helicopter Tours
- tagId 13018 – Bike Tours
- tagId 21765 – Shows
Product quality tags, for example:
- tagId 21972 – Excellent Quality
- tagId 22143 – Best Conversion
- tagId 21074 – Unique experiences
Tags used to highlight specific product features, for example:
- tagId 11283 – Mountain View
- tagId 19089 – Squash Off-site
- tagId 9176 – Free Wifi
Tags indicating the target group of participants:
- tagId 18884 – Adults Only
- tagId 11919 – Kid-Friendly
- tagId 20222 – LGBT Friendly Tours
Tags linked to a specific area or a popular tourist attraction, for example:
- tagId 11982 – Cinque Terre Day Trips from Milan
- tagId 11960 – Western Caribbean Shore Excursions
- tagId 11999 – Rome To Siena
Tags for special occasions, for example:
- tagId 11892 – Christmas
- tagId 11893 – Halloween
- tagId 21583 – Chinese New Year
Safety measures tags, for example:
- tagId 21949 – Face masks required for guides in public areas
- tagId 21956 – Guides required to regularly wash hands
- tagId 21955 – Transportation vehicles regularly sanitized
Tags indicating tour/activity time frame, for example:
- tagId 13121 – Afternoon tea
- tagId 11922 – Multi-day Tours
- tagId 18953 – Evening Entertainment
Please note:
Tags are available only in v2 API. If you are using the v1 version of the API, you will need to rely on v1 categories and subcategories that have a more narrow structure and refer to product categories only.
Best practices
1. Multiple product categories / subcategories
Tags may be used to enable the user to filter by product category, as well as filter by specific product features.
The screenshot below illustrates how to use tags to display product categories:
Product 5836DINNERCRUISE returns the following tags in the API:
21953,
21958,
21956,
21074,
21951,
11963,
11965,
21955,
21960,
21949,
21959,
21954,
11938,
21948,
21952,
12053,
20255,
21972
],
Tag 11965 is for Dinner Cruises therefore this product can be found on Viator under the Category of Dinner Cruises.
Thanks to the presence of multiple parentTagIds, it’s possible to link products to different categories and subcategories when they meet specific criteria, like in the example above. This way the product bookability could be increased by better product visibility.
Tag 11965 (Dinner Cruises) has several parentTagIds:
{
“tagId”: 11965,
“parentTagIds”: [
11890, ← Dining Experiences
21911, ← Food & Drink
21442, ← On the Water
21909, ← Outdoor Activities
21701, ← Cruises & Sailing
21913 ← Tours, Sightseeing & Cruises
],
2. Promoting high quality products
There are several tags that can indicate high product quality, such as:
- tagId 21972 – Excellent Quality
- tagId 22143 – Best Conversion
- tagId 22083 – Likely To Sell Out
- tagId 11940 – Once in a Lifetime
- tagId 11954 – Viator Exclusive Tours
- tagId 21074 – Unique experiences
- tagId 6226 – Best Value
- tagId 21971 – Viator Plus – products that have the Badge of Excellence on Viator and they meet the quality standards mentioned here (excellent quality level is one of them)
They may be used to create custom sort orders or additional filters to help customers find the best products:
3. Multiple filtering options
Tags may be used to create multiple filtering options based on the specific business model and customer needs. Below is an example of the implementation of tags to create filtering based on Categories, Time of Day, and Specials
4. Creating campaigns
Tags are also very useful in creating temporary campaigns for specific holidays, for example:
- tagId 11892 – Christmas
- tagId 11893 – Halloween
- tagId 21583 – Chinese New Year
- tagId 11895 – National Holidays
- tagId 11957 – Easter
- tagId 11894 – Mother’s Day
- tagId 20213 – Father’s Day
- tagId 11898 – Valentine’s Day
- tagId 11896 – New Years
- tagId 11956 – Day of the Dead
They all are linked to tags 21584 (Holidays) and 21916 (Seasonal & Special Occasions).
Product search by tags
The /products/search endpoint offers the functionality to search for products based on tags. This is useful for search bars where customers can select specific search criteria to get products that match their requirements.
In order to do this, it’s necessary to include the relevant tagId(s) under the tags object in the request body when using the /products/search endpoint.
For example this request will allow to find bus tours (tagId 11930) available in London (destId 737) for Christmas (tagId 11892) that are excellent quality products (tagId 21972):
“filtering”: {
“destination”: “737”,
“tags”: [
21972, 11892, 11930
],
“flags”: [
“FREE_CANCELLATION”
],
“highestPrice”: 1500,
“startDate”: “2021-11-23”,
“endDate”: “2021-12-29”
},
“sorting”: {
“sort”: “PRICE”,
“order”: “DESCENDING”
},
“pagination”: {
“start”: 1,
“count”: 50
},
“currency”: “USD”
}
Mapping v1 categories to v2 tags
In case you upgrade from v1 of our API to v2 there is an easy way of mapping products to v2 tags with the use of this Excel spreadsheet.
Below is an example of how v1 subcategory “Balloon Rides” linked to v1 category “AIr, Helicopter & Balloon Rides” is mapped to v2 tag “Hot Air Balloon Rides”:
v2 tag display name | v2 tagId | v1 subcategoryId | v1 subcategoryName | v1 categoryId | v1 groupName |
Hot Air Balloon Rides | 12027 | 3 | Balloon Rides | 1 | Air, Helicopter & Balloon Tours |
Please note: not all v2 tags have equivalent v1 categories/subcategories as there are more v2 tags than pre-existing v1 categories/subcategories. That’s why it’s recommended to work not only with the mapping file, but also with the list of all v2 tags returned in the API via the products/tags endpoint and conduct mapping based on the “mesh” structure of tags.
Updating tags
It’s recommended that you store a local copy of all tags in your database. Updates should be done whenever necessary, in case a new tag reference code is returned for the product in the response to product content endpoints.
Additional resources
For additional information, please check the following sections of our API documentation: