The generated API clients are a work in progress, you can also find our stable clients on the Algolia documentation.

Skip to main content

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 the analytics ACL.

Search Analytics

Get all search analytics.

Get top searches

Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.

Authorizations:
(appIdapiKey)
query Parameters
index
required
string
Example: index=YourIndexName

Index name to target.

clickAnalytics
boolean
Default: false

Whether to include click 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=2022-09-19

Start date (a string in the format YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) 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"

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 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
Example
{
  • "searches": [
    ]
}

Get number of searches

Returns the number of searches within a time range.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

tags
string
Example: tags=device:mobile%20phone

Filter analytics on the 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "dates": [
    ]
}

Get top searches with no results

Returns the most popular of the latest 1,000 searches that didn't return any results.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

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 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "searches": [
    ]
}

Get top searches with no clicks

Return the most popular of the last 1,000 searches that didn't lead to any clicks.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

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 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "searches": [
    ]
}

Get no results rate

Returns the rate at which searches didn't return any results.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

tags
string
Example: tags=device:mobile%20phone

Filter analytics on the 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "rate": 0.14634193523426317,
  • "count": 2,
  • "noResultCount": 2,
  • "dates": [
    ]
}

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:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

tags
string
Example: tags=device:mobile%20phone

Filter analytics on the 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "rate": 0.14634193523426317,
  • "count": 162,
  • "noClickCount": 162,
  • "dates": [
    ]
}

Get top hits

Return the most popular clicked results in the last 1,000 searches.

Authorizations:
(appIdapiKey)
query Parameters
index
required
string
Example: index=YourIndexName

Index name to target.

search
string
Example: search=enable ab test

User query.

clickAnalytics
boolean
Default: false

Whether to include click 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=2022-09-19

Start date (a string in the format YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

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 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
Example
{
  • "hits": [
    ]
}

Get user count

Return the count of unique users.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

tags
string
Example: tags=device:mobile%20phone

Filter analytics on the 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "count": 2,
  • "dates": [
    ]
}

Get top filterable attributes

Return the most popular filterable attributes in the 1,000 most recently used filters.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

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 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "attributes": [
    ]
}

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:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

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 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "values": [
    ]
}

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:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

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 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "values": [
    ]
}

Get top countries

Returns top countries. Limited to the 1,000 most frequent ones.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

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 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "countries": [
    ]
}

Click Analytics

Get all click analytics.

Get average click position

Return the average click position for the complete time range and for individual days.

Note: If all positions have a clickCount of 0 or null, it means Algolia didn't receive any click events for tracked searches. A tracked search is a search request where the clickAnalytics parameter is true.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

tags
string
Example: tags=device:mobile%20phone

Filter analytics on the 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "average": 2.3344634550185286,
  • "clickCount": 162,
  • "dates": [
    ]
}

Get click positions

Show the number of clicks events and their associated position in the search results.

Note: If all positions have a clickCount of 0 or null, it means Algolia didn't receive any click events for tracked searches. A tracked search is a search request where the clickAnalytics parameter is true.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

tags
string
Example: tags=device:mobile%20phone

Filter analytics on the 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "positions": [
    ]
}

Get click-through rate (CTR)

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

tags
string
Example: tags=device:mobile%20phone

Filter analytics on the 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "rate": 0.14634193523426317,
  • "clickCount": 162,
  • "trackedSearchCount": 2,
  • "dates": [
    ]
}

Get conversion rate (CR)

Return a conversion rate.

Authorizations:
(appIdapiKey)
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 YYYY-MM-DD) 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=2023-01-21

End date (a string in the format YYYY-MM-DD) of the period to analyze.

tags
string
Example: tags=device:mobile%20phone

Filter analytics on the 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 must be URL-encoded.

Responses

Response samples

Content type
application/json
{
  • "rate": 0.14634193523426317,
  • "trackedSearchCount": 2,
  • "conversionCount": 0,
  • "dates": [
    ]
}

Advanced

Advanced operations.

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:
(appIdapiKey)
query Parameters
index
required
string
Example: index=YourIndexName

Index name to target.

Responses

Response samples

Content type
application/json
{
  • "updatedAt": "2023-07-04T12:49:15Z"
}