Visibility by topic or market
The same breakdown as by engine, cut instead by topic or by market. This is the “where should we focus” call.
One request replaces a filtered analytics call per topic, which is what makes it practical to look at every segment rather than the three you already suspected.
GET /v1/brands/{brand_id}/visibility/segmentsAuthorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | optional | Rows per page, 1 to 100. Defaults to 20. |
cursor | string | optional | Opaque cursor from the previous response. Treat it as a token, never construct one. |
dimension | string | required | What to segment by. One of: topic, market. No default. The two dimensions answer different questions. |
start_date | YYYY-MM-DD | optional | Inclusive lower bound, YYYY-MM-DD in UTC. Narrows the population before metrics are computed. |
end_date | YYYY-MM-DD | optional | Inclusive upper bound, YYYY-MM-DD in UTC. Narrows the population before metrics are computed. |
compare_to_previous | boolean | optional | Also return the prior equal-length period and per-row deltas. |
Request
cURL
curl --request GET \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/visibility/segments?dimension=topic' \
--header 'Authorization: Bearer <api-key>'Response
200
{
"data": [
{
"segment": "AI Visibility Tracking",
"topic_id": "4beb0694-7c2e-488b-84c1-613738e7eaf6",
"executions": 410,
"visibility_pct": 41.2,
"market_share_pct": 26.9,
"sentiment": 73,
"leader": "Asky",
"top_competitors": [
{
"name": "Peec AI",
"rank": 2,
"visibility_pct": 33.1,
"market_share_pct": 21.4
}
]
}
],
"pagination": {
"limit": 20,
"has_more": true,
"next_cursor": "eyJ2IjoxLCJvIjoyMCwibCI6MjB9"
},
"meta": {
"period": {
"start_date": "2026-08-06",
"end_date": "2026-08-13"
},
"dimension": "topic",
"brand_id": "242546de-4cee-4a7d-952e-f6aa60c63ef8",
"omitted_segments": 3
},
"request_id": "req_e6c018b47d2a4931b70f"
}Response fields
| Field | Type | Description |
|---|---|---|
data.brand_id | uuid | required |
data.dimension | string | required. Echoes the request |
data.period | object | required. { start_date, end_date } actually used. Read it before comparing endpoints — their defaults differ |
data.segments | object[] | required, ordered by executions |
data.segments[].segment | string | required. Topic name or country code |
data.segments[].topic_id | uuid | Only when dimension=topic. Chains into topic_id filters elsewhere |
data.segments[].executions | integer | required |
data.segments[].visibility_pct | number | null | Your visibility in this segment |
data.segments[].market_share_pct | number | null | |
data.segments[].sentiment | number | null | |
data.segments[].leader | string | null | Rank-1 entity in this segment |
data.segments[].top_competitors | object[] | required |
data.omitted_segments | integer | Segments cut by segment_limit or beyond the fan-out bound |
data.unavailable_segments | string[] | Could not be read on this attempt |
data.unavailable_note | string | Plain-language warning shipped alongside unavailable_segments |
request_id | string | required. Also returned as the x-request-id header. Quote it when contacting support |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | A parameter is unknown or malformed. The message names it |
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 401 | token_expired | The key passed its expiry date |
| 401 | token_revoked | The key was revoked |
| 404 | not_found | The brand does not exist, or this key is not allowed to reach it. The two are deliberately indistinguishable |
| 429 | rate_limited | Over 300 requests per minute. See the Retry-After header |
Notes
unavailable_segments is not zero. The response ships an explicit unavailable_note saying so,
because reading a transient read failure as “we have no presence there” is the exact mistake this
data invites.
omitted_segments > 0 means you are seeing a slice. Raise segment_limit or accept that the
tail is missing; do not treat the returned set as exhaustive.
Last updated on