Prompt Brands
Get each tracked brand for one prompt: your brand first, then each tracked competitor, with mentions, visibility, share of voice and position.
curl --request GET \
--url 'https://api.aiclicks.io/api/v1/prompt-brands?domain_id=8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3&prompt_id=3c2a9e44-6b1d-4f0e-a2c7-5d8e1f9b0a11&days=30' \
--header 'Authorization: Bearer ak_live_xxx'
import httpx, os
resp = httpx.get(
"https://api.aiclicks.io/api/v1/prompt-brands",
params={
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"prompt_id": "3c2a9e44-6b1d-4f0e-a2c7-5d8e1f9b0a11",
"days": 30,
},
headers={"Authorization": f"Bearer {os.environ['AICLICKS_API_KEY']}"},
)
resp.raise_for_status()
for brand in resp.json()["data"]["items"]:
print(brand["name"], brand["avg_visibility"], brand["avg_position"])
const url = new URL("https://api.aiclicks.io/api/v1/prompt-brands");
url.searchParams.set("domain_id", "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3");
url.searchParams.set("prompt_id", "3c2a9e44-6b1d-4f0e-a2c7-5d8e1f9b0a11");
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.AICLICKS_API_KEY}` },
});
const { data } = await resp.json();
console.table(data.items.map((b) => ({ name: b.name, visibility: b.avg_visibility })));
{
"data": {
"prompt_id": "3c2a9e44-6b1d-4f0e-a2c7-5d8e1f9b0a11",
"items": [
{
"id": "user-brand-8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"name": "Fabrikam",
"website": null,
"is_brand": true,
"avg_mentions": 2.42,
"avg_position": 1.88,
"avg_visibility": 54.73,
"avg_sov": 40.61,
"avg_sentiment": 0.0,
"total_queries": 31,
"answers_count": 139,
"citations": 231,
"citation_count": 1793,
"citability": 12.88,
"total_mentions": 75
},
{
"id": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"name": "Northwind",
"website": "northwind.com",
"is_brand": false,
"avg_mentions": 1.97,
"avg_position": 2.41,
"avg_visibility": 44.57,
"avg_sov": 32.12,
"avg_sentiment": 0.0,
"total_queries": 31,
"answers_count": 139,
"citations": 45,
"citation_count": 1793,
"citability": 2.51,
"total_mentions": 61
}
]
},
"generated_at": "2026-11-09T05:50:51.203Z",
"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": "Prompt not found for this domain. List prompts with GET /api/v1/prompts."
}
{
"detail": "Too many requests. Please try again later."
}
This endpoint shows which brands win one prompt. It returns your brand first, then each tracked competitor. Each entry has the totals for the window: mentions, visibility, share of voice, average position, sentiment and citations.
Use this endpoint to answer the question "Who wins this prompt?". To see the daily trend for all prompts, use GET /api/v1/competitor-time-series.
The domain_id and prompt_id parameters are required. To get domain IDs, use GET /api/v1/domains. To get prompt IDs, use GET /api/v1/prompts.
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.
The UUID of one tracked prompt on the domain. To get it, use GET /api/v1/prompts. If the prompt is on a different domain, the server returns 404.
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 brands for the prompt.
The prompt that you requested.
Your brand is first (is_brand: true). The tracked competitors follow, sorted by avg_visibility, highest first.
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, prompt, model and window. New data 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 or not yours, or the prompt_id is not valid or is not on the domain.
domain_id or prompt_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.