Get search analytics
const url = 'https://api.shoofai.com/v1/apps/demo-store/analytics?interval=hour';const options = {method: 'GET', headers: {'x-shoof-api-key': '<x-shoof-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.shoofai.com/v1/apps/demo-store/analytics?interval=hour' \ --header 'x-shoof-api-key: <x-shoof-api-key>'The numbers the dashboard’s analytics page shows, for a range: searches, visitors, the no-result, click-through and conversion rates, a series over time, the top searches, the searches that found nothing and the most clicked records.
The range defaults to the last 14 days, and starts no earlier than the plan’s retention
(retentionDays). Searches sent with analytics: false aren’t counted.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The app’s id, shown in the dashboard (for example ali-sport-goods). demo-store is the public demo app.
Example
demo-storeQuery Parameters
Section titled “Query Parameters”The start of the range, an ISO 8601 date (2026-10-01) or date-time.
The end of the range, an ISO 8601 date or date-time. A date means its midnight, UTC. Defaults to now.
The step of series.
Responses
Section titled “Responses”The analytics for the range.
object
object
Distinct visitors (userToken) who searched.
The share of searches that found nothing
The share of searches followed by a click
The share of searches followed by a conversion
The median search time in milliseconds.
The 95th percentile search time in milliseconds.
Searches by kind (search
object
object
object
object
object
How many days back the plan keeps analytics.
Example generated
{ "totals": { "searches": 1, "users": 1, "noResultRate": 1, "clickThroughRate": 1, "conversionRate": 1, "avgClickPosition": 1, "latencyP50": 1, "latencyP95": 1, "revenue": 1, "byType": { "additionalProperty": 1 } }, "series": [ { "date": "2026-04-15T12:00:00Z", "searches": 1, "noResults": 1, "clicks": 1, "conversions": 1 } ], "topQueries": [ { "query": "example", "count": 1, "avgHits": 1 } ], "noResultQueries": [ { "query": "example", "count": 1 } ], "topClicked": [ { "objectId": "example", "count": 1, "title": "example" } ], "retentionDays": 1}The request is invalid (bad_request). details lists each problem with its path.
object
object
A stable, machine-readable code.
A human-readable explanation.
More about the error, such as the validation problems.
Example
{ "error": { "code": "bad_request", "message": "Invalid request", "details": [ { "path": "hitsPerPage", "message": "Must be 100 or less" } ] }}The key is missing, unknown, expired or for another app (unauthorized).
object
object
A stable, machine-readable code.
A human-readable explanation.
More about the error, such as the validation problems.
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}The key can’t do this (forbidden), the origin isn’t allowed for the key, or the feature
isn’t in the plan (feature_not_in_plan) or is switched off for the app (feature_disabled).
object
object
A stable, machine-readable code.
A human-readable explanation.
More about the error, such as the validation problems.
Example generated
{ "error": { "code": "example", "message": "example", "details": "example" }}Too many requests in this window (rate_limited). Wait Retry-After seconds, then retry.
object
object
A stable, machine-readable code.
A human-readable explanation.
More about the error, such as the validation problems.
Example
{ "error": { "code": "rate_limited", "message": "Rate limit exceeded" }}Headers
Section titled “Headers”Seconds to wait before retrying. Sent with every 429.
What’s left in the window (IETF draft-ietf-httpapi-ratelimit-headers): the bucket’s name,
r the requests left and t the seconds until the window resets. Sent on every response.
Example
"search";r=597;t=43The bucket’s quota q per window of w seconds. Sent on every response.
Example
"search";q=600;w=60The requests allowed per window (the older form of RateLimit-Policy).
The requests left in the window.
Seconds until the window resets.