Prompts
List a prompt's answers
List the AI answers a prompt got over a window, newest first, with the brands they named and the sources they cited.
GET https://api.ranqo.ai/v1/brands/{brand_id}/prompts/{prompt_id}/answersThe answers a window counts for this prompt, newest first: those from its completed runs, or the latest run before it when it held none. Failed and filled-in answers are left out, as in the reports, so the answers of every prompt add up to the answer_count of /visibility over the same window and engines.
Path parameters
| Name | Type | Description |
|---|---|---|
brand_id | string | The brand id, from GET /v1/brands. |
prompt_id | string | The prompt id, from GET /v1/brands/{brand_id}/prompts. |
Query parameters
Every parameter is optional. A parameter the endpoint does not take is refused with unknown_parameter.
| Name | Type | Default | Description |
|---|---|---|---|
period | string | 7d, 30d and 90d run from midnight in tz that many days back to now; 365d runs from midnight 365 days back to the end of today. Default 30d. Not with start_date. One of 7d, 30d, 90d, 365d. | |
start_date | string | First day of a custom window, in tz. Send with end_date. | |
end_date | string | Last day of a custom window, in tz, included. The window may span at most 366 days, both dates counted. | |
tz | string | IANA time zone for day boundaries, such as Asia/Kolkata. Default UTC. | |
platforms | string | Engines to list: claude, chatgpt, perplexity, gemini, grok, google_aio. | |
limit | integer | 20 | Items per page, 1 to 50. |
cursor | string | The next_cursor of the previous page. |
Response
The response body, as JSON.
| Field | Type | Description |
|---|---|---|
window | object | The answers a report counts: those from completed runs inside the window. |
window.start | string | RFC 3339 timestamp in UTC. |
window.end | string | RFC 3339 timestamp in UTC. |
window.previous_start | string | The comparison window runs from here to start: the whole days before start for 7d, 30d and 90d, the same length as the window otherwise. |
window.time_zone | string | |
window.period | string or null | The preset, or null for a custom window. One of 7d, 30d, 90d, 365d. |
window.carried_from | string or null | RFC 3339 timestamp in UTC. Set when the window held no completed run: the figures are the latest run before it, which completed at this time, and nothing is compared. |
data | array of objects | |
data[].id | string | |
data[].prompt_id | string | |
data[].run_id | string | |
data[].platform | string | |
data[].created_at | string | RFC 3339 timestamp in UTC. |
data[].text | string | The answer as the engine returned it. |
data[].text_markdown | string or null | The answer reformatted as markdown, when it was. |
data[].brand_named | boolean | |
data[].position | integer or null | Where the brand was named, 1 = first; null when not named. |
data[].sentiment | string or null | How the answer spoke of the brand; null when not named. One of positive, neutral, negative, mixed. |
data[].competitors | array of objects | |
data[].competitors[].name | string | |
data[].competitors[].position | integer or null | |
data[].competitors[].sentiment | string or null | One of positive, neutral, negative, mixed. |
data[].competitors[].domain | string or null | Null when no domain could be confirmed; never guessed. |
data[].sources | array of objects | |
data[].sources[].url | string | |
data[].sources[].domain | string | |
data[].sources[].title | string or null | |
has_more | boolean | Whether another page follows. |
next_cursor | string or null | Pass as cursor for the next page; null on the last page. |
Response headers
| Header | Description |
|---|---|
X-Request-Id | The request id; quote it to support. |
RateLimit | Requests left in this window and seconds until it resets. |
RateLimit-Policy | The key's limit per window. |
Example request
curl "https://api.ranqo.ai/v1/brands/BRAND_ID/prompts/PROMPT_ID/answers" \
-H "Authorization: Bearer $RANQO_API_KEY"Errors
Errors are problem details (application/problem+json) with a stable code. See Errors for each one.