Skip to navigation

Get Clicks

Get the click-through rate in total and per day, the average click position, and clicks per position.

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

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"
ratedouble or null

click-through rate: click_count / tracked_search_count

click_countinteger
tracked searches with at least one click
tracked_search_countinteger
average_positiondouble or null

mean position (1-based) of the clicks on tracked searches, two decimals; null with no clicks

positionslist of objects

12 buckets: positions 1 through 10 each, then 11-20, then 21 and beyond

dateslist of objects

every day of the window, oldest first; rate is null on a day with nothing to divide by

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