curl --request GET \
--url https://api.mintlify.com/v1/analytics/{projectId}/searches \
--header 'Authorization: Bearer <token>'{
"searches": [
{
"searchQuery": "<string>",
"hits": 123,
"ctr": 123,
"topClickedPage": "<string>",
"lastSearchedAt": "<string>"
}
],
"totalSearches": 1,
"nextCursor": "<string>"
}Retrieve search terms from your documentation with hit counts, click-through rates, and top clicked pages.
curl --request GET \
--url https://api.mintlify.com/v1/analytics/{projectId}/searches \
--header 'Authorization: Bearer <token>'{
"searches": [
{
"searchQuery": "<string>",
"hits": 123,
"ctr": 123,
"topClickedPage": "<string>",
"lastSearchedAt": "<string>"
}
],
"totalSearches": 1,
"nextCursor": "<string>"
}cursor parameter returned in the response. Continue fetching while nextCursor is not null.
dateFrom and dateTo parameters.
totalSearches field in the response is the sum of all search events in the date range, not the number of distinct queries.The Authorization header expects a Bearer token. Use an admin API key (prefixed with mint_). This is a server-side secret key. Generate one on the API keys page in your dashboard.
Date in ISO 8601 or YYYY-MM-DD format
"2024-01-01"
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.
"2024-01-01"
Max search terms per page (ordered by hit count descending)
1 <= x <= 100Opaque pagination cursor from the previous response
Search term aggregates with pagination
List of search term aggregates, ordered by hit count descending.
Show child attributes
Total count of search events in the requested date range (sum of all hits, not distinct queries).
x >= 0Opaque pagination cursor for the next page. Null if no more results.
Was this page helpful?