Skip to main content
Mintlify
current

Search documentation

Type to search this documentation.

Get search queries

GET/v1/analytics/{projectId}/searchesGet search queries

Returns paginated documentation search terms for the date range, ordered by hit count descending. Each row includes click-through rate, the most-clicked result path for that query (if any), and the last time the term was searched. totalSearches is the total number of search query events in the same date range (sum of all hits, not distinct queries).

Authenticate with an admin API key.

Parameters

projectIdstringpathrequired

Your project ID. Can be copied from the [API keys](https://app.mintlify.com/settings/organization/api-keys) page in your dashboard.

dateFromstringquery

Date in ISO 8601 or YYYY-MM-DD format

dateTostringquery

Date in ISO 8601 or YYYY-MM-DD format. `dateTo` is an exclusive upper limit. Results include dates before, but not on, the specified date.

limitnumberquery

Max search terms per page (ordered by hit count descending)

default 50 · maximum 100 · minimum 1

cursorstringquery

Opaque pagination cursor from the previous response

Responses

200Search term aggregates with paginationapplication/json
objectSearchesResponse
nextCursornull | stringrequired

Opaque pagination cursor for the next page. Null if no more results.

searchesarray of objectrequired

Search terms ordered by hit count descending.

Show child attributes
Show array items
ctrnumberrequired

Percentage of searches for this term that resulted in a click on a specific search result (clicks ÷ hits × 100). A click includes selecting a result with the pointer or pressing Enter when a result is highlighted. Submitting a query by itself does not count as a click. Clicking the AI assistant in the search bar, or pressing Enter to use it, counts as a search with no click and is not tracked separately in this field.

hitsnumberrequired

Number of times this term was searched.

lastSearchedAtstringrequired

Timestamp of the last time this term was searched.

searchQuerystringrequired

The search term entered by users.

topClickedPagenull | stringrequired

The most-clicked result path for this query, if any.

totalSearchesintegerrequired

Total count of search events in the requested date range (sum of all hits, not distinct queries).

minimum 0

Example response
{
  "nextCursor": "string",
  "searches": [
    {
      "ctr": 0,
      "hits": 0,
      "lastSearchedAt": "string",
      "searchQuery": "string",
      "topClickedPage": "string"
    }
  ],
  "totalSearches": 0
}
400Invalid query parameters or cursorapplication/json
objectAnalyticsErrorResponse
detailsarray of object

Additional details about the error.

Show child attributes
Show array items
messagestringrequired

Description of a specific validation or processing error.

errorstringrequired

Error message describing what went wrong.

Example response
{
  "details": [
    {
      "message": "string"
    }
  ],
  "error": "string"
}
500Server errorapplication/json
objectAnalyticsErrorResponse
detailsarray of object

Additional details about the error.

Show child attributes
Show array items
messagestringrequired

Description of a specific validation or processing error.

errorstringrequired

Error message describing what went wrong.

Example response
{
  "details": [
    {
      "message": "string"
    }
  ],
  "error": "string"
}
Documentation menu