Retrieve top searches
Returns the most popular searches. For each search, it also includes the average number of hits.
clickAnalytics query parameter to true, the response also includes:
- Tracked searches count
Tracked searches are Search API requests with
clickAnalyticsset totrue. This differs from the response’scount, which includes searches whereclickAnalyticsisfalse. - Click count
- Click-through rate (CTR)
- Conversion count
- Conversion rate (CR)
- Average click position
revenueAnalytics query parameter to true, the response also includes:
- Add-to-cart count
- Add-to-cart rate (ATCR)
- Purchase count
- Purchase rate
- Revenue details for each currency
- Null means there were no queries. Algolia didn’t receive any events, so rates are null.
- 0% rates mean there were queries but no click or conversion events were received.
analyticsAuthorizations
Your Algolia application ID.
Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.
Query Parameters
Index name.
"ALGOLIA_INDEX_NAME"
Whether to include metrics related to click and conversion events in the response.
Sorting direction of the results: ascending or descending.
asc, desc End date of the period to analyze, in YYYY-MM-DD format.
"2023-01-21"
Number of items to return.
x <= 1000Position of the first item to return.
x >= 0Attribute by which to order the response items.
If the clickAnalytics parameter is false, only searchCount is available.
searchCount, clickThroughRate, conversionRate, averageClickPosition Whether to include metrics related to revenue events in the response.
Start date of the period to analyze, in YYYY-MM-DD format.
"2022-09-19"
Tags by which to segment the analytics.
You can combine multiple tags with OR and AND.
Tags must be URL-encoded.
For more information, see Segment your analytics data.
Response
OK
- Top searches
- Top searches with click analytics
- Top searches with revenue analytics
Most popular searches and their number of search results (hits).