Cookbook
Compare your asset to competitors over time
Build a multi-line chart of your Visibility Score against each competitor from one aggregated call
GET
/domains/{domainId}/topics/{topicId}/visibility/aggregatedThe competitor comparison chart on the topic page — one aggregated call returns both a per-competitor time series in chartData[].competitors and a current-standings snapshot in competitors[].
How this example works
- Competitor keys come from the topic's competitor list. The names in
point.competitorsandcompetitors[]are those set on the topic — see List topics. useAllModelsForCompetitorschanges the averaging default: false.trueaverages each competitor across all models (missing = 0) for a like-for-like ranking;falseaverages only models where they appeared, avoiding dilution.- An absent competitor on a date means no data, not zero. If a key is missing from a point's
competitorsmap, skip it — don't plot a 0 (a false dip).
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.5 },
{ "date": "2026-07-01", "brand": 72, "competitors": { "Adidas": 57 }, "shareOfVoice": 23.0 }
],
"competitors": [
{ "name": "Adidas", "averageScore": 56, "variation": -2.1 },
{ "name": "Puma", "averageScore": 40, "variation": 1.4 }
]
}Query parameters
Prop
Type
Variations
| Change | Effect |
|---|---|
useAllModelsForCompetitors=true | Competitor averages count models where they were absent as 0 (default averages only models with data) |
GET .../competition/aggregated | SWOT view: strengths, weaknesses, and winRateAnalysis broken down by competitor and model |
GET .../shopping/analytics/brand-visibility | Per-brand shopping series (granularity day/week/month) for shopping prompts |