Analytics API (1.0.0)
Download OpenAPI specification:Download
The Analytics API lets you review your search, and click and conversion analytics.
Note: The API key in the
X-Algolia-API-Key
header requires theanalytics
ACL.
Get top searches
Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
clickAnalytics | |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
orderBy | string (orderBy) Default: "searchCount" Enum: "searchCount" "clickThroughRate" "conversionRate" "averageClickPosition" Reorder the results. |
direction | string (direction) Default: "asc" Enum: "asc" "desc" Sorting direction of the results: ascending or descending. |
limit | integer Default: 10 Number of records to return (page size). |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "searches": [
- {
- "search": "separator",
- "count": 504,
- "nbHits": 20
}
]
}
Get number of searches
Returns the number of searches within a time range.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "count": 2,
- "dates": [
- {
- "date": "2023-06-14",
- "count": 2
}
]
}
Get top searches with no results
Returns the most popular of the latest 1,000 searches that didn't return any results.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
limit | integer Default: 10 Number of records to return (page size). |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "searches": [
- {
- "search": "separator",
- "count": 2,
- "nbHits": 20
}
]
}
Get top searches with no clicks
Return the most popular of the last 1,000 searches that didn't lead to any clicks.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
limit | integer Default: 10 Number of records to return (page size). |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "searches": [
- {
- "search": "separator",
- "count": 2,
- "withFilterCount": 2
}
]
}
Get no results rate
Returns the rate at which searches didn't return any results.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "rate": 0.14634193523426317,
- "count": 2,
- "noResultCount": 2,
- "dates": [
- {
- "date": "2023-06-14",
- "noResultCount": 54,
- "count": 504,
- "rate": 0.14634193523426317
}
]
}
Get no click rate
Returns the rate at which searches don't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "rate": 0.14634193523426317,
- "count": 162,
- "noClickCount": 162,
- "dates": [
- {
- "rate": 0.14634193523426317,
- "count": 504,
- "noClickCount": 162,
- "date": "2023-06-14"
}
]
}
Get top hits
Return the most popular clicked results in the last 1,000 searches.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
search | string Example: search=enable ab test User query. |
clickAnalytics | |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
limit | integer Default: 10 Number of records to return (page size). |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "hits": [
- {
- "hit": "method-export-rules-php",
- "count": 2
}
]
}
Get user count
Return the count of unique users.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "count": 2,
- "dates": [
- {
- "date": "2023-06-14",
- "count": 2
}
]
}
Get top filterable attributes
Return the most popular filterable attributes in the 1,000 most recently used filters.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
search | string Example: search=enable ab test User query. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
limit | integer Default: 10 Number of records to return (page size). |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "attributes": [
- {
- "attribute": "url",
- "count": 2
}
]
}
Get top filter values for an attribute
Returns the most popular filter values for an attribute in the 1,000 most recently used filters.
Authorizations:
path Parameters
attribute required | string Example: brand Attribute name. |
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
search | string Example: search=enable ab test User query. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
limit | integer Default: 10 Number of records to return (page size). |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "values": [
- {
- "attribute": "url",
- "operator": ":",
- "value": "integration",
- "count": 2
}
]
}
Get top filters for a no result search
Returns top filters for filter-enabled searches that don't return results. Limited to the 1,000 most recently used filters.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
search | string Example: search=enable ab test User query. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
limit | integer Default: 10 Number of records to return (page size). |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "values": [
- {
- "count": 2,
- "values": [
- {
- "attribute": "url",
- "operator": ":",
- "value": "integration"
}
]
}
]
}
Get top countries
Returns top countries. Limited to the 1,000 most frequent ones.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
limit | integer Default: 10 Number of records to return (page size). |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "countries": [
- {
- "country": "UK",
- "count": 2
}
]
}
Get average click position
Return the average click position for the complete time range and for individual days.
Note: If all
positions
have aclickCount
of0
ornull
, it means Algolia didn't receive any click events for tracked searches. A tracked search is a search request where theclickAnalytics
parameter istrue
.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "average": 2.3344634550185286,
- "clickCount": 162,
- "dates": [
- {
- "average": 2.3344634550185286,
- "clickCount": 162,
- "date": "2023-06-14"
}
]
}
Get click positions
Show the number of clicks events and their associated position in the search results.
Note: If all
positions
have aclickCount
of0
ornull
, it means Algolia didn't receive any click events for tracked searches. A tracked search is a search request where theclickAnalytics
parameter istrue
.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "positions": [
- {
- "position": [
- 10,
- 10
], - "clickCount": 162
}, - {
- "position": [
- 10,
- 10
], - "clickCount": 162
}
]
}
Get click-through rate (CTR)
Returns a click-through rate (CTR).
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "rate": 0.14634193523426317,
- "clickCount": 162,
- "trackedSearchCount": 2,
- "dates": [
- {
- "rate": 0.14634193523426317,
- "clickCount": 162,
- "trackedSearchCount": 2,
- "date": "2023-06-14"
}
]
}
Get conversion rate (CR)
Return a conversion rate.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=2022-09-19 Start date (a string in the format |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2023-01-21 End date (a string in the format |
tags | string Example: tags=device:mobile%20phone Filter analytics on the |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "rate": 0.14634193523426317,
- "trackedSearchCount": 2,
- "conversionCount": 0,
- "dates": [
- {
- "rate": 0.14634193523426317,
- "trackedSearchCount": 2,
- "conversionCount": 0,
- "date": "2023-06-14"
}
]
}
Get Analytics API status
Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, updatedAt
will be null
.
Note: The Analytics API is updated every 5 minutes.
Authorizations:
query Parameters
index required | string Example: index=YourIndexName Index name to target. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "updatedAt": "2023-07-04T12:49:15Z"
}