Worked Search Analytics samples
The four read endpoints on this page share one filter shape — afrom/to
window (a calendar day YYYY-MM-DD or a full ISO 8601 timestamp), an
optional surface (messages, contacts, calls, campaigns, inbox,
global, or the default all), and a limit (default 50, max 200) — so
one filter state serves every panel. The reader chain: pull the window →
read zero-result next to click-through → act on the queries that miss.
The operator narrative behind the same data lives in Read Search
Analytics; this overlay stays
envelope-accurate — request, response, and the errors worth branching on.
The samples show cURL and TypeScript — the two most-requested languages; the
other four tabs appear on the generated operation blocks below. The Node
SDK’s client.request(method, path) escape hatch takes the same route shape
for routes it does not cover with a typed method.
1. Read click-through per query
GET /api/v1/search-analytics/click-through ranks queries by impression
count over the window and returns each row’s click count and derived CTR.
Two worked windows: a calendar-day pair (the shape a date picker emits) and
a full timestamp pair, narrowed to one surface.
200
from is anchored to the start of that UTC day and a date-only
to to the end of it, and the echoed data.range shows the resolved
bounds. ctr is the share of a query’s searches that ended in a click, as a
percentage — read count next to it, because ctr is computed over the
queries that returned at least one result. A row like invoice august —
impressions accumulate, clicks stay low — reads as “the results render but
nobody picks one”: the ranking or snippet signal to act on.
2. Read zero-result queries
GET /api/v1/search-analytics/zero-result lists the queries that returned
no hits over the same window shape. Every row is a search your team expected
to match something and did not — the panel tenant support teams work from to
close content and lexicon gaps.
200
count and no matching
click-through row is a vocabulary gap (the grammar or lexicon does not
recognize the terms) — chase it once more through
GET /api/v1/search-analytics/parse-failures, which carries the same range
filter plus a masked query_text_sample of the raw input. An empty rows
array with the resolved range is a normal 200, not an error: nothing
missed in that window.
3. Errors worth branching on
Query params are validated before any aggregation runs, so the branches are small and terminal.422
All four are terminal-or-backoff, never blind-retry: the
422 and role
failures will not succeed until the request or the role changes, and the
429 carries its own wait. The envelope field semantics and the global
retry-vs-terminal decision table live in the error-handling
guide.