Documentation
Feedback
Guides
API Reference

Guides
Getting Started

Integration Guides




Payments

Orders

Fulfillment

VTEX inStore

UI Customization

Message Center

Pricing

Promotions

Infrastructure

Conversational Commerce

Search

VTEX Session

Search
Consult store search terms information

To present an efficient search result to your customer, it is essential to understand how they search for products in your store. You can use the Intelligent Search API, as detailed in the following sections, to gather the most popular search terms and autocomplete suggestions.

Get the most searched terms

To get your customers' most searched terms, you must use the Get list of the 10 most searched terms endpoint. You can filter the endpoint response by defining the term's locale on the query.

{"base64":"  ","img":{"width":1342,"height":640,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":188854,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/consult-store-search-terms-information-0.png"}}

The response will return the most searched terms by popularity order and the number of searches for each term.

Response body example

{ "searches": [ { "term": "home", "count": 14 }, { "term": "shirt", "count": 10 }, { "term": "top", "count": 9 }, { "term": "tops", "count": 6 }, { "term": "camera", "count": 5 }, { "term": "kit", "count": 5 }, { "term": "work shirt", "count": 2 }, { "term": "shirts", "count": 2 }, { "term": "clothing", "count": 2 }, { "term": "classic shoes", "count": 1 } ] }

Get autocomplete suggested terms and similar attributes

To get information about the autocomplete suggested terms and similar attributes presented to your customers, use the Get list of suggested terms and attributes similar to the search term endpoint. You can filter the endpoint response by defining the term's locale and query.

{"base64":"  ","img":{"width":1358,"height":692,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":340366,"url":"https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/consult-store-search-terms-information-1.png"}}

The response will return the searched terms by popularity order and the corresponding autocomplete suggestions for each term.

Response body example

{ "searches": [ { "term": "tv", "count": 28861, "attributes": [ { "key": "departamento", "value": "tvs-e-video", "labelKey": "Departamento", "labelValue": "TVs e Vídeo" }, { "key": "categoria", "value": "tvs", "labelKey": "Categoria", "labelValue": "TVs" }, { "key": "subcategoria", "value": "receptor-de-controle-de-acesso", "labelKey": "Subcategoria", "labelValue": "Receptor de Controle de Acesso" } ] }, { "term": "smarth tv", "count": 2308 }, { "term": "painel para tv", "count": 975 }, { "term": "rack tv", "count": 589 } ] }
Contributors
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Search Control – fulltextSearchBox
Consult product search information
Contributors
1
Photo of the contributor
+ 1 contributors
On this page