Skip to main content
GET
/
2
/
searches
curl
curl --request GET \
  --url 'https://analytics.us.algolia.com/2/searches?index=ALGOLIA_INDEX_NAME&clickAnalytics=false&revenueAnalytics=false&startDate=2022-09-19&endDate=2023-01-21&orderBy=searchCount&direction=asc&limit=10&offset=0&tags=device%3Amobile%2520phone' \
  --header 'accept: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID'
{
  "searches": [
    {
      "search": "separator",
      "count": 504,
      "nbHits": 20
    }
  ]
}
If you set the clickAnalytics query parameter to true, the response also includes:
  • Tracked searches count Tracked searches are Search API requests with clickAnalytics set to true. This differs from the response’s count, which includes searches where clickAnalytics is false.
  • Click count
  • Click-through rate (CTR)
  • Conversion count
  • Conversion rate (CR)
  • Average click position
If you set the 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
There’s a difference between 0% rates and null rates:
  • 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.
Required ACL: analytics

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

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

Index name.

Example:

"ALGOLIA_INDEX_NAME"

clickAnalytics
boolean
default:false

Whether to include metrics related to click and conversion events in the response.

revenueAnalytics
boolean
default:false

Whether to include metrics related to revenue events in the response.

startDate
string

Start date of the period to analyze, in YYYY-MM-DD format.

Example:

"2022-09-19"

endDate
string

End date of the period to analyze, in YYYY-MM-DD format.

Example:

"2023-01-21"

orderBy
enum<string>
default:searchCount

Attribute by which to order the response items.

If the clickAnalytics parameter is false, only searchCount is available.

Available options:
searchCount,
clickThroughRate,
conversionRate,
averageClickPosition
direction
enum<string>
default:asc

Sorting direction of the results: ascending or descending.

Available options:
asc,
desc
limit
integer
default:10

Number of items to return.

Required range: x <= 1000
offset
integer
default:0

Position of the first item to return.

Required range: x >= 0
tags
string

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

searches
topSearch · object[]
required

Most popular searches and their number of search results (hits).

Last modified on March 23, 2026