List topics
The full topic tree in one response, flat. A subtopic is a topic with a parent_topic_id — there
is no separate subtopic resource, and no separate endpoint for one.
These ids are the values for every topic_id filter on the surface, so this is the lookup call
before filtering anything by topic.
GET /v1/brands/{brand_id}/topicsAuthorization
| 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. |
Request
cURL
curl --request GET \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/topics' \
--header 'Authorization: Bearer <api-key>'Response
200
{
"data": [
{
"id": "4beb0694-7c2e-488b-84c1-613738e7eaf6",
"name": "AI Visibility Tracking",
"description": null,
"parent_topic_id": null,
"is_subtopic": false,
"is_selected": true
},
{
"id": "3249738e-6af1-4d5c-9fb3-65de7ac15199",
"name": "Share of Voice in AI search",
"description": null,
"parent_topic_id": "4beb0694-7c2e-488b-84c1-613738e7eaf6",
"is_subtopic": true,
"is_selected": true
}
],
"pagination": {
"limit": 20,
"has_more": true,
"next_cursor": "eyJ2IjoxLCJvIjoyMCwibCI6MjB9"
},
"request_id": "req_6d2b81f04ca749e3b0ff"
}Response fields
| Field | Type | Description |
|---|---|---|
data.topics | object[] | required. Roots and subtopics together, flat |
data.topics[].id | uuid | required |
data.topics[].name | string | required |
data.topics[].description | string | null | Rarely populated |
data.topics[].parent_topic_id | uuid | null | null for a root topic |
data.topics[].is_subtopic | boolean | required. Convenience for parent_topic_id !== null |
data.topics[].is_selected | boolean | required. Whether the topic is included in the brand’s active tracking set |
data.count | integer | required |
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
The tree is two levels deep in practice: root topics and their subtopics. The schema permits
deeper nesting, so treat parent_topic_id as the source of truth rather than assuming two levels.
Not paginated. A brand carries at most a few dozen topics.
A prompt can hang off either a root topic or a subtopic, so when filtering by a root you usually want its subtopics included too. See Filtering.
Last updated on