Cookbook
Headline score and the daily series, together
Rebuild the whole Visibility tile — number, trend badge, sparkline, and per-model rows — from one call
GET
/domains/{domainId}/topics/{topicId}/visibility/aggregatedEverything on the Visibility tile from one request — the averageScore number, its scoreVariation badge, the chartData sparkline, and the per-model rows — never fetched separately.
How this example works
- One call, not two.
averageScore,scoreVariation, andchartDataship in the same payload — don't hit the endpoint twice. modelBreakdown[]is the per-model headline. Each entry is{ model, score, variation }— the tile numbers split by model, no extra request.availableModelsis what you can filter by. Read it for the valid model ids before passingmodels=.
curl "https://api.getmint.ai/api/domains/$DOMAIN_ID/topics/$TOPIC_ID/visibility/aggregated?startDate=2026-06-21&endDate=2026-07-21" \
-H "X-API-Key: $MINT_API_KEY"Response (trimmed; full shape in API reference):
{
"averageScore": 72,
"scoreVariation": 3.2,
"availableModels": ["gpt-interface", "gpt-5", "claude-sonnet-4", "gemini-2.5-flash"],
"chartData": [
{ "date": "2026-06-21", "brand": 68, "competitors": { "Adidas": 54 }, "shareOfVoice": 21 },
{ "date": "2026-07-05", "brand": 71, "competitors": { "Adidas": 57 }, "shareOfVoice": 22 },
{ "date": "2026-07-19", "brand": 72, "competitors": { "Adidas": 58 }, "shareOfVoice": 23 }
],
"modelBreakdown": [
{ "model": "gpt-5", "score": 74, "variation": 2.1 },
{ "model": "claude-sonnet-4", "score": 69, "variation": 4.4 }
],
"topMentions": [
{ "mention": "Nike", "count": 156, "percentage": 34 },
{ "mention": "Adidas", "count": 121, "percentage": 26 }
]
}Query parameters
Prop
Type
Variations
| Response field | Dashboard element |
|---|---|
averageScore + scoreVariation | The headline tile number and its +/- badge |
chartData[].brand | The sparkline drawn under the number |
modelBreakdown[] | The per-model rows below the tile |
topMentions[] | The leaderboard preview beside the tile |