Directories
Methods of the “MAX: directories” group. On the right — a request and response example for each.
Category directory
GET
/v1/max/categories/0 unitsall plans, including “API.Max Test”
All MAX channel categories in directory order, as on the site: number, code, name, channel count and image. Use the category code in the catalog filter ?category=. The method is free (0 units).
Response fields
| Field | Type | Description |
|---|---|---|
results | list | All categories in directory order |
results[].id | number | Category number in the datool.ru directory |
results[].slug | string | Category code — used to filter the catalog (?category=) |
results[].name | string | Category name (in Russian, as on the site) |
results[].channels | number | Channels in the category (nightly recount) |
results[].image | string or null | Category image up to 500 pixels (WebP) or null |
Errors
| Code | code | When |
|---|---|---|
| 401 | not_authenticated / authentication_failed | No key, the key is wrong or revoked, the member is suspended or the key’s organization is archived. |
| 429 | rate_limited / throttled | Too often — more requests per second than your plan allows; how long to wait is in the Retry-After header. |
| 503 | timeout | The database query took longer than 5 seconds — retry later or narrow the selection. |
Territory directory
GET
/v1/max/territories/0 unitsall plans, including “API.Max Test”
Territory tree: country → federal district → region → city (cities only for Russia). Without filters — the whole tree, parents before children; parent — direct children of one node, kind — nodes of one level. Use the territory code in the catalog filter ?territory= — it also matches channels in child nodes. The method is free (0 units).
Parameters
| Name | Where | Description |
|---|---|---|
kindstring | query | Only nodes of this level Values: city, country, district, region |
parentstring | query | Node code — return only its direct children |
Response fields
| Field | Type | Description |
|---|---|---|
results | list | Tree nodes: parent before its children |
results[].id | number | Node number in the territory directory |
results[].slug | string | Territory code — used to filter the catalog (?territory=) |
results[].name | string | Territory name (in Russian) |
results[].kind | string | Level: country, district (federal district), region or city |
results[].parent | string or null | Parent node code, or null for a country |
results[].path | string | Node codes from the country down to this node, separated by “/” |
results[].channels | number | Channels in the node and its descendants (nightly recount) |
Errors
| Code | code | When |
|---|---|---|
| 400 | field errors | An invalid parameter or body field: the error comes under the field name, for example {"channels": ["Comma-separated channel numbers."]}. |
| 401 | not_authenticated / authentication_failed | No key, the key is wrong or revoked, the member is suspended or the key’s organization is archived. |
| 429 | rate_limited / throttled | Too often — more requests per second than your plan allows; how long to wait is in the Retry-After header. |
| 503 | timeout | The database query took longer than 5 seconds — retry later or narrow the selection. |
The error format, limit headers and what to do about each error are in the article “Errors”.