/api/v1/* on the web app host. It exposes the same aggregates the dashboard renders — visibility KPIs, trends, share of voice, citations, AI traffic, prompt performance and shopping cards — so you can blend Ansvisor data with GA4 / Search Console in an external reporting tool.
These endpoints live on the web app (Next.js), not the Express API server. If
you self-host, the base URL is your web app’s domain.
Authentication
Every request needs an Ansvisor API key in theAuthorization header. Create one under Settings → API Keys in the dashboard — the plaintext key (prefix ans_) is shown exactly once at creation time.
GET /api/v1/whoami echoes the resolved identity — useful as a connection test:
Conventions
- All endpoints are
GETand return JSON. brand_idis required on every metrics endpoint; list your brands viaGET /api/v1/brandsfirst.date_from/date_toacceptYYYY-MM-DD(thedate_today is included through 23:59:59 UTC).- Optional filters shared by most endpoints:
model(comma-separated model slugs),region,topic_id. - Errors return
{ "error": "…" }with400(bad params),401(missing/invalid key),404(brand not in your organization) or500.
Endpoints
List brands
{ "brands": [{ "id", "name", "slug", "industry", "region", "created_at" }] } for the caller’s organization.
Visibility summary
model, region.
Visibility trend
granularity is day (default) or week (ISO Monday buckets). Supports date_from, date_to, model, region, topic_id. Returns:
ai_visibility_score is the dashboard’s headline Visibility number (0-100): 0.6 × mention rate + 0.25 × citation rate + 0.15 × position factor over the day’s answers. It is only populated for day granularity. avg_visibility_score and avg_competitor_score are legacy intensity averages kept for compatibility — prefer ai_visibility_score. The same field also appears on /api/v1/visibility-summary (totals.aiVisibilityScore, with mentionAnswers / citationAnswers / positionFactor components) and /api/v1/competitor-comparison (ai_visibility_score on the brand row and every competitor row).
Competitor comparison & share of voice
share_of_voice block with the overall SoV percentage and a per-platform split. Supports model, region, topic_id.
Citations
top_domains and top_urls. source_filter is one of all (default), owned, competitor, external; limit caps the top lists (default 50, max 200). Supports date_from, date_to, model, region, topic_id.
AI traffic
total_visits, platform_breakdown, top_pages (top 10 paths) and country_breakdown.
Prompt performance
sort_by is visibility (default), mentions, citations or appearances; order is desc (default) or asc; limit 1–100 (default 10). Supports date_from, date_to, model, region, topic_id.
Shopping cards
role filters to own, competitor or other matches; cursor-paginated via limit (default 50, max 200) and the returned next_cursor.
Using it from Looker Studio
Until a native Community Connector ships, any generic JSON/API connector (or a small Apps Script that calls these endpoints withUrlFetchApp) works: point it at /api/v1/visibility-trend with your key in the Authorization header and join on the date column. The endpoints are also what a future official connector will consume.
MCP server
The same API keys power the Ansvisor MCP server — query these metrics from
Claude or any MCP client.