Overview
The API gives you read-only access to your project’s weekly prompt metrics, content item evaluations, and reporting-dashboard aggregates (the same LLM metrics and GA-based series the Reporting page uses). Use it to:- Pull brand mention and citation rates into your own dashboards
- Track prompt and provider performance over time
- Read prompt metadata (collections, sentiment) alongside visibility metrics
- Export content quality scores (extractability, humanness, and related evaluation fields)
- Automate exports that match Impact and Competitors reporting (see Reporting dashboard below)
Access and authentication
Generate your project token in Settings -> API.- One active token per project
- Token is scoped to that project only
- Regenerating immediately invalidates the previous token
Authorization header:
Data freshness
- Prompt metrics are updated weekly
- Weekly windows are Sunday-based
- If you do not pass
week_start, endpoints that need a week return your latest available week
Base URL
/report, /ga-report) are GET only as well.
Endpoint index
Paths are relative tohttps://<your-project-ref>.supabase.co/functions/v1.
| Doc title | Path | Methods | Auth |
|---|---|---|---|
| Report — LLM visibility & competitors | /report | GET | Project token or user JWT |
| GA report — Analytics time series | /ga-report | GET | Project token or user JWT |
| Summary | /summary | GET | Project token |
| Prompts list | /prompts | GET | Project token |
| Single prompt | /prompt | GET | Project token |
| Prompt timeseries | /prompt-timeseries | GET | Project token |
| Prompt providers | /prompt-providers | GET | Project token |
| Content items | /content-items | GET | Project token |
| Single content item | /content-item | GET | Project token |
Reporting dashboard
Automation endpoints for the in-app Reporting page. Periods use 7 / 30 / 365 calendar days for week / month / year.Authentication
- Project API token (from Settings → API):
Authorization: Bearer tp_...- Do not pass
project_id; the token is already scoped to one project.
- Do not pass
- Logged-in user (Supabase session JWT):
Authorization: Bearer <access_token>- You must pass
project_idin the query string. The user must have access to that project.
- You must pass
Report — LLM visibility and competitor metrics (GET /report)
Full LLM-side reporting: weighted mention rate, citation rate, sentiment, competitor tables and weekly series, citation bucket breakdown, optional experiments. The web app uses this same endpoint (GET with start_date / end_date). Responses include a top-level meta object (resolved dates and filters).
Query parameters
| Parameter | Description |
|---|---|
project_id | Required for user JWT; omit with API token |
start_date, end_date | YYYY-MM-DD inclusive window; if both set, they define the range instead of period |
period | week | month | year (default month; ignored when start_date and end_date are set) |
collections | Comma-separated tag names (prompt collections), resolved to tag IDs server-side |
tag_ids | Comma-separated tag UUIDs (optional; merged with resolved collections) |
intent / intents | Comma-separated intent values |
llm_provider / provider_ids | Comma-separated AI provider UUIDs |
location / locations | Comma-separated location strings |
include_experiments | true / false (default true) |
skip_competitors | true / false (default false) |
page, page_size | Pagination for the weekly series slice (defaults 0, 50, max 500) |
company_id | Optional; per-company mention/sentiment series |
target_type, target_id | Optional experiment filter |
competitorShare, competitorShareSeries, etc. are populated when data exists (same as the app). For errors, you may receive { "error": "..." } or { "success": false, "error": "..." } depending on the failure path.
GA report — Traffic and platform-filtered series (GET /ga-report)
Google Analytics for reporting: calls the existing fetch-google-analytics pipeline, then returns the full analytics payload plus filtered_daily — daily rows with traffic_raw and ai_sessions using the same platform rules as the Reporting UI (google-serps, google-ai-overview, chatgpt, etc.). Requires GA4 connected for the project.
Query parameters
| Parameter | Description |
|---|---|
project_id | Required for user JWT; omit with API token |
start_date, end_date | YYYY-MM-DD; both required together if you override period |
period | week | month | year (default month) |
page_path | Optional; restricts GA to one landing path (same as page filter in app) |
platforms | Comma-separated UI platform ids (e.g. chatgpt,google-serps). Omit or empty = all traffic |
fetch-google-analytics (e.g. 401 with authError: true).
Prompt metrics
Summary — Top-line metrics for one week (GET /summary)
Top-line metrics for one week.
Query params
week_start(optional,YYYY-MM-DD, normalized to Sunday)provider(optional, AI provider id)
request_idweek_starttotals:prompt_count,search_count,mention_rate,first_mention_rate,citation_ratecitations:owned,earned,competitorproviders[]: each item hasid,name,mention_rate,first_mention_rate,citation_rate
Prompts — Paginated prompt metrics (GET /prompts)
Paginated prompt-level metrics for one week. Each row includes collections and average_sentiment from the prompt record.
Query params
week_start(optional)provider(optional)query(optional, case-insensitive substring match on prompttext)limit(optional, default50, max100)cursor(optional, opaque pagination cursor frompage.next_cursor)
request_idweek_startprompts[]: each object has:id,text,intent,search_volume_score,average_sentiment(nullable)collections[]:{ id, name }(always present; empty array if none)mention_rate,first_mention_rate,citation_rate,rank
page:has_more,next_cursor(null when no next page)
Prompt — Single prompt detail (GET /prompt)
Detail for a single prompt for one week.
Query params
id(required, prompt uuid)week_start(optional)
request_idweek_startprompt:id,text,intent,search_volume_score,average_sentiment,collections[]mention_rate,first_mention_rate,citation_rate,search_count(aggregate for that prompt in the week)providers[]:id,name,mention_rate,first_mention_rate,citation_ratetop_citations[]:url,domain,citation_type,count
404if the prompt does not exist or is not in this project
Prompt timeseries — Trend across weeks (GET /prompt-timeseries)
Trend data across weeks.
Query params
from_week_start(optional)to_week_start(optional)provider(optional)id(optional, filter to one prompt)
- At most
52weeks per request
request_idseries[]: each point hasweek_start,mention_rate,first_mention_rate,citation_rate,prompt_count,search_count
Prompt providers — One week by AI provider (GET /prompt-providers)
One-week breakdown by AI provider.
Query params
week_start(optional)
request_idweek_startproviders[]:id,name,prompt_count,search_count,mention_rate,first_mention_rate,citation_rate,owned_citations,earned_citations,competitor_citations
Content
Content items — List with latest evaluation (GET /content-items)
All content items in the project, paginated, with the latest evaluation per item (by created_at).
Query params
limit(optional, default50, max100)cursor(optional)
request_idcontent_items[]:id,title,url,created_at,updated_at,evaluationevaluationisnullif there is no row inexecuting_contentitemevaluation, otherwise an object with:score,content_quality,audience_alignment,seo_optimization,engagement_potential,eeat,extractability,humanness_score,prompt_focus,created_at,updated_atllm_justificationsonly if present on the stored evaluation
Content item — Single item (GET /content-item)
Single content item with the same evaluation rules as the list.
Query params
id(required, content item uuid)
request_idcontent_item: same shape as one element ofcontent_items[]
404if the item does not exist or is not in this project
Rate and timeout limits
- Prompt list and content list are capped at
100rows per request - Timeseries is capped at
52weeks - Requests may return
429if rate or time budgets are exceeded
Errors
Common status codes:400invalid input401missing or invalid token404not found (prompt or content item)405method not allowed429rate or timeout guardrail500unexpected server error