Sign in

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

FieldTypeDescription
resultslistAll categories in directory order
results[].idnumberCategory number in the datool.ru directory
results[].slugstringCategory code — used to filter the catalog (?category=)
results[].namestringCategory name (in Russian, as on the site)
results[].channelsnumberChannels in the category (nightly recount)
results[].imagestring or nullCategory image up to 500 pixels (WebP) or null

Errors

CodecodeWhen
401not_authenticated / authentication_failedNo key, the key is wrong or revoked, the member is suspended or the key’s organization is archived.
429rate_limited / throttledToo often — more requests per second than your plan allows; how long to wait is in the Retry-After header.
503timeoutThe 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

NameWhereDescription
kind
string
queryOnly nodes of this level
Values: city, country, district, region
parent
string
queryNode code — return only its direct children

Response fields

FieldTypeDescription
resultslistTree nodes: parent before its children
results[].idnumberNode number in the territory directory
results[].slugstringTerritory code — used to filter the catalog (?territory=)
results[].namestringTerritory name (in Russian)
results[].kindstringLevel: country, district (federal district), region or city
results[].parentstring or nullParent node code, or null for a country
results[].pathstringNode codes from the country down to this node, separated by “/”
results[].channelsnumberChannels in the node and its descendants (nightly recount)

Errors

CodecodeWhen
400field errorsAn invalid parameter or body field: the error comes under the field name, for example {"channels": ["Comma-separated channel numbers."]}.
401not_authenticated / authentication_failedNo key, the key is wrong or revoked, the member is suspended or the key’s organization is archived.
429rate_limited / throttledToo often — more requests per second than your plan allows; how long to wait is in the Retry-After header.
503timeoutThe 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”.

Was this page helpful?

You are leaving datool.ru

The link leads to an external website. datool.ru is not responsible for its content — check the address before entering passwords or payment details.

Redirecting in 10 s

Continue