Skip to navigation

List Top Searches

List the most frequent searches, with their average number of results.

Authentication

AuthorizationBearer

A search key, issued by Captain. Sent as Authorization: Bearer <key>.

Path parameters

indexstringRequiredformat: "^[a-z0-9][a-z0-9_-]{0,47}$"
index name

Query parameters

limitintegerOptional1-1000Defaults to 10

list rows to return (the list only: counts and rates cover every row)

offsetintegerOptional>=0Defaults to 0
with_ratesbooleanOptionalDefaults to false

add click_through_rate and conversion_rate to each search

start_datestringOptionalformat: "date"

first day, UTC, inclusive (YYYY-MM-DD). Default: 6 days before end_date (a 7-day window)

end_datestringOptionalformat: "date"

last day, UTC, inclusive (YYYY-MM-DD). Default: today. At most 366 days from start_date

start_timestringOptional

an exact start instead of start_date: unix seconds, or ISO 8601 in UTC (2026-10-10T10:00:00Z). start_date and end_date in the reply are then the UTC days the window touches

end_timestringOptional

an exact end (exclusive): unix seconds or ISO 8601 with Z. Default: now; never later than now. Must be after start_time

Response headers

X-Captain-Applied-Seqinteger

the last update seq search had applied when this request started; the answer reflects at least that much (GET …/updates applied_seq). Not on 401 or 403, nor for an index this server does not have

X-Captain-Index-IncarnationstringOptional

the index’s incarnation, an opaque string: it changes only when the index is deleted and created again (whose seqs start again at 1), or restored from a backup (whose seqs continue from the backup’s). Sent with X-Captain-Applied-Seq

Response

report
start_datestringformat: "date"
end_datestringformat: "date"
searcheslist of objects
partialbooleanOptional

true when the search log was too large to read whole within one request’s budget: the numbers cover what was counted

partial_reasonenumOptional

row_budget: more searches than one request holds (500,000); time_budget: more than about 3.5 seconds of reading; counting (usage): days still being counted

Allowed values:
counted_throughdouble or nullOptional

the time (unix seconds) of the last record counted, when partial