List Answers
Get the AI answers for one prompt, newest first. Each answer has its text, the brand position, the competitors and the cited URLs.
curl --request GET \
--url 'https://api.aiclicks.io/api/v1/answers?domain_id=8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3&prompt_id=3c2a9e44-6b1d-4f0e-a2c7-5d8e1f9b0a11&model=Gemini&size=20' \
--header 'Authorization: Bearer ak_live_xxx'
import httpx, os
params = {
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"prompt_id": "3c2a9e44-6b1d-4f0e-a2c7-5d8e1f9b0a11",
"model": "Gemini",
"size": 20,
"page": 1,
}
headers = {"Authorization": f"Bearer {os.environ['AICLICKS_API_KEY']}"}
# Read all pages of Gemini answers for one prompt.
while True:
resp = httpx.get("https://api.aiclicks.io/api/v1/answers", params=params, headers=headers)
resp.raise_for_status()
data = resp.json()["data"]
for row in data["items"]:
print(row["date"], row["brand_mentioned"], len(row["cited_urls"]))
if not data["pagination"]["has_next"]:
break
params["page"] += 1
const url = new URL("https://api.aiclicks.io/api/v1/answers");
url.searchParams.set("domain_id", "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3");
url.searchParams.set("prompt_id", "3c2a9e44-6b1d-4f0e-a2c7-5d8e1f9b0a11");
url.searchParams.set("model", "Gemini");
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.AICLICKS_API_KEY}` },
});
const { data } = await resp.json();
for (const row of data.items) console.log(row.date, row.answer.slice(0, 80), row.cited_urls);
{
"data": {
"prompt_id": "3c2a9e44-6b1d-4f0e-a2c7-5d8e1f9b0a11",
"items": [
{
"response_id": "b7e1d0c2-9a44-4e1f-8c3d-2f6a1b0e9d77",
"date": "2026-11-08",
"model": "Gemini",
"brand_mentioned": true,
"brand_position": 2,
"competitors": [
{ "name": "Northwind", "position": 1 },
{ "name": "Tailspin", "position": 4 }
],
"cited_urls": [
"https://www.example-reviews.com/best-inventory-tools",
"https://fabrikam.com/blog/inventory-guide"
],
"answer": "The most popular inventory tools for small teams are Northwind, Fabrikam and Tailspin. Northwind is the best fit when ..."
}
],
"pagination": {
"current_page": 1,
"per_page": 20,
"total_count": 31,
"total_pages": 2,
"has_next": true,
"has_prev": false,
"last_page": false
}
},
"generated_at": "2026-11-09T05:50:51.536Z",
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"days": 30,
"model": "Gemini"
}
{
"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 returns the answers that AIclicks collected for one tracked prompt. You get one row for each answer, newest first. Each row has the date, the AI channel and the answer text. It also shows if the answer names your brand, and at which position. It lists the tracked competitors that the answer names, and each URL that the answer cites.
Use this endpoint to read the real text of an answer. For example, you can get each Gemini answer to a prompt with its text and cited pages.
The results are paginated. The default page size is 20, and the maximum is 100. Answer text is long, so use small pages.
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.
The page number. The first page is 1. The default is 1.
The number of answers on each page, from 1 to 100. The default is 20.
If true, the server does not use the cache and calculates the result again. The default is false.
Response
The answers and the pagination data.
The prompt that you requested.
One row for each collected answer, newest first.
The page data: current_page, per_page, total_count, total_pages, has_next, has_prev and last_page. total_count is the number of answers in the window.
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, window and page. New answers show after the cache expires. To get them 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, page or size is out of range.
You sent too many requests. Read the Retry-After header to know how long to wait.
Empty result
If the prompt has no answers in the window, the server returns 200 with an empty list. This also occurs if no answers come from the model that you requested.
{
"data": {
"prompt_id": "3c2a9e44-6b1d-4f0e-a2c7-5d8e1f9b0a11",
"items": [],
"pagination": { "current_page": 1, "per_page": 20, "total_count": 0, "total_pages": 0, "has_next": false, "has_prev": false, "last_page": true }
},
"generated_at": "2026-11-09T05:50:51.536Z",
"domain_id": "8f1d3c0a-2f9b-4c11-9b80-7a82e1f0c3f3",
"days": 30,
"model": "Gemini"
}