# Telegram Post comments API (telegram.post_comments)

- Canonical page: [https://everyinfra.com/en/telegram-api/post_comments](https://everyinfra.com/en/telegram-api/post_comments?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "telegram", "action": "post_comments", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 50, max 100 per call (larger values are capped)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=telegram&action=post_comments

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | Link to one public channel message, https://t.me/<channel>/<message ID> (t.me/s/ links work too); the call returns the comments under it. Invite links (t.me/+…) are not accepted, and a value in the wrong form is rejected (422) before you are charged. A message whose comments are turned off or not public returns 200 with an empty result and `empty_reason` set to `comments_closed`; a channel or message that does not exist returns an empty result. Neither is charged. |
| page_token | not declared | no | not declared | Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. Each page holds up to 100 comments (`limit`, default 50) and counts as one call; paging reaches all the way back to the first comment, and only a page without `next_page_token` is the last one. |
| limit | integer (1–100) | no | 50 | The most rows to return in this call, an integer from 1 to 100. The default applies when you leave it out, and a call can return fewer rows. Larger values are accepted and capped at the maximum. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| post_id | Number of the channel message the comment is under (post_comments), the number in t.me/<channel>/<number>. |
| post_url | Link to the channel message the comment is under (post_comments). |
| url | Link to the record on the platform. |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
| author_username | Author's username (@handle), usually usable in URLs. |
| author_name | Author's display name. |
| author_url | Link to the author's profile on the platform. |
| author_avatar_url | Link to the commenter's avatar image (post_comments); absent when there is none. |
| text_html | The text as HTML, keeping its links and formatting (post_comments, search_in_channel). |
| media_type | Media type (photo / video / file / voice); in post_comments and search_in_channel an album of several photos or videos is album, and text-only messages have no media_type. |
| image_urls | Array of image links in the platform's display order; absent when there are no images. |
| video_url | Link to the video file (post_comments, search_in_channel); signed and expires, absent when there is no video. |
| media | Each photo or video in the message (post_comments, search_in_channel): [{type, url, id, width, height, thumbnail_url, duration_sec}], each only when it has a value; links expire. |
| reactions | Emoji reactions with their counts; in post_comments and search_in_channel each is {emoji, emoji_id, count, is_paid}, and a custom emoji has emoji_id instead of emoji. |
| reaction_count | Total number of emoji reactions (post_comments, search_in_channel). |
| reaction_count_estimated | Whether reaction_count is a rounded figure: true when Telegram's page shows it in a form like 9.37K (post_comments, search_in_channel). |
| links | Links in the text, in order of appearance (post_comments, search_in_channel); absent when there are none. |
| reply_to_id | Number of the message or comment being replied to (post_comments, search_in_channel); absent when Telegram does not give it. |
| reply_to_name | Name of the person being replied to (post_comments, search_in_channel). |
| reply_to_text | Text of the message being replied to, as Telegram's page quotes it (post_comments, search_in_channel). |
| post_comment_count | Total number of comments on the channel message (post_comments); the same on every row of a response. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "telegram",
  "action": "post_comments",
  "params": {
    "url": "https://t.me/contest/198"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "telegram",
        "action": "post_comments",
        "params": {
            "url": "https://t.me/contest/198",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "telegram",
  "action": "post_comments",
  "results": [
    {
      "id": …,
      "post_id": …,
      "post_url": …,
      "url": …,
      "text": …,
      "posted_at": …,
      "author_username": …,
      "author_name": …,
      "author_url": …,
      "author_avatar_url": …,
      "text_html": …,
      "media_type": …,
      "image_urls": …,
      "video_url": …,
      "media": …,
      "reactions": …,
      "reaction_count": …,
      "reaction_count_estimated": …,
      "links": …,
      "reply_to_id": …,
      "reply_to_name": …,
      "reply_to_text": …,
      "post_comment_count": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=telegram
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
