DEV Community

Yuhe He
Yuhe He

Posted on

How to See Full Telegram Channel History Without Login (the before-parameter Trick)

Every few weeks someone searches some variant of this and lands on a blog post from 2017 that says "you can't - Telegram history is private." That answer is wrong, incomplete, and expensive to believe, so here's the definitive short version.

What is public: any channel (not group) has a public web preview at t.me/s/<channelname>. It renders the last ~20 posts as plain HTML - no login, no API key, no rate limit that matters for human-scale browsing. Each post carries a data-post="<channel>/<id>" attribute: a monotonically increasing post ID.

So how do you see history? Two honest answers:

  1. The before parameter. t.me/s/<channel>?before=<postid> renders the page ending at that post ID. Walk before downward in ~20-post steps and you walk backward through the entire visible history, one page fetch per 20 posts. This is the whole trick; most people never find it because Telegram's own UI for the preview is minimal and undocumented.
  2. The gap-fill. Because IDs are sequential and the endpoint is stateless, missing ranges (your crawler was down Tuesday) are recovered with targeted fetches of exactly the missing IDs. No "catch-up mode," no API quotas.

What you can't get this way (be honest in your docs): deleted posts and edited-post history are gone from the preview - the preview shows current state. Comments (the Discord-style threaded ones) are a separate preview surface. Views counts are in the HTML. Reactions are in the HTML. Media previews are thumbnails; full-res needs a second hop. And private groups have no preview at all - this method is channel-scope.

The scraping etiquette that keeps you welcome: fetch sequentially at human-ish cadence (seconds between pages, not milliseconds), identify your pipeline in your logs, back off on 4xx. The preview layer has no auth, so politeness is the whole price of admission. Burst-scan a channel's year of history once, then poll only the tip (last 20 posts) at your live cadence - history is immutable, you never re-fetch what you already stored.

A worked example: a channel with post IDs 10000-10420 today has ~420 visible posts. Twenty fetches of ?before= at 20-post steps, parse div blocks with data-post, store raw HTML fragments keyed by post ID, parse structured fields after. On a free GitHub Actions runner, a full history scan of a channel takes under two minutes wall-clock including politeness delays. A year of monitoring costs the same as a cron job.

I run this as the collection layer for everything in my Telegram & Web OSINT Bundle ($5) - the crawler, the cadence rules, and the analysis templates. The output format is a free sample brief (pay what you want, it's a good way to check I'm real).

No server, no paid APIs - GitHub Actions cron, public t.me/s/ preview layer.

TL;DR: t.me/s/<channel>?before=<postid> + sequential walking = full public channel history, no login. Deleted = gone, groups = private, be polite, store raw.

Top comments (0)