/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Get Search Analytics

Get Search Analytics

Popular and zero-result doc site searches, with a daily series and changes against the previous window.

GET/v1/projects/{projectId}/analytics/searchesTry it
Session token

Returns what visitors searched for on the doc site — the most popular queries and the ones that found nothing — with a daily series and changes against the previous window of the same length.

Note

Session JWT and org membership required. Any role can read it — an API key gets 401, a non-member 403. Any plan.

Path Parameters

NameDescription
projectId:stringpathRequired
The project ID.

Query Parameters

NameDescription
days:integerquery
Time window in days.
Default30

Response Fields

NameDescription
data.popular:array
Up to 20 most frequent queries: query, count, and avgResults — the average number of results, sent as a decimal string.
data.zeroResult:array
Up to 20 most frequent queries that returned no results: query, count. These are your clearest content gaps.
data.daily:array
Searches per UTC day in the window, { date, total, zeroResults }, oldest first. Days with no searches are left out.
data.changes:object
searches and zeroResults (percent) and clickThrough (points) against the previous window. A key is left out when there is nothing to compare with.
data.clickThrough:number
Share of searches in the window where the visitor clicked a result, 0–100. With it, each popular row also gets clickThrough and topResult (the most clicked result path, or null).
Warning

Click-through is usually absent today. clickThrough, changes.clickThrough and the per-query clickThrough and topResult are sent only when the window has at least one recorded result click, and deployed doc sites do not report clicks yet — only searches you track yourself with clickedResult on the search beacon count. Without clicks the fields are left out rather than reported as 0.

daily, changes and the click-through fields are optional — see trend fields. If the search query itself fails, the response is 200 with empty popular and zeroResult lists.

Error Responses

401 Unauthorized

Missing, invalid or expired session JWT, or an API key.

403 Forbidden

You are not a member of the organization that owns the project.

404 Not Found

The project does not exist or has been deleted.

Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl "https://api.syntext.dev/v1/projects/3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c/analytics/searches?days=7" \
-H "Authorization: Bearer $SYNTEXT_JWT"
Responseapplication/json
200OK
{
"data": {
"popular": [
{ "query": "webhooks", "count": 311, "avgResults": "6.4000000000000000" },
{ "query": "rate limits", "count": 140, "avgResults": "3.0000000000000000" }
],
"zeroResult": [
{ "query": "rotate api key", "count": 28 }
],
"daily": [
{ "date": "2026-11-02", "total": 512, "zeroResults": 31 },
{ "date": "2026-11-03", "total": 498, "zeroResults": 24 }
],
"changes": { "searches": 12, "zeroResults": -8 }
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext