API DocumentationAPI Reference

API Reference

Index of every endpoint in the AIclicks API v1.

Every endpoint below is GET, mounted under /api/v1/, and returns the standard envelope. Click through for parameters, response shape, and worked examples.

Authentication

EndpointPurpose
GET /validateConfirm a key works and inspect its scope (teams, allowed domains, rate-limit state).

Domains

EndpointPurpose
GET /domainsList domains the caller's key can access. Returns the domain_id values used elsewhere.

Prompts

EndpointPurpose
GET /promptsTracked prompts for a domain, with per-prompt aggregates.
GET /prompt-statistics-time-seriesTop-N prompts by mentions, each with a daily series of mentions / responses / citations / avg position, plus estimated_search_volume — which prompts gained or dropped.
GET /fanout-queriesGrounding queries the LLM generated while answering a prompt.

Competitor

EndpointValuePurpose
GET /brand-rankingslistSnapshot share-of-voice ranking: the brand vs. its tracked competitors.
GET /competitor-time-serieslistThe trend version — daily visibility / SOV / position per competitor (plus the brand).
GET /competitor-discoverylistUntracked brands appearing in your prompts' answers, ranked by prompts mentioned — who to start tracking.

Brand Analytics

EndpointValuePurpose
GET /mentions-time-seriesintDaily raw count of brand mentions across all responses.
GET /visibility-time-series%Daily visibility — share of LLM responses that mention the brand.
GET /model-leaderboardlistPer-AI-channel visibility and average position — which models surface the brand.

Citations

EndpointValuePurpose
GET /citations-time-seriesintDaily raw count of citations to the brand domain.
GET /citability-time-series%Daily share-of-citations — brand's slice of all citations made that day.
GET /citationslistURL-level view: every page the domain appears in, with frequency, mentions, prompt count, prompt_ids, and models.

Sentiment Analysis

How AI answers feel about the brand, and what drives it. All accept an optional model filter (generic channel name).

EndpointValuePurpose
GET /sentiment/overview%Positive vs. negative split across the window, plus total mentions.
GET /sentiment/themeslistNamed themes AI answers raise, each tagged positive or negative.
GET /sentiment/time-series%Daily positive-sentiment percentage.
GET /sentiment/theme-sourceslistURLs cited when raising those themes, rolled up by frequency.

AI Traffic (GA4)

Real site traffic referred by AI assistants, read from the domain's connected Google Analytics 4 property and filtered to LLM/AI sources — the did AI visibility turn into visitors? side. All accept an optional llm_source filter and return empty/zeroed views (not an error) when the domain has no GA4 connection.

EndpointValuePurpose
GET /ga4/summaryobjectTotals of AI-referred sessions/users/pageviews, plus the previous period.
GET /ga4/timelinelistDaily AI-referred sessions, each day split by LLM source.
GET /ga4/by-llmobjectThose totals broken out per LLM source, plus the previous period.
GET /ga4/key-eventsobjectConversions attributed to AI-referred traffic — total, per-LLM, top events, plus previous total.
GET /ga4/top-pageslistPages ranked by AI-referred sessions.
GET /ga4/top-locationslistAI-referred sessions by country.
GET /ga4/deviceslistAI-referred sessions by device category.
GET /ga4/top-browserslistAI-referred sessions by browser (top 10).

Required parameters

Most endpoints accept ?domain_id=<uuid> as a required query parameter. If you don't yet have a domain ID, call GET /domains first.

/validate is the only endpoint that takes no query parameters.

Common response shape

All endpoints share the same envelope (data, generated_at, echoed params) and the same rate-limit / cache headers — see Overview and Rate Limits for the full spec.