I run Serpent, the API used in the examples below.

There are two ways to read a public Telegram channel from Python or Node: Telegram's official API, used through your own account and app credentials, or one request to a channel API that returns the posts as JSON.

Short answer: If you need private channels you belong to, or you already run a Telegram account for this work, use Telegram's official API. It has no per-request fee; the login, the session and the account's standing are yours to manage. The Telegram API documentation and TDLib are the places to start, and community libraries such as Telethon (Python) and GramJS (Node) wrap the same protocol. For a monitor that runs on a schedule, for dozens of public channels, or for a feature other people depend on, one API call is less to own.

The output below comes from real answers saved on 21 November 2026. Nothing was fetched live while writing this post.

How do you get a channel with one request in Python?

Send a GET request to https://apiserpent.com/api/telegram/channel with your key in the X-API-Key header. One parameter is required, channel: a username with or without @ or a t.me link, 4 to 32 letters, digits or underscores, starting with a letter. One is optional, before: the next_before value from the previous answer.

Install requests, put your key in place of the placeholder, and run this:

import requests API_KEY = "sk_live_your_api_key" URL = "https://apiserpent.com/api/telegram/channel" def get_channel(channel, before=None): params = {"channel": channel} if before: params["before"] = before r = requests.get(URL, params=params, headers={"X-API-Key": API_KEY}, timeout=60) r.raise_for_status() return r.json() data = get_channel("durov") if not data["posts"]: print("No posts came back; preview_enabled =", data["preview_enabled"]) else: print(f'{data["title"]}: {data["subscribers"]:,} subscribers, {len(data["posts"])} posts, next_before={data["next_before"]}') for p in data["posts"][:3]: top = ", ".join(f'{r["emoji"] or "custom:" + r["custom_emoji_id"]} {r["count"]:,}' for r in p["reactions"][:2]) print(p["id"], p["date"], f'{p["views"]:,} views |', top) print(" ", p["text"][:70].replace("\n", " ")) print() seen, before = [], None for n in range(2): page = get_channel("bloomberg", before) ids = [p["id"] for p in page["posts"]] print(f'page {n + 1}: {len(ids)} posts, ids {ids[0]} down to {ids[-1]}, next_before={page["next_before"]}') seen += ids before = page["next_before"] if not before: break print(len(seen), "posts,", len(set(seen)), "distinct ids") print() quiet = get_channel("coindesk") print(f'coindesk: {quiet["subscribers"]:,} subscribers, preview_enabled={quiet["preview_enabled"]}, posts={len(quiet["posts"])}') 

The output, from the saved sample answers:

Pavel Durov: 9,910,000 subscribers, 20 posts, next_before=546 567 2026-11-20T20:47:30+00:00 789,000 views | ⭐ 18,400, custom:5399847211989246390 34,600 I was offered $256,000 for the @pride username on Telegram. I don’t n 566 2026-11-19T22:12:20+00:00 1,080,000 views | ⭐ 10,800, custom:5373223594484587136 37,000 Apple finally made a phone that’s both too big and too small. It fold 565 2026-11-18T17:42:19+00:00 1,470,000 views | ⭐ 17,600, custom:5399847211989246390 49,800 🇮🇶 Iraq blocked Telegram (2nd time this year). We feel sorry for the page 1: 20 posts, ids 3225 down to 3206, next_before=3206 page 2: 20 posts, ids 3205 down to 3186, next_before=3186 40 posts, 40 distinct ids coindesk: 11,202 subscribers, preview_enabled=False, posts=0 

The code tests posts and preview_enabled rather than trusting the HTTP status. A channel whose owner has hidden its posts from public view is a normal answer with an empty list, and the last line shows one: 11,202 subscribers, preview_enabled false and no posts.

And in Node?

Same call with the fetch built into Node 18 and later. Save it as api.mjs so top-level await works:

const API_KEY = "sk_live_your_api_key"; const ENDPOINT = "https://apiserpent.com/api/telegram/channel"; async function getChannel(channel, before) { const params = new URLSearchParams({ channel }); if (before) params.set("before", before); const res = await fetch(`${ENDPOINT}?${params}`, { headers: { "X-API-Key": API_KEY } }); if (res.ok === false) throw new Error(`HTTP ${res.status}`); return res.json(); } const data = await getChannel("durov"); if (data.posts.length === 0) { console.log("No posts came back; preview_enabled =", data.preview_enabled); } else { console.log(`${data.title}: ${data.subscribers.toLocaleString("en-US")} subscribers, ${data.posts.length} posts, next_before=${data.next_before}`); for (const p of data.posts.slice(0, 3)) { const top = p.reactions.slice(0, 2).map((r) => `${r.emoji || "custom:" + r.custom_emoji_id} ${r.count.toLocaleString("en-US")}`).join(", "); console.log(p.id, p.date, `${p.views.toLocaleString("en-US")} views |`, top); console.log(" ", Array.from(p.text).slice(0, 70).join("").replace(/\n/g, " ")); } } console.log(); const seen = []; let before = null; for (let n = 1; n <= 2; n++) { const page = await getChannel("bloomberg", before); const ids = page.posts.map((p) => p.id); console.log(`page ${n}: ${ids.length} posts, ids ${ids[0]} down to ${ids.at(-1)}, next_before=${page.next_before}`); seen.push(...ids); before = page.next_before; if (before === null) break; } console.log(seen.length, "posts,", new Set(seen).size, "distinct ids"); console.log(); const quiet = await getChannel("coindesk"); console.log(`coindesk: ${quiet.subscribers.toLocaleString("en-US")} subscribers, preview_enabled=${quiet.preview_enabled}, posts=${quiet.posts.length}`); 

