Skip to Content
APIEndpointsGet visibility

Get visibility

Visibility is the penalized rate at which the brand is mentioned across in-scope AI answers, plus the supporting counts: how many executions ran, weighted sentiment, and where in the answer the brand tends to appear.

Set compare_to_previous=true and you get the preceding window of equal length with deltas in the same response. Prefer that over issuing two requests with hand-built ranges — it is one round trip and the period arithmetic cannot drift.

GET /v1/brands/{brand_id}/visibility

Authorization

HeaderTypeRequired
AuthorizationBearer asky_sk_…required

Path parameters

ParameterTypeRequiredDescription
brand_iduuidrequiredFrom List brands

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.
compare_to_previousbooleanoptionalAlso return the prior equal-length period and per-row deltas.
topic_iduuid, repeatableoptionalRestrict to these topics. From List topics. Includes the topic and its subtopics. A root topic returns everything beneath it; a subtopic returns only itself. Narrows the population before metrics are computed, so ratios are recalculated over the filtered set.
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.
tag_iduuid, repeatableoptionalRestrict to prompts carrying these tags. From List tags. Narrows the population before metrics are computed.

Request

curl --request GET \ --url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/visibility?compare_to_previous=true' \ --header 'Authorization: Bearer <api-key>'

Response

{ "data": { "brand_id": "242546de-4cee-4a7d-952e-f6aa60c63ef8", "period": { "start_date": "2026-08-06", "end_date": "2026-08-13" }, "visibility_pct": 34.2, "total_executions": 1840, "sentiment_score": 71.4, "avg_rank": 2.8, "previous": { "period": { "start_date": "2026-07-30", "end_date": "2026-08-06" }, "has_data": true, "visibility_pct": 29.7, "total_executions": 1795, "sentiment_score": 69.1, "avg_rank": 3.1 }, "deltas": { "visibility_pct": 4.5, "total_executions": 45, "sentiment_score": 2.3, "avg_rank": -0.3 } }, "request_id": "req_0f9a26cb45e1478db3d2" }

Response fields

FieldTypeDescription
data.brand_iduuidrequired
data.periodobjectrequired. { start_date, end_date } actually used. Read it before comparing endpoints — their defaults differ
data.visibility_pctnumber | nullPenalized mention rate. null when nothing ran in the window
data.total_executionsintegerrequired. Answers collected in scope
data.sentiment_scorenumber | null0–100, weighted
data.avg_ranknumber | nullAverage first-mention position. Lower is better
data.previousobjectOnly with compare_to_previous. Same shape, plus has_data
data.deltasobjectOnly with compare_to_previous. Change per metric, current minus previous
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

A blended visibility number overstates performance. Branded prompts — ones that already name you — are far easier to appear in than category prompts that do not. Split the two using mentions_own_brand on List prompts and report them separately, or the figure flatters itself.

previous.has_data distinguishes “the prior period was quiet” from “the prior period was zero”. A delta computed against an empty window is not a trend.

Last updated on