Skip to main content

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/trending
curl "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 paramDefaultMin / MaxNotes
limit51 / 10Max 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 EmptyState component loads the array along with a greeting (empty.initial.greeting.morning/afternoon/evening) and rotating subtitles (empty.initial.subtitles[]).

Customization

  • features.suggestions = false disables 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.

Further reading