Popular search queries
Search queries ranked by frequency, highest first. Set noResultsOnly to true to return only queries that returned zero results, which is the fastest way to find content gaps.
curl -X GET "https://api.documentationai.app/api/v1/analytics/search/queries?startDate=2026-05-01&endDate=2026-05-31&limit=20&offset=0&noResultsOnly=false" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://api.documentationai.app/api/v1/analytics/search/queries?startDate=2026-05-01&endDate=2026-05-31&limit=20&offset=0&noResultsOnly=false"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.documentationai.app/api/v1/analytics/search/queries?startDate=2026-05-01&endDate=2026-05-31&limit=20&offset=0&noResultsOnly=false", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.documentationai.app/api/v1/analytics/search/queries?startDate=2026-05-01&endDate=2026-05-31&limit=20&offset=0&noResultsOnly=false", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.documentationai.app/api/v1/analytics/search/queries?startDate=2026-05-01&endDate=2026-05-31&limit=20&offset=0&noResultsOnly=false')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"startDate": "example_string",
"endDate": "example_string",
"queries": [
{
"query": "example_string",
"count": 10,
"noResults": true,
"clicks": 42,
"aiEscalations": 42
}
],
"total": 42
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Too Many Requests",
"message": "Rate limit exceeded. Please try again later",
"code": 429,
"retryAfter": 3600
}
{
"error": "Error",
"message": "The analytics store could not be reached. The request was valid — retry after a short delay.",
"code": 502
}
/analytics/search/queries
Target server for requests. Edit to use your own host.
API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...
Authorization: Bearer dai_...First UTC day to include, as YYYY-MM-DD. Defaults to six days before endDate. The range must not exceed 90 days.
Last UTC day to include, as YYYY-MM-DD. Inclusive — the whole day is counted. Defaults to today.
Maximum number of rows to return
Number of rows to skip. Combined with total, this is how you page through results.
Return only queries that produced zero results
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...
Query Parameters
First UTC day to include, as YYYY-MM-DD. Defaults to six days before endDate. The range must not exceed 90 days.
2026-05-01Last UTC day to include, as YYYY-MM-DD. Inclusive — the whole day is counted. Defaults to today.
2026-05-31Maximum number of rows to return
Number of rows to skip. Combined with total, this is how you page through results.
Return only queries that produced zero results