It prints the same lines as the Python version. The one difference is that JavaScript writes the boolean as false where Python writes False.

What does the answer look like?

One JSON object per request: the channel's facts, up to 20 posts newest first, and the cursor for the next page. This is the saved answer for channel=durov, trimmed to its header and first post (the picture URL is shortened and the description left out):

{ "success": true, "channel": "durov", "title": "Pavel Durov", "subscribers": 9910000, "photo_url": "https://cdn4.telesco.pe/file/I0Afn...", "preview_enabled": true, "posts": [ { "id": 567, "url": "https://t.me/durov/567", "date": "2026-11-20T20:47:30+00:00", "text": "I was offered $256,000 for the @pride username on Telegram.\n\nI don’t need the username.\n\nBut if I sell, does that mean I sold my pride? 🤔", "views": 789000, "edited": true, "author": "Pavel Durov", "forwarded_from": "", "reply_to_id": null, "photos": [], "videos": [], "documents": [], "link_preview": null, "reactions": [ { "emoji": "⭐", "custom_emoji_id": "", "count": 18400 }, { "emoji": "", "custom_emoji_id": "5399847211989246390", "count": 34600 }, { "emoji": "", "custom_emoji_id": "5373223594484587136", "count": 14000 }, { "emoji": "", "custom_emoji_id": "5334575279731909928", "count": 8890 } ] } ], "next_before": 546 } 

(The other 19 posts carry the same fields.) Every field is always present. A value the channel does not show comes back empty, as an empty string, null or an empty list, instead of disappearing. subscribers is the channel's public subscriber count, or null when the channel does not show one. Post text arrives as ordinary UTF-8, Cyrillic included.

How do you page back through older posts?

Each answer ends with next_before. Pass it back as before and you get the next older page. In the saved Bloomberg answers, page 1 held ids 3225 down to 3206 and gave next_before 3206; the request with before=3206 returned ids 3205 down to 3186. Two pages, 40 posts, 40 distinct ids, nothing repeated.

Take the cursor from the answer; do not compute it. Post ids skip numbers: Durov's 20 posts run from id 567 down to 546, which is 22 numbers, so stepping back by the page size lands in the wrong place.

Stop when next_before comes back empty. Every saved answer here had an older page after it, so I cannot show you what the last page of a channel looks like. Test that case before you rely on it, and fetch one page at a time.

What should your code expect in the data?

Four things are worth handling from the first version of your code. None of them is an error.

Replies point at another post. A reply carries the id of the post it answers in reply_to_id, and text holds only the reply's own words. Post 350226 in the saved rian_ru answer replies to 350219. If you show replies in a feed, look up the quoted post yourself.

Reactions come in three kinds. A star stands for Stars, an emoji for an ordinary reaction, and an empty emoji with a custom_emoji_id for a custom emoji. Keep the ids, and build a small lookup table for the ones you care about.

Large counts are rounded. Views of 789000 and a subscriber count of 9910000 are rounded to three significant digits. Counts below one thousand are exact. Compare the same post over time rather than posts of different ages.

An empty list has a reason. When a channel's owner has hidden its posts from public view, the answer still carries the title and subscriber count, with preview_enabled false and no posts. Log that as its own state, so an empty result is never mistaken for a quiet channel.

Which route should you pick?

Telegram's official API One API call per page
What you need A Telegram account with a verified phone number, plus an api_id and api_hash from my.telegram.org An API key
What you can read Whatever the account can see, including private channels it belongs to Public channels; for one whose owner has hidden its posts, the title and subscriber count
Paging Batches by message id, tracked by your code next_before in every answer
What you look after The login, the session, flood waits and the account's standing A request function of about seven lines
Output Telegram's own message objects, which you map to your fields One JSON shape, with every field always present
  • A one-off look at a few channels, or a Telegram account you already run for this work: the official API. You see what your account sees.
  • Private channels and groups you belong to, or sending messages: the official API. A channel API reads public channels only.
  • A monitor that runs every hour, or dozens of channels: one API call per page.
  • A product feature other people rely on: the API, which leaves no Telegram account or session for you to keep alive.

The full version, with the official-API steps, FAQ and sources, is on the original post on apiserpent.com.