tgstat
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCall the TGStat Stat API with . The user's token is in
and is passed as the query parameter on every request.
Base URL: .
curl + jq$TGSTAT_TOKENtokenhttps://api.tgstat.ruResponses are JSON shaped . Errors come back as
— show the verbatim. An invalid
token or an inactive/expired API plan will surface here; tell the user to check
their token / plan in the TGStat 个人中心 and re-connect the connector.
{"status":"ok","response": ...}{"status":"error","error":"<message>"}errorAlways confirm the token + remaining quota first ( is free and
does not count against tariff quota):
usage/statbash
curl -sS "https://api.tgstat.ru/usage/stat?token=$TGSTAT_TOKEN" \
| jq '.status, (.response[]? | {serviceKey, title, spentChannels, spentRequests, expiredAt})'使用调用TGStat Stat API。用户的token存储在中,需在每次请求中作为查询参数传递。
基础URL:。
curl + jq$TGSTAT_TOKENtokenhttps://api.tgstat.ru响应格式为JSON:。错误响应格式为 —— 需原样展示内容。无效token或未激活/过期的API套餐会在此处显示;请告知用户前往TGStat个人中心检查token/套餐,并重新连接连接器。
{"status":"ok","response": ...}{"status":"error","error":"<message>"}error请始终先确认token及剩余配额(接口免费,不计入套餐配额):
usage/statbash
curl -sS "https://api.tgstat.ru/usage/stat?token=$TGSTAT_TOKEN" \
| jq '.status, (.response[]? | {serviceKey, title, spentChannels, spentRequests, expiredAt})'Find channels to advertise in (the main workflow)
寻找可投放广告的频道(主流程)
GET /channels/searchqcategoryParams: , , , (default ),
( | | , default ),
(/), (max 100).
qcategorycountrylanguagerussianpeer_typechannelchatallchannelsearch_by_description01limitbash
undefinedGET /channels/searchqcategory参数:, , , (默认值),
( | | ,默认值),
(/), (最大值100)。
qcategorycountrylanguagerussianpeer_typechannelchatallchannelsearch_by_description01limitbash
undefinedRussian-language AI/ChatGPT channels, biggest first.
俄语AI/ChatGPT频道,按规模从大到小排序。
curl -sS "https://api.tgstat.ru/channels/search"
--data-urlencode "token=$TGSTAT_TOKEN"
--data-urlencode "q=нейросети"
--data-urlencode "language=russian"
--data-urlencode "peer_type=channel"
--data-urlencode "limit=50" -G
| jq '.response.items | sort_by(-.participants_count) | .[] | {username, title, subs: .participants_count, ci_index, link}'
--data-urlencode "token=$TGSTAT_TOKEN"
--data-urlencode "q=нейросети"
--data-urlencode "language=russian"
--data-urlencode "peer_type=channel"
--data-urlencode "limit=50" -G
| jq '.response.items | sort_by(-.participants_count) | .[] | {username, title, subs: .participants_count, ci_index, link}'
- Use `--data-urlencode ... -G` so Cyrillic / spaces in `q` are encoded correctly.
- `ci_index` (индекс цитирования) is TGStat's citation/authority score — higher =
more reposted/mentioned elsewhere, a useful quality signal beyond raw subs.
- Try several keywords (`ChatGPT`, `нейросети`, `AI`, `разработка`, `API`) and
merge results; TGStat matches title/username (add `search_by_description=1` to
also match the channel description).curl -sS "https://api.tgstat.ru/channels/search"
--data-urlencode "token=$TGSTAT_TOKEN"
--data-urlencode "q=нейросети"
--data-urlencode "language=russian"
--data-urlencode "peer_type=channel"
--data-urlencode "limit=50" -G
| jq '.response.items | sort_by(-.participants_count) | .[] | {username, title, subs: .participants_count, ci_index, link}'
--data-urlencode "token=$TGSTAT_TOKEN"
--data-urlencode "q=нейросети"
--data-urlencode "language=russian"
--data-urlencode "peer_type=channel"
--data-urlencode "limit=50" -G
| jq '.response.items | sort_by(-.participants_count) | .[] | {username, title, subs: .participants_count, ci_index, link}'
- 使用`--data-urlencode ... -G`确保`q`中的西里尔字母/空格被正确编码。
- `ci_index`(индекс цитирования)是TGStat的引用/权威评分 —— 分数越高表示被转发/提及的次数越多,是除了订阅量之外的有用质量信号。
- 尝试多个关键词(`ChatGPT`, `нейросети`, `AI`, `разработка`, `API`)并合并结果;TGStat会匹配标题/用户名(添加`search_by_description=1`可同时匹配频道描述)。Judge a channel's ad value
判断频道的广告价值
GET /channels/stat?channelId=<@username | t.me/username | tgstat id>bash
curl -sS "https://api.tgstat.ru/channels/stat?token=$TGSTAT_TOKEN&channelId=@durov" \
| jq '.response | {
subs: .participants_count,
avg_post_reach, # средний охват публикации
adv_reach_24h: .adv_post_reach_24h, # рекламный охват за 24ч — key for CPM
er_percent, err_percent, err24_percent,
daily_reach, ci_index, posts_count
}'- For ad CPM estimation use (average advertising reach of a post over 24h), not raw subscriber count — subs are vanity, reach is what the ad actually gets seen by.
adv_post_reach_24h - Low /
err_percentrelative to subs = inflated/dead audience → skip it.err24_percent - For a chat (not channel) the response instead has /
dau/wauandmaufields.messages_count_*
GET /channels/get?channelId=...categorycountrylanguageparticipants_countci_indexGET /channels/stat?channelId=<@username | t.me/username | tgstat id>bash
curl -sS "https://api.tgstat.ru/channels/stat?token=$TGSTAT_TOKEN&channelId=@durov" \
| jq '.response | {
subs: .participants_count,
avg_post_reach, # 平均帖子触达量
adv_reach_24h: .adv_post_reach_24h, # 24小时广告触达量 —— 计算CPM的关键指标
er_percent, err_percent, err24_percent,
daily_reach, ci_index, posts_count
}'- 用于估算广告CPM时,请使用(帖子在24小时内的平均广告触达量),而非原始订阅人数 —— 订阅量只是表面数据,触达量才是广告实际被看到的人数。
adv_post_reach_24h - 相对于订阅量,/
err_percent数值较低 = 受众注水/僵尸粉 → 请跳过该频道。err24_percent - 对于聊天群组(非频道),响应会包含/
dau/wau和mau字段。messages_count_*
当你仅需识别/验证频道而非获取完整数据时,可调用获取描述信息(标题、简介、、、、、)。
GET /channels/get?channelId=...categorycountrylanguageparticipants_countci_indexReference data
参考数据
GET /database/categories?token=$TGSTAT_TOKENcategorychannels/search/database/countries/database/languagesGET /database/categories?token=$TGSTAT_TOKENchannels/searchcategory/database/countries/database/languagesGotchas
注意事项
- Plan gating: needs a Stat API tariff S or higher;
channels/search/channels/statwork on all Stat tariffs. If a call returns an access error, the user's plan doesn't cover that method.channels/get - Quota: each unique channel and each request counts against the monthly
tariff (visible via ). Don't loop over hundreds of channels blindly — search, shortlist, then
usage/statonly the shortlist.stat - min length is 3 chars →
q.{"error":"param q is too short"} - Cyrillic: always send via
q(or pre-URL-encode) so the keyword isn't mangled.--data-urlencode - TGStat is a Russian service; the API and billing are RU-side — availability and payment are the account owner's responsibility.
- 套餐限制:需要Stat API套餐S或更高版本;
channels/search/channels/stat适用于所有Stat套餐。如果调用返回访问错误,说明用户的套餐不支持该接口。channels/get - **配额限制:**每个唯一频道和每次请求都会计入月度套餐配额(可通过查看)。请勿盲目遍历数百个频道 —— 先搜索、筛选出候选列表,再仅对候选列表调用
usage/stat接口。stat - 参数最小长度为3个字符 → 错误响应:
q。{"error":"param q is too short"} - **西里尔字母:**请始终通过(或预先进行URL编码)传递
--data-urlencode参数,避免关键词出现乱码。q - TGStat是俄罗斯服务;API和计费均在俄罗斯境内 —— 服务可用性和支付事宜由账户所有者负责。