To the website 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[].name_enstringCategory name in English (as on the English version of the site); an empty string means there is no translation
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.
503unavailableThe database is temporarily unavailable (failure or recovery) — retry in a few minutes; how long to wait is in the Retry-After header.

Territory directory

GET/v1/max/territories/
0 unitsall plans, including “API.Max Test”

Territory tree: country → federal district → region (districts and regions only for Russia) and a separate territory “Worldwide” (world) for channels about the whole world. There are no cities: a channel about a city belongs to its region. Without filters — the whole tree, parents before children, “Worldwide” last; 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: country, district, region, world
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[].name_enstringTerritory name in English (as on the English version of the site)
results[].kindstringLevel: country, district (federal district), region or world (“Worldwide”)
results[].parentstring or nullCode of the parent node, or null for a country and “Worldwide”
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.
503unavailableThe database is temporarily unavailable (failure or recovery) — retry in a few minutes; how long to wait is in the Retry-After header.

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

Go