Skip to content

Trending Queries API

GET
View MD

The Trending Queries API returns a list of search terms that are currently popular among your users. It is typically used to render a “Trending Searches” list before the user starts typing.

ParameterTypeRequiredDescription
tracker_idstringYour unique site identifier within Luigi’s Box.
ParameterTypeDescription
ctx[]stringModel-selection context in key:value format, for example ctx[]=warehouse:berlin. Keys must match contexts reported in Analytics.
HeaderValueRequiredDescription
Accept-Encodinggzip, deflateRecommendedEnables compressed responses to reduce payload size.

To make a valid request:

  1. Send a GET request to https://live.luigisbox.com/v2/trending_queries.
  2. Provide tracker_id.
  3. Add ctx[] only when you need model segmentation.

For implementation guidance, see Quickstart: Trending Queries.

The response is a JSON array where each object represents one trending query.

FieldTypeDescription
[root]arrayList of trending query objects.
titlestringText of the trending query.

The API uses standard HTTP status codes to indicate success or failure.

HTTP StatusDescription
200 OKThe request succeeded and results are returned.
400 Bad RequestThe request was malformed — missing or invalid tracker_id.
500 Server ErrorInternal error. If persistent, contact support.
504 Gateway TimeoutThe request took too long to process. Retrying may succeed.