Cookbook
Segment Visibility by model, region, or persona
Split a topic's Visibility Score across models, per-market topics, and prompt-tag personas
GET
/domains/{domainId}/topics/{topicId}/visibility/aggregatedThe segment switcher on the Visibility tile — a score per segment along three axes: models via a query filter, region via the per-market topic, and persona via prompt tags.
How this example works
- For a by-model split you may not need
models=.modelBreakdown[]already returns per-model scores in one unfiltered call — reach formodels=only for a fully filtered payload (chart, competitors, mentions scoped to that model). - Regions are segmented by topic, not by query param. Topics carry their own
market+language— a multi-market brand has a sibling topic per market (List topics), so the region axis is "call the same recipe with that market'stopicId". Topic visibility ignoresmarketLanguageCodePairId; that param filters the domain-level endpoints (sentiment/aggregated,alignment/aggregated, raw results). - There is no persona query param. Personas are modeled as prompt tags: list them with
GET /tags(org-wide bare array, returns{ id, name, ... }), then pass the tagidvalues astagIds— they are UUIDs, OR semantics; non-UUID values are rejected with a400.
curl "https://api.getmint.ai/api/tags" -H "X-API-Key: $MINT_API_KEY"
curl "https://api.getmint.ai/api/domains/$DOMAIN_ID/topics/$TOPIC_ID/visibility/aggregated?models=gpt-5" \
-H "X-API-Key: $MINT_API_KEY"
curl "https://api.getmint.ai/api/domains/$DOMAIN_ID/topics/$US_TOPIC_ID/visibility/aggregated" \
-H "X-API-Key: $MINT_API_KEY"
curl "https://api.getmint.ai/api/domains/$DOMAIN_ID/topics/$TOPIC_ID/visibility/aggregated?tagIds=7c9e6679-7425-40de-963d-1d8f0a3c2e11" \
-H "X-API-Key: $MINT_API_KEY"Response — GET /tags returns the tag library; each segment call returns a scoped report (trimmed; full shape in API reference):
[
{
"id": "7c9e6679-7425-40de-963d-1d8f0a3c2e11",
"name": "Buyer persona",
"organizationId": "fe0b1256-05e6-4214-81db-a5f1f88616b4",
"createdAt": "2026-06-01T09:00:00.000Z",
"updatedAt": "2026-06-01T09:00:00.000Z"
}
]The scoped report below was filtered with models=gpt-5. Note that only the headline fields (averageScore, scoreVariation) honour the filter — availableModels and modelBreakdown always describe the full catalogue with each model's own unfiltered score (verified against the live API):
{
"averageScore": 74,
"scoreVariation": 2.1,
"availableModels": ["gpt-interface", "sonar-pro", "copilot-interface", "grok-4", "google-ai-overview", "gpt-5", "claude-sonnet-4", "gemini-2.5-flash", "gpt-5-mini"],
"modelBreakdown": [
{ "model": "gpt-5", "score": 74, "variation": 2.1 },
{ "model": "claude-sonnet-4", "score": 61, "variation": -1.2 },
{ "model": "gemini-2.5-flash", "score": 48, "variation": 0 }
]
}Query parameters
Prop
Type
Variations
| Change | Effect |
|---|---|
Combine models + tagIds | Each filter narrows the payload further; multiple tagIds match with OR semantics |
Read modelBreakdown[] | By-model split without one filtered call per model |
marketLanguageCodePairId on sentiment/aggregated or alignment/aggregated | Region split for domain-level perception metrics (<marketCode>-<languageCode>, e.g. "US-en") |
Pass topicId on a domain-level endpoint | Scope a domain-wide aggregate down to a single topic |