Analytics API (0.1.0)
Download OpenAPI specification:Download
API powering the Analytics feature of Algolia.
Send requests to the Algolia REST API
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
object Query parameters to be applied to the current query. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Send requests to the Algolia REST API
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
object Query parameters to be applied to the current query. |
Request Body schema: application/json
The parameters to send with the custom request.
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Send requests to the Algolia REST API
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
object Query parameters to be applied to the current query. |
Request Body schema: application/json
The parameters to send with the custom request.
Responses
Request samples
- Payload
{ }
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Send requests to the Algolia REST API
This method allow you to send requests to the Algolia REST API.
path Parameters
path required | string Example: /keys The path of the API endpoint to target, anything after the /1 needs to be specified. |
query Parameters
object Query parameters to be applied to the current query. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{ }
Returns top searches
Returns top searches. Limited to the 1000 most frequent ones. For each search, also returns the average number of hits returned.
query Parameters
index required | string The index name to target. |
clickAnalytics | boolean Default: false Whether to include the click-through and conversion rates for a search. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
orderBy | string (orderBy) Default: "searchCount" Enum: "searchCount" "clickThroughRate" "conversionRate" "averageClickPosition" Reorder the results. |
direction | string (direction) Default: "asc" Enum: "asc" "desc" The sorting of the result. |
limit | integer Default: 10 Number of records to return. Limit is the size of the page. |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "searches": [
- {
- "search": "string",
- "count": 0,
- "nbHits": 20
}
]
}
Returns the number of searches across the given time range
Returns the number of searches across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "count": 0,
- "dates": [
- {
- "date": "string",
- "count": 0
}
]
}
Returns top searches that didn't return any results
Returns top searches that didn't return any results. Limited to the 1000 most frequent ones.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
limit | integer Default: 10 Number of records to return. Limit is the size of the page. |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "searches": [
- {
- "search": "string",
- "count": 0,
- "nbHits": 20
}
]
}
Returns top searches that didn't lead to any clicks
Returns top searches that didn't lead to any clicks. Limited to the 1000 most frequent ones. For each search, also returns the average number of found hits.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
limit | integer Default: 10 Number of records to return. Limit is the size of the page. |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "searches": [
- {
- "search": "string",
- "count": 0,
- "withFilterCount": 0
}
]
}
Returns the rate at which searches didn't return any results
Returns the rate at which searches didn't return any results. 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 results used to compute the rates.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "rate": 0,
- "count": 0,
- "noResultCount": 0,
- "dates": [
- {
- "date": "string",
- "noResultCount": 0,
- "count": 0,
- "rate": 0
}
]
}
Returns the rate at which searches didn't lead to any clicks
Returns the rate at which searches didn'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.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "rate": 0,
- "count": 0,
- "noClickCount": 0,
- "dates": [
- {
- "rate": 0,
- "count": 0,
- "noClickCount": 0,
- "date": "string"
}
]
}
Returns top hits
Returns top hits. Limited to the 1000 most frequent ones.
query Parameters
index required | string The index name to target. |
search | string The query term to search for. Must match the exact user input. |
clickAnalytics | boolean Default: false Whether to include the click-through and conversion rates for a search. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
limit | integer Default: 10 Number of records to return. Limit is the size of the page. |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "hits": [
- {
- "hit": "string",
- "count": 0
}
]
}
Returns the distinct count of users across the given time range
Returns the distinct count of users across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "count": 0,
- "dates": [
- {
- "date": "string",
- "count": 0
}
]
}
Returns top filter attributes
Returns top filter attributes. Limited to the 1000 most used filters.
query Parameters
index required | string The index name to target. |
search | string The query term to search for. Must match the exact user input. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
limit | integer Default: 10 Number of records to return. Limit is the size of the page. |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "attributes": [
- {
- "attribute": "string",
- "count": 0
}
]
}
Returns top filters for the given attribute
Returns top filters for the given attribute. Limited to the 1000 most used filters.
path Parameters
attribute required | string The exact name of the attribute. |
query Parameters
index required | string The index name to target. |
search | string The query term to search for. Must match the exact user input. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
limit | integer Default: 10 Number of records to return. Limit is the size of the page. |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "values": [
- {
- "attribute": "string",
- "operator": "string",
- "value": "string",
- "count": 0
}
]
}
Returns top filters with no results
Returns top filters with no results. Limited to the 1000 most used filters.
query Parameters
index required | string The index name to target. |
search | string The query term to search for. Must match the exact user input. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
limit | integer Default: 10 Number of records to return. Limit is the size of the page. |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "values": [
- {
- "count": 0,
- "values": [
- {
- "attribute": "string",
- "operator": "string",
- "value": "string"
}
]
}
]
}
Returns top countries
Returns top countries. Limited to the 1000 most frequent ones.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
limit | integer Default: 10 Number of records to return. Limit is the size of the page. |
offset | integer Default: 0 Position of the starting record. Used for paging. 0 is the first record. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "countries": [
- {
- "country": "string",
- "count": 0
}
]
}
Returns the average click position
Returns the average click position. The endpoint returns a value for the complete given time range, as well as a value per day.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "average": 0,
- "clickCount": 0,
- "dates": [
- {
- "average": 0,
- "clickCount": 0,
- "date": "string"
}
]
}
Returns the distribution of clicks per range of positions
Returns the distribution of clicks per range of positions.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "positions": [
- {
- "position": [
- 0
], - "clickCount": 0
}, - {
- "position": [
- 0
], - "clickCount": 0
}
]
}
Returns a click-through rate (CTR)
Returns a click-through rate (CTR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of clicks and searches used to compute the rates.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "rate": 0,
- "clickCount": 0,
- "trackedSearchCount": 0,
- "dates": [
- {
- "rate": 0,
- "clickCount": 0,
- "trackedSearchCount": 0,
- "date": "string"
}
]
}
Returns a conversion rate (CR)
Returns a conversion rate (CR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of conversion and searches used to compute the rates.
query Parameters
index required | string The index name to target. |
startDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: startDate=1999-09-19 The lower bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
endDate | string^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01... Example: endDate=2000-01-21 The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze. |
tags | string Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "rate": 0,
- "trackedSearchCount": 0,
- "conversionCount": 0,
- "dates": [
- {
- "rate": 0,
- "trackedSearchCount": 0,
- "conversionCount": 0,
- "date": "string"
}
]
}
Get latest update time of the analytics API
Returns the latest update time of the analytics API for a given index. If the index has been recently created and/or no search has been performed yet the updated time will be null.
query Parameters
index required | string The index name to target. |
Responses
Response samples
- 200
- 400
- 402
- 403
- 404
{- "updatedAt": "string"
}