Tag Metrics
Get one scorecard for each tag: prompts, answers, visibility, mentions, position, citations, sentiment and search volume.
curl --request GET \
--url 'https://api.aiclicks.io/api/v1/tag-metrics?domain_id=8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3&days=30' \
--header 'Authorization: Bearer ak_live_xxx'
import httpx, os
resp = httpx.get(
"https://api.aiclicks.io/api/v1/tag-metrics",
params={"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3", "days": 30},
headers={"Authorization": f"Bearer {os.environ['AICLICKS_API_KEY']}"},
)
resp.raise_for_status()
by_name = {tag["name"]: tag for tag in resp.json()["data"]["items"]}
print("Branded:", by_name["Branded"]["avg_visibility"])
print("Non-Branded:", by_name["Non-Branded"]["avg_visibility"])
const url = new URL("https://api.aiclicks.io/api/v1/tag-metrics");
url.searchParams.set("domain_id", "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3");
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.AICLICKS_API_KEY}` },
});
const { data } = await resp.json();
console.table(data.items);
{
"data": {
"items": [
{
"id": "a1b2c3d4-1111-4aaa-8bbb-000000000001",
"name": "Branded",
"query_count": 18,
"answers_count": 2480,
"avg_visibility": 61.0,
"total_mentions": 1702,
"avg_position": 1.4,
"citation_count": 30112,
"brand_citation_count": 2208,
"avg_sentiment": 0,
"avg_volume": 8400
},
{
"id": "a1b2c3d4-1111-4aaa-8bbb-000000000002",
"name": "Non-Branded",
"query_count": 41,
"answers_count": 5670,
"avg_visibility": 9.0,
"total_mentions": 611,
"avg_position": 4.8,
"citation_count": 81240,
"brand_citation_count": 512,
"avg_sentiment": 0,
"avg_volume": 23150
}
]
},
"generated_at": "2026-11-09T05:50:37.859Z",
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"days": 30,
"model": "all"
}
{
"detail": "Invalid or revoked API key"
}
{
"detail": "API key not authorized for this domain."
}
{
"detail": "Domain not found"
}
{
"detail": "Too many requests. Please try again later."
}
This endpoint returns one scorecard for each tag of a domain. A scorecard adds up the metrics of all the prompts with the tag for the window. The fields are the same as in GET /api/v1/topic-metrics.
Use this endpoint to compare groups of prompts. For example, compare Branded prompts with Non-Branded prompts. To see each prompt, use GET /api/v1/prompt-metrics.
The list includes each tag of the domain. A tag with no prompts has a scorecard with zeros.
The domain_id parameter is required. To get domain IDs, use GET /api/v1/domains.
Authorizations
Your API key in the format Bearer ak_live_<your-key>. To make a key, go to Settings → Developers in the dashboard.
An optional UUID to find the request in logs. If you do not send one, the server makes one and returns it.
Query parameters
The UUID of the domain. To get it, use GET /api/v1/domains.
One AI channel by its generic name, or all. Examples: ChatGPT, Perplexity, Gemini, AI Overviews, AI Mode, Claude, Microsoft Copilot, Grok. The default is all.
The number of days to look back from today, from 1 to 365. The server uses the exact value. The default is 30.
The first day of a fixed window, in the format YYYY-MM-DD. Send it with end_date. Together, they replace days. The maximum range is 365 days.
The last day of a fixed window, in the format YYYY-MM-DD. The window includes this day. Send it with start_date.
If true, the server does not use the cache and calculates the result again. The default is false.
Response
The tag scorecards.
One scorecard for each tag of the domain.
The domain that you requested.
The window that you requested.
The model filter that you requested. If you did not send one, the value is all.
The ISO-8601 time when the server made or cached this response.
Response headers
| Header | Description |
|---|---|
X-Cache | HIT or MISS. If you send fresh=true, the value is REFRESH. |
X-Request-Id | The unique ID of the request. If you sent one, the server returns the same value. |
X-RateLimit-Limit | The maximum number of requests each minute for this key. |
X-RateLimit-Remaining | The number of requests that remain in the current minute. |
X-RateLimit-Reset | The Unix time in seconds when the window starts again. |
Caching
The server keeps each response in the cache for 1 hour. The cache key includes the domain, model and the dates of the window. A new tag, or a tag change on a prompt, shows after the cache expires. To get it at once, send fresh=true.
Errors
A date is not in the format YYYY-MM-DD, start_date is after end_date, or the range is longer than 365 days.
The API key is missing, not correct, or revoked.
API access is off for the team, or the domain is in a team that your key cannot access.
The domain_id is not valid, does not exist, or is not in your team.
domain_id is missing, or days is out of range.
You sent too many requests. Read the Retry-After header to know how long to wait.
Empty result
If the domain has no tags, the server returns 200 with an empty list:
{
"data": { "items": [] },
"generated_at": "2026-11-09T05:50:37.859Z",
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"days": 30,
"model": "all"
}