Autosuggest
The Autosuggest API provides real-time, relevant, and trending search suggestions to users as they type, significantly enhancing the search experience. The Autosuggest API is designed to maximize search efficiency and user satisfaction by:
- Guiding users: Directing users toward popular and desired search results.
- Reducing effort: Minimizing the required typing effort for users.
- Improving efficiency: Accelerating the overall search process and conversion.
Suggestions are dynamically generated based on a combination of search frequency and contextual signals, ensuring high relevance. The API only surfaces meaningful and popular queries. The underlying data is collected from real search interactions, processed daily, and rigorously filtered.
Trending vs. Query autocomplete
The API supports two distinct suggestion modes based on the user's input:
- Query autocomplete: When the API is called with 3 or more characters in the query.text field, the response provides relevant suggestions to complete the user's current search term.
- Trending suggestions: If the API is called with an empty query.text field (or fewer than 3 characters, which is the minimum threshold), the response includes the most trending/popular terms for the locale, often used to populate a "hot searches" section
Data filtering and quality
Suggestions are filtered based on the following criteria to ensure high quality:
- Length, frequency, and engagement: Terms that are too rare, too short, or lack sufficient engagement (clicks) are excluded.
- Blocked terms: Inappropriate or irrelevant terms can be explicitly excluded from the results.
To maintain suggestion quality and relevance, the following minimum thresholds apply by default:
Requirement | Threshold |
---|---|
Minimum input length | 3 characters are required for a suggestion to appear |
Minimum search frequency | 50 searches recorded in the last 30 days |
Minimum engagement | 1 click on the search term recorded |
Data refresh
Query performance data is refreshed at least once daily using a sliding window of the last 30 days of data.
Note: If your use case requires different thresholds or specific configurations, contact your Customer Success Manager for assistance.
API Integration
Request structure
The Autosuggest API request maintains the same structure as the Search API for seamless integration and compatibility. The main difference is the inclusion of the suggestions array within the query object, specifying the desire for querySuggestions and the maximum number of results.
Sample request
{
"user": {
"active_consent_accepted": false,
"dyid": "11",
"dyid_server": "111"
},
"session": {
"dy": "111"
},
"query": {
"text": "dre",
"suggestions": [
{
"type": "querySuggestions",
"maxResults": 8
}
]
},
"context": {
"page": {
"locale": "en_US"
}
}
}
Response structure
The API returns query suggestions ranked by relevance and popularity within the dedicated querySuggestions array.
Sample response
{
"variations": [
{
"payload": {
"data": {
"suggestions": {
"querySuggestions": [
{"term": "dress shirt"},
{"term": "dresses for women"},
{"term": "denim dresses"},
{"term": "dress pants"},
{"term": "designer bags pre-owned"},
{"term": "drawstring shorts"},
{"term": "dress shoes men"},
{"term": "dress up games"}
]
}
}
}
}
]
}
Technical specifications and limits
Parameter | Default/specification | Notes |
---|---|---|
Minimum character input | 3 | Suggestions aren't returned until the input meets this length |
Default results limit | 8 (maxResults) | Can be increased up to a maximum of 20 results |
Target latency | 50-100 ms | |
Rate limit | None | No rate limits are currently applied to the Autosuggest API |
Note: The Autosuggest API does not maintain logs of requests or responses.
Configuration adjustments: If you need to request adjustments to any of these defaults (for example, higher results limits or custom performance thresholds), contact your Customer Success Manager.
Updated about 5 hours ago