DEV Community

Cover image for The comments on a Telegram post are not on the post
Oleg Starnikov
Oleg Starnikov

Posted on Originally published at tgatlas.org

The comments on a Telegram post are not on the post

Telegram draws the comment thread under a channel post as if it were part of the post. It is not. The comments are messages in a separate discussion group, numbered in that group's own sequence, and a channel can have them switched on for one post and off for the next.

That is why so much Telegram tooling reports a view count and then goes quiet about the conversation underneath it. The chain is short, and every response below is live output captured on 16 September 2026.

The post tells you where its comments went

curl 'https://telegram155.p.rapidapi.com/v1/peers/1892497462/history?limit=3' \
  --header 'x-rapidapi-key: YOUR_KEY' \
  --header 'x-rapidapi-host: telegram155.p.rapidapi.com'
Enter fullscreen mode Exit fullscreen mode

Three consecutive posts from one channel, trimmed to the fields that matter:

{
  "count": 613,
  "messages": [
    { "id": 4027, "views": 2508, "forwards": 21,
      "replies": { "comments": true,  "replies": 23, "channel_id": 1965425283 } },
    { "id": 4026, "views": 5886, "forwards": 30,
      "replies": { "comments": true,  "replies": 27, "channel_id": 1965425283 } },
    { "id": 4025, "views": 8021, "forwards": 93,
      "replies": { "comments": false, "replies": 0,  "channel_id": 0 } }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Post 4025 is the most viewed of the three and has no comments at all. Not zero comments — comments off, channel_id at 0, nowhere to look. Posts 4027 and 4026 both point at 1965425283: the discussion group linked to the channel, which is where their comments actually sit. One field, replies.comments, tells you which case you are in before you spend a second call.

Reading the thread

curl 'https://telegram155.p.rapidapi.com/v1/peers/1892497462/messages/4027/replies?limit=5' \
  --header 'x-rapidapi-key: YOUR_KEY' \
  --header 'x-rapidapi-host: telegram155.p.rapidapi.com'
Enter fullscreen mode Exit fullscreen mode
{
  "count": 23,
  "next_page": "…",
  "messages": [
    { "id": 404654, "from_id": { "user_id": 7780129537 }, "message": "Yes" },
    { "id": 404651, "from_id": { "user_id": 1268179019 }, "message": "Is that why the sudden crash?" }
  ],
  "users": [ { "id": 7780129537, "…": "…" } ]
}
Enter fullscreen mode Exit fullscreen mode

Look at the ids. Comment 404651 sits in the 400,000 range while the post is 4027, because the comment is a message in the discussion group, not in the channel. count is the real total and next_page is a cursor, so walking 23 comments or 2,300 is the same loop. The users array comes back in the same response — who wrote what costs no extra call.

Both calls together

import os, requests

BASE = "https://telegram155.p.rapidapi.com"
H = {
    "x-rapidapi-key": os.environ["RAPIDAPI_KEY"],
    "x-rapidapi-host": "telegram155.p.rapidapi.com",
}
CHANNEL = 1892497462

feed = requests.get(f"{BASE}/v1/peers/{CHANNEL}/history",
                    headers=H, params={"limit": 20}, timeout=10).json()

for post in feed["messages"]:
    r = post.get("replies") or {}
    if not r.get("comments"):
        continue

    thread = requests.get(f"{BASE}/v1/peers/{CHANNEL}/messages/{post['id']}/replies",
                          headers=H, params={"limit": 20}, timeout=10).json()

    authors = {u["id"]: u for u in thread.get("users", [])}
    views = post.get("views") or 0
    print(f"post {post['id']}: {r['replies']} comments on {views:,} views "
          f"({r['replies'] / views:.2%}), {len(authors)} distinct authors in the first page")
Enter fullscreen mode Exit fullscreen mode

Twenty posts from that channel, captured minutes after the feed above:

post 4027: 23 comments on 2,510 views (0.92%), 19 distinct authors in the first page
post 4026: 27 comments on 5,889 views (0.46%), 16 distinct authors in the first page
post 4024: 64 comments on 8,048 views (0.80%), 12 distinct authors in the first page
post 4023: 34 comments on 7,974 views (0.43%), 18 distinct authors in the first page
post 4019: 42 comments on 20,458 views (0.21%), 17 distinct authors in the first page
post 4017: 85 comments on 28,484 views (0.30%), 14 distinct authors in the first page
Enter fullscreen mode Exit fullscreen mode

The last column is the interesting one. Reach and conversation are separate signals, and here they move in opposite directions: post 4027 reached 2,510 people and 0.92% of them said something, while post 4019 reached eight times as many and got a quarter of the rate. Ranking these posts by views alone would have pointed you at the quieter audience.

The discussion root

If you want the post as the discussion group itself sees it, there is a second endpoint: GET /v1/peers/1892497462/messages/4027/discussion. It returns the root message inside the group along with max_id, unread_count and the group chat objects — what you need to send a reader straight into the conversation instead of the channel.

Two things worth planning for

Comment spam is ordinary, and the signals to filter it ship with the data. Of the five newest comments on post 4027, three carried links, one of them with Cyrillic lookalikes swapped in to slip past filters. The users array is where a filter starts: a missing username and a freshly minted numeric id are both cheap signals, and both arrive in the response you already paid for.

Read can_view_participants before you enumerate. A linked discussion group will usually let you list its participants where the broadcast channel will not, and the channel object carries the flag — so you know which of the two to ask, and you know it before you spend the call.

Three calls — feed, thread, discussion root — and the conversation under a channel's posts is yours to read. The free plan is 2,500 calls a month with no card — at three calls a conversation that is about 833 threads read before anything is paid for. Start with the quickstart, or go straight to the reference: 19 routes, one API key, no phone number.


First published on tgatlas.org.

Top comments (0)