Sign in

Quick start

The datool.ru API returns the MAX data you see on the site: the channel catalog, cards, daily statistics and posts.

Get a key

  1. Sign in at hi.datool.ru and open “API keys”.
  2. Click “Create key” and copy it — the full key is shown only once.

Make your first request

# who am I: organization, API plan and remaining requests (free)
curl https://api.datool.ru/v1/me/ \
  -H "Authorization: Bearer dtk_your_key"

The same in Python:

# HTTP library: pip install requests
import requests

# API key from your account — replace with yours
HEADERS = {"Authorization": "Bearer dtk_your_key"}

# who am I: organization, API plan and remaining requests (free)
me = requests.get("https://api.datool.ru/v1/me/", headers=HEADERS, timeout=30).json()
print(me["api_tariff"], me["remaining_period"])

The response shows your organization, API plan and how many requests are left. This request is free.

Find a channel

# find a channel by a max.ru/… link — the response has the card and the datool.ru number (id)
curl "https://api.datool.ru/v1/max/channels/resolve/?q=https://max.ru/citynews" \
  -H "Authorization: Bearer dtk_your_key"

The response contains the channel card and its datool.ru ID (id). Use the ID to request statistics and posts.

Get statistics

import requests

HEADERS = {"Authorization": "Bearer dtk_your_key"}
API = "https://api.datool.ru/v1"

# 1. the channel number by link
channel = requests.get(
    f"{API}/max/channels/resolve/",
    params={"q": "https://max.ru/citynews"},
    headers=HEADERS,
    timeout=30,
).json()

# 2. daily statistics — the last 30 days by default
stats = requests.get(
    f"{API}/max/stats/daily/",
    params={"channels": channel["id"]},
    headers=HEADERS,
    timeout=30,
).json()

for row in stats["results"]:
    # day, subscribers at the end of the day, views of that day's posts
    print(row["day"], row["subscribers"], row["views"])

What next

Note

The free “API.Max Test” plan gives 1,000 requests per 30 days: channel cards and statistics for the last 30 days. Posts and the full history start with “API.Max Start”.

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