Cookbook
Visibility over time
Plot a topic's Visibility Score as a line chart from the aggregated report's built-in time series
GET
/domains/{domainId}/topics/{topicId}/visibility/aggregatedThe line under the Visibility tile — the same aggregated call that returns the headline number also carries a ready-to-plot chartData[] series, one point per report run.
How this example works
- Each point's score is in
brand, notscore.point.brandis your score for that run;point.competitorsmaps competitor scores for the same date. - Points are per report run, not per calendar day. A gap means no report ran — don't interpolate a missing day as a drop.
- Don't average
chartDatato recomputeaverageScore. The server aggregates across prompts and models differently than a mean of the points — readaverageScoredirectly.
curl "https://api.getmint.ai/api/domains/$DOMAIN_ID/topics/$TOPIC_ID/visibility/aggregated?startDate=2026-06-01&endDate=2026-07-15" \
-H "X-API-Key: $MINT_API_KEY"Response (trimmed; full shape in API reference):
{
"chartData": [
{ "date": "2026-06-01", "brand": 68, "competitors": { "Adidas": 54, "Puma": 39 }, "shareOfVoice": 21 },
{ "date": "2026-06-15", "brand": 72, "competitors": { "Adidas": 58, "Puma": 41 }, "shareOfVoice": 22 },
{ "date": "2026-07-01", "brand": 71, "competitors": { "Adidas": 57, "Puma": 44 }, "shareOfVoice": 22 }
],
"averageScore": 70.3,
"dateRange": { "start": "2026-06-01", "end": "2026-07-15" }
}Query parameters
Prop
Type
Variations
| Change | Effect |
|---|---|
Widen startDate/endDate | Longer series; omit both for the default: last 6 months window |
models=gpt-5 | Series computed on a single model |
GET .../visibility instead | Stored per-report list (limit default 10, startDate/endDate all optional) — one row per saved report rather than the aggregated series |