channelstringобязательно
Channel username; post_id: Post ID; limit: number of comments (1-100).
https://api.sandbase.ai/v1/api/telegram/web/post-commentsReturns comments from the linked discussion group of a specified Telegram channel post. Filters include the channel username, post ID, and an optional limit.
[
{
"data": {
"channel": "example",
"comments": [],
"mtproto_required": true,
"note": "帖子评论需要在「设置」页启用并登录 MTProto 后端",
"post_id": 1
}
}
]Выберите пример, чтобы загрузить его входные данные и результат в playground.
Returns comments from the linked discussion group of a Telegram channel post. It needs the channel username in channel and the numeric post_id. An optional limit sets how many comments to return.
curl -X POST "https://api.sandbase.ai/v1/api/telegram/web/post-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channel": "telegram", "post_id": 450}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channel | string | Yes | Channel username; post_id: Post ID; limit: number of comments (1-100). |
post_id | integer | Yes | Post ID |
limit | integer | No | Number of comments |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"channel": "telegram",
"comments": [],
"mtproto_required": true,
"note": "帖子评论需要在「设置」页启用并登录 MTProto 后端",
"post_id": 450
}
| Field | Meaning |
|---|---|
channel | The channel username that the request used. |
post_id | The ID of the post that the request asked about. |
comments | List of comments on the post. In the sample response it is empty []. |
mtproto_required | When true, the call needs an MTProto backend to be enabled and logged in before it can return comments. |
note | Text message that explains why the result is empty. In the sample it says post comments need MTProto to be enabled and logged in on the settings page. |
@ sign, for example telegram.limit accepts whole numbers from 1 to 100.mtproto_required first. If it is true, comments stays empty and note explains the reason.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Начните разработку
Конечная точка платформенного API с единообразной аутентификацией и учётом использования.
curl -X POST "https://api.sandbase.ai/v1/api/telegram/web/post-comments" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "example",
"post_id": 1
}'Укажите свой ключ SandBase API в окружении сервера. Запросы используют аутентификацию Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Храните ключ на сервере. Не раскрывайте его в коде браузера.
channelstringобязательноChannel username; post_id: Post ID; limit: number of comments (1-100).
post_idintegerобязательноPost ID
limitintegerNumber of comments
Сохранённый пример ответа для этого API; при просмотре живой запрос не выполняется.
[
{
"data": {
"channel": "example",
"comments": [],
"mtproto_required": true,
"note": "帖子评论需要在「设置」页启用并登录 MTProto 后端",
"post_id": 1
}
}
]Посмотреть больше
| API | Цена | Ответ |
|---|---|---|
Telegram Post CommentsЭтот API Telegram | $0.001 за запрос | JSON |
Telegram | $0.008 за запрос | JSON |
Telegram | $0.001 за запрос | JSON |
Telegram | $0.001 за запрос | JSON |
Telegram | $0.001 за запрос | JSON |
Telegram | $0.001 за запрос | JSON |
Руководства:Best Telegram API in 2026: Pricing Compared
Вопросы
Отправьте POST-запрос на https://api.sandbase.ai/v1/api/telegram/web/post-comments, указав ключ SandBase API в заголовке Authorization (Bearer), а параметры — в теле JSON. Вы также можете попробовать это в Playground на этой странице без написания кода.
$0.001 за вызов. Каждой организации предоставляется 100 бесплатных вызовов в сутки по UTC, общих для всех подходящих API SandBase, включая этот; после этого каждый вызов тарифицируется по этой цене и списывается с баланса SandBase. Подписка не требуется.
Обязательные: channel (string) и post_id (integer). Необязательные: limit (integer). В таблице Parameters и в Playground на этой странице перечислены все поля.
JSON-ответ, возвращаемый в том же HTTP-запросе (синхронно). В README на этой странице приведен пример ответа.
Нет. Telegram Post Comments работает через SandBase, поэтому один API key SandBase покрывает этот endpoint и все остальные API и модели в каталоге. Вам не нужно отдельно запрашивать доступ к API Telegram.