Skip to Content
APIEndpointsGet prompt detail

Get prompt detail

The full picture for one prompt: headline numbers, the entity leaderboard for that question, and the per-engine split — in one request rather than three.

Use this when the question is “how am I doing on this specific question”, which is the natural follow-up once Prompt metrics has told you which prompt to look at.

GET /v1/brands/{brand_id}/prompts/{prompt_id}

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands
prompt_iduuidrequiredFrom List prompts

Query parameters

ParameterTypeRequiredDescription
start_dateYYYY-MM-DDoptionalInclusive lower bound, YYYY-MM-DD in UTC. Narrows the population before metrics are computed.
end_dateYYYY-MM-DDoptionalInclusive upper bound, YYYY-MM-DD in UTC. Narrows the population before metrics are computed.
enginestring, repeatableoptionalRestrict to these AI search engines, by slug. From List engines. Narrows the population before metrics are computed.
countrystring, repeatableoptionalRestrict to these execution country codes. Narrows the population before metrics are computed.

Request

curl --request GET \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/prompts/7c2f5a91-3b8e-4d06-9a44-1e7b30c9f852' \ --header 'Authorization: Bearer <api-key>'

Response

{ "data": { "period": { "start_date": "2026-08-06", "end_date": "2026-08-13" }, "prompt": { "id": "7c2f5a91-3b8e-4d06-9a44-1e7b30c9f852", "prompt_text": "best AI visibility tracking tools", "topic_id": "4beb0694-7c2e-488b-84c1-613738e7eaf6", "is_active": true }, "kpis": { "responses": 84, "mentioned_responses": 35, "mention_rate_pct": 41.7, "cited_responses": 20, "citation_rate_pct": 23.8, "avg_position": 2.4 }, "leaderboard": [ { "rank": 1, "name": "Peec AI", "is_our_brand": false, "visibility_pct": 46.4, "mention_count": 39, "avg_rank": 2.1, "citation_rate_pct": 27.4 }, { "rank": 2, "name": "Asky", "is_our_brand": true, "visibility_pct": 41.7, "mention_count": 35, "avg_rank": 2.4, "citation_rate_pct": 23.8 } ], "by_engine": [ { "provider": "openai", "model_used": "ChatGPT", "executions": 42, "mention_rate_pct": 47.6, "citation_rate_pct": 28.6 } ] }, "request_id": "req_15fd8a904c3b47e2b8a6" }

Response fields

FieldTypeDescription
data.periodobjectrequired. { start_date, end_date } actually used. Defaults differ between endpoints, so read it before comparing
data.promptobjectrequired. { id, prompt_text, topic_id, is_active }
data.kpisobjectrequired. Headline counts and rates for this prompt
data.kpis.responsesintegerrequired
data.kpis.mention_rate_pctnumber | null
data.kpis.citation_rate_pctnumber | null
data.kpis.avg_positionnumber | null
data.leaderboardobject[]required. You and every competitor on this prompt, ranked
data.by_engineobject[]required. { provider, model_used, executions, mention_rate_pct, citation_rate_pct }
request_idstringrequired. Also returned as the x-request-id header. Quote it when contacting support

Errors

StatusCodeWhen
400invalid_requestA parameter is unknown or malformed. The message names it
401invalid_tokenThe key is missing, malformed, or does not exist
401token_expiredThe key passed its expiry date
401token_revokedThe key was revoked
404not_foundThe brand does not exist, or this key is not allowed to reach it. The two are deliberately indistinguishable
429rate_limitedOver 300 requests per minute. See the Retry-After header

Notes

The leaderboard is scoped to this prompt only. A brand that leads overall can sit third here, which is exactly the kind of thing an aggregate number hides.

Note the default window is 7 days, shorter than the 30-day default on Prompt metrics. Set both dates explicitly if you are comparing the two.

Last updated on