Trending
The widget surfaces what other users are searching for right now. It is used mainly for the input's empty state: when the widget opens with no query, a list of popular queries is shown to inspire the user.
Consumed by the useTrendingSearches hook.
Endpoint
GET
/api/widget/trendingcurl "https://api.neuroon.ai/api/widget/trending?limit=5" \
-H "X-Widget-Token: $WIDGET_TOKEN"
Defined in
WidgetSearchController.java:282. Returns queries only (no products).
| Query param | Default | Min / Max | Notes |
|---|---|---|---|
limit | 5 | 1 / 10 | Max number of queries to return. |
lang | (auto) | — | Localizes the results (es, en, …). Resolved from Accept-Language if absent. |
Response
{
"queries": ["running shoes", "men's smartwatch", "laptop deals"]
}
TrendingResponseDTO — a flat string array. No products, no timestamps. If you need trending products, that endpoint does not exist yet.
When it shows
- Input empty state — the
EmptyStatecomponent loads the array along with a greeting (empty.initial.greeting.morning/afternoon/evening) and rotating subtitles (empty.initial.subtitles[]).
Customization
features.suggestions = falsedisables trending in addition to autocomplete. If you need trending without autocomplete, ask support.- Computation is per shop (not per user). The backend aggregates recent clicks and conversions.