Skip to main content

Analytics API (0.1.0)

API powering the Analytics feature of Algolia.

Authentication

appId

Security Scheme Type API Key
Header parameter name: X-Algolia-Application-Id

apiKey

Security Scheme Type API Key
Header parameter name: X-Algolia-API-Key

analytics

Analytics API reference

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
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
parameters
string
Example: parameters=?query=mySearchQuery&hitsPerPage=10

URL-encoded query string. Force some query parameters to be applied for each query made with this API key.

Responses

Response samples

Content type
application/json
{ }

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
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
parameters
string
Example: parameters=?query=mySearchQuery&hitsPerPage=10

URL-encoded query string. Force some query parameters to be applied for each query made with this API key.

Request Body schema: application/json

The parameters to send with the custom request.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
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
parameters
string
Example: parameters=?query=mySearchQuery&hitsPerPage=10

URL-encoded query string. Force some query parameters to be applied for each query made with this API key.

Request Body schema: application/json

The parameters to send with the custom request.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Send requests to the Algolia REST API.

This method allow you to send requests to the Algolia REST API.

Authorizations:
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
parameters
string
Example: parameters=?query=mySearchQuery&hitsPerPage=10

URL-encoded query string. Force some query parameters to be applied for each query made with this API key.

Request Body schema: application/json

The parameters to send with the custom request.

object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Returns top searches.

Returns top searches. Limited to the 1000 most frequent ones. For each search, also returns the average number of hits returned.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

The upper bound timestamp (a date, a string like "2006-01-02") of the period to analyze.

orderBy
string
Default: "searchCount"
Enum: "searchCount" "clickThroughRate" "conversionRate" "averageClickPosition"

Reorder the results.

direction
string
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

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

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.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

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.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

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.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

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.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

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.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

Returns top hits.

Returns top hits. Limited to the 1000 most frequent ones.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

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.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

Returns top filter attributes.

Returns top filter attributes. Limited to the 1000 most used filters.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

Returns top filters for the given attribute.

Returns top filters for the given attribute. Limited to the 1000 most used filters.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

Returns top filters with no results.

Returns top filters with no results. Limited to the 1000 most used filters.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

Returns top countries.

Returns top countries. Limited to the 1000 most frequent ones.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

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.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

Returns the distribution of clicks per range of positions.

Returns the distribution of clicks per range of positions.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

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.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

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.

Authorizations:
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-19T00:00:00.000Z

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-21T00:00:00.000Z

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

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

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.

Authorizations:
query Parameters
index
required
string

The index name to target.

Responses

Response samples

Content type
application/json
{
  • "updatedAt": "string"
}