Skip to navigation

Get Analytics

Get the main search metrics for a period in one call. On an index with per-record access control, analytics is available through Captain.

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

daysdoubleOptionalDefaults to 7

the last days * 24 hours, when no start_date or end_date is sent

start_datestringOptionalformat: "date"

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

end_datestringOptionalformat: "date"

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

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. Sending either one replaces days

end_timestringOptional

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

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
datasetstringOptional
the index
daysdoubleOptional
start_datestringOptionalformat: "date"
end_datestringOptionalformat: "date"
search_requestsintegerOptional
every search and typeahead request
searchesintegerOptional
searches, with the keystrokes that led to each counted once
top_querieslist of objectsOptional
zero_result_querieslist of objectsOptional
zero_result_ratedoubleOptional
eventsmap from strings to integersOptional
event counts by type
click_through_ratedouble or nullOptional
mean_click_positiondouble or nullOptional
conversion_ratedouble or nullOptional
tracked_searchesintegerOptional
searches that carried a user token
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