Web data & toolsTelegram
Telegram Channel Scraper API: Public Posts to JSON, with an AI Digest
Telegram channel scraper API guide: read public channels as JSON with views, reactions and media, search them, poll new posts and get an AI digest.
A lot of news now breaks on Telegram first. Newsrooms, crypto projects, governments, tech communities and brands publish in public channels, often hours before the same information reaches a website or a press release. For OSINT analysts, trading desks and brand teams, those channels are a data source like any other, except that they have no RSS feed and are usually written in a language the team does not read.
A Telegram channel scraper API turns a public channel into JSON: posts with their views, reactions, media and links, the channel's audience, a search inside the channel, and paging through its history. This article explains the ways to read a public channel, then uses the Telegram Channel Scraper API to export posts, follow new ones, and get an AI digest of a Russian-language channel in English.
Three ways to read a public Telegram channel
| Bot API | User client (MTProto) | Public web preview (t.me/s/) | |
|---|---|---|---|
| What you need | A bot added to the channel as an administrator | A Telegram account with a phone number, an api_id and a session |
Nothing: the channel's public URL |
| Which channels | Only those whose owner added your bot | Any channel the account can open | Public channels with a username and the web preview on |
| History | No, only new posts as they arrive | Yes | Yes, page by page |
| Operational cost | Low, but you depend on each owner | Account and session management, client libraries such as Telethon or TDLib | Low: plain HTTP pages |
The Bot API is the right tool for channels you run. A user client gives the deepest access and carries the weight of an account: a phone number, a session to keep alive, and Telegram's terms for API clients. The third option is the one this API uses: for every public channel, Telegram publishes a web preview at https://t.me/s/<channel>, a static page showing the latest posts with their views, reactions and media, 20 message ids per page.
Reading that preview at scale is mostly parsing work: normalising "9.88M" views into numbers, following before and after cursors, handling albums that use one message id per photo, and telling a channel apart from a group, a bot or a person. The API does that work and returns the result as JSON.
Read a channel's posts with Python
GET /v1/telegram/posts takes a channel as a username (durov), a handle (@durov) or any t.me link. The examples use Python and requests; the API reference lists every field.
import requests
HOST = "telegram-channel-scraper-posts-ai-digest.p.rapidapi.com"
API = f"https://{HOST}"
HEADERS = {"x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": HOST}
response = requests.get(
f"{API}/v1/telegram/posts",
headers=HEADERS,
params={"channel": "durov", "limit": 5},
timeout=60,
)
response.raise_for_status()
result = response.json()
for post in result["posts"]:
print(post["id"], post["date"], post["views"], post["reactions_total"])
The real response, trimmed to 1 of the 5 posts and 2 of its 4 reactions:
{
"channel": {
"username": "durov",
"title": "Pavel Durov",
"url": "https://t.me/durov",
"verified": true,
"subscribers": 9880000,
"subscribers_exact": false,
"counters": { "photos": 106, "videos": 47, "links": 203 },
"preview_available": true,
"last_post": { "id": 570, "date": "2026-11-23T21:00:12+00:00" }
},
"count": 5,
"posts": [
{
"id": 570,
"url": "https://t.me/durov/570",
"date": "2026-11-23T21:00:12+00:00",
"edited": true,
"text": "🎉 Jensen's back.\n\nNvidia's board finally understood that a CEO has to evaluate Chinese models personally.\n\nYou can't delegate that.",
"views": 780000,
"reactions": [
{ "emoji": "⭐", "paid": true, "count": 6550 },
{ "custom_emoji_id": "5334575279731909928", "paid": false, "count": 36300 }
],
"reactions_total": 64350,
"media": [],
"links": [],
"hashtags": [],
"unsupported": false
}
],
"next_before": 566,
"credits": 1
}
Three details matter when you store this data:
- Reactions come in three kinds. A standard emoji has
emoji; a Telegram Stars reaction has"paid": true; a custom emoji has acustom_emoji_idand no picture.reactions_totaladds them all. - The subscriber count in a post listing is rounded, because the preview shows "9.88M".
subscribers_exact: falsesays so; the next section gets the exact figure. - Media links expire. Photos and videos are links to Telegram's CDN with a token, valid for hours to days. Download what you need to keep.
Channel profile and exact subscriber count
For ad buying, influencer research or shortlisting sources, the profile matters more than the posts. GET /v1/telegram/channel reads both the preview and the channel's profile page, which carries the exact count. A real call on Telegram's official channel:
{
"username": "telegram",
"title": "Telegram News",
"url": "https://t.me/telegram",
"description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
"verified": true,
"subscribers": 9046633,
"subscribers_exact": true,
"counters": { "photos": 16, "videos": 228, "links": 378 },
"preview_available": true,
"last_post": { "id": 460, "date": "2026-08-26T19:12:34+00:00" }
}
last_post is the quickest activity check there is: a channel with a large audience and no post for three months is a different buy from one that posts daily. To compare candidates, POST /v1/telegram/channels returns up to 20 profiles in one call, in order, with an error code for each name that is not a readable channel (1 credit per channel found).
Search inside a channel
GET /v1/telegram/search runs Telegram's own search within one channel, by words or #hashtag, in any language. A real search for "stories" in the official channel, trimmed to 1 of 3 posts and 2 of its links:
{
"query": "stories",
"count": 3,
"posts": [
{
"id": 420,
"url": "https://t.me/telegram/420",
"date": "2025-12-15T08:22:11+00:00",
"text": "For all the details about creating passkeys and making offers for gifts – check out our blog:\nhttps://telegram.org/blog/passkeys-and-gift-offers\n\nDecember Features\n1 • 2 • 3 • More",
"views": 3040000,
"links": [
"https://telegram.org/blog/passkeys-and-gift-offers",
"https://t.me/telegram/417"
],
"link_preview": {
"url": "https://telegram.org/blog/passkeys-and-gift-offers",
"site_name": "Telegram",
"title": "Passkeys, Gift Purchase Offers and More",
"description": "In today's update, we add secure passkeys for instant login without SMS codes, gift purchase offers with built-in scam protection, and a simple way to add audio from your profile to stories."
}
}
],
"next_before": 419,
"credits": 1
}
The search matched the word in the link preview, not in the post's own text. That is Telegram's behaviour, and worth knowing when you count mentions: filter on text yourself if only the author's words should count. For brand monitoring across many channels, run one search per channel; there is no global search across Telegram on the public preview.
Page through history and poll for new posts
Posts come newest first, up to 100 per call, at 1 credit per 20 posts returned. Three parameters cover every access pattern:
| Goal | Parameters |
|---|---|
| Older posts | before = the next_before of the previous page, until it is absent |
| A time window | since=2026-10-01 stops at older posts |
| Only new posts | after = the newest id you already have, then next_after while it is set |
A monitor keeps the newest id per channel and asks only for what came after it:
import json
import pathlib
import time
import requests
HOST = "telegram-channel-scraper-posts-ai-digest.p.rapidapi.com"
API = f"https://{HOST}"
HEADERS = {"x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": HOST}
CHANNELS = ["telegram", "durov", "binance_announcements"]
STATE = pathlib.Path("last_ids.json")
def get(params: dict, attempts: int = 3) -> dict | None:
for attempt in range(attempts):
r = requests.get(
f"{API}/v1/telegram/posts", headers=HEADERS, params=params, timeout=60
)
if r.status_code == 503: # Telegram busy: not billed, retry
time.sleep(10 * (attempt + 1))
continue
if r.status_code in (400, 404): # not a readable channel: not billed
print(params["channel"], r.json()["error"]["code"])
return None
r.raise_for_status() # 429: the plan's daily limit
return r.json()
return None
last_ids = json.loads(STATE.read_text()) if STATE.exists() else {}
for channel in CHANNELS:
params = {"channel": channel, "limit": 100}
if channel in last_ids:
params["after"] = last_ids[channel]
else:
params["limit"] = 20 # first run: start from the latest posts
new = []
while (page := get(params)) is not None:
new += page["posts"]
if not page.get("next_after"):
break
params["after"] = page["next_after"]
for post in sorted(new, key=lambda p: p["id"]):
print(channel, post["url"], (post.get("text") or "")[:80])
if new:
last_ids[channel] = max(p["id"] for p in new)
STATE.write_text(json.dumps(last_ids))
Every call reads Telegram live, with a cache of one minute at most, so polling every few minutes is enough for alerts. A quiet channel costs 1 credit per check. For an archive, loop with before instead and stop at since.
AI digest of a channel, in your language
Raw posts answer "what was posted". A digest answers "what did this channel say this week", which is what an analyst or a newsletter needs, especially when the channel is in Russian, Persian or Arabic. GET /v1/telegram/digest reads 5 to 100 recent posts (30 by default) and writes a summary, the main topics with their posts, key facts with their source post, a sentiment score, and the links that matter, in the language you ask for.
response = requests.get(
f"{API}/v1/telegram/digest",
headers=HEADERS,
params={"channel": "habr_com", "posts": 30, "language": "English"},
timeout=120,
)
response.raise_for_status()
digest = response.json()
A real digest of Habr, a Russian-language tech channel, trimmed (4 topics, 8 facts and 3 links in full):
{
"language": "English",
"channel_language": "ru",
"summary": "The channel covers a wide range of technology-related topics, including AI advancements, hardware experiments, and software development. Recent posts discuss the integration of AI agents in various industries, retro gaming restoration, and technical challenges in hardware engineering. Additionally, the channel explores historical perspectives on technology and provides insights into current IT career trends.",
"topics": [
{
"name": "Artificial Intelligence",
"summary": "The channel explores the development, application, and ethical implications of AI agents and models in various fields.",
"post_ids": [70103, 70108, 70114, 70117, 70118, 70120, 70124, 70128, 70132]
}
],
"key_facts": [
{ "fact": "The tiny-voca-ru TTS model uses 21 MB of weights and 4.5 million parameters.", "post_id": 70103 },
{ "fact": "A Keurig coffee machine consumed 1 TB of traffic in ten days due to network scanning.", "post_id": 70104 },
{ "fact": "The Nomad drone can fly indefinitely by charging from high-voltage power lines.", "post_id": 70116 }
],
"sentiment": {
"label": "neutral",
"score": 0.0,
"rationale": "The content is informative and technical, focusing on reporting news, project updates, and historical analysis without expressing strong emotional bias."
},
"important_links": [
{
"url": "https://habr.com/ru/articles/1111910/",
"why": "Technical details on the Nomad drone charging system.",
"post_id": 70116
}
],
"stats": {
"posts": 30,
"posts_read": 30,
"first_date": "2026-11-23T18:02:37+00:00",
"last_date": "2026-11-27T06:02:31+00:00",
"posts_per_day": 8.6,
"average_views": 13125,
"total_reactions": 2234,
"with_media": 30,
"top_posts": [{ "id": 70104, "url": "https://t.me/habr_com/70104", "views": 17200, "reactions": 138 }]
},
"credits": 30
}
The call took about 6 seconds. Every fact carries a post_id, so a reader who doubts "1 TB in ten days" opens t.me/habr_com/70104 and checks the source.
How the digest stays tied to the posts
A summary of a channel is only useful if it can be verified, so the service checks the model's answer before returning it:
- Post ids are checked. A topic or fact citing a post that is not in the window loses that id.
- Links are checked. An important link that does not appear in any post is removed.
- Contact details are filtered. E-mail addresses and phone numbers are removed from what the AI writes.
- Statistics are computed, not generated.
stats(posts per day, average views, reactions, top posts) comes from the posts themselves, without AI. - Posts are untrusted input. They are delimited in the prompt and the model is told never to follow instructions found in them.
Add q= to digest only the posts matching a search: "what did a crypto news channel say about Bitcoin this week, in Spanish?" is one call. The digest costs 30 credits whatever the number of posts, because the input is capped (about 36,000 characters, shared between posts; posts_read says how many fitted).
Run it without code on Apify
The same engine runs as an Apify Actor, Telegram Channel Scraper - Posts, Search & AI Digest. Paste channel names, set the number of posts per channel, optionally a keyword and a start date, and switch on the digest. Posts, profiles and digests land in one dataset with a view for each, ready for CSV, Excel or Google Sheets. Pricing is $0.0004 per post, $0.0008 per channel profile and $0.015 per AI digest; channels that cannot be read are free, and the Apify free plan covers 100 posts and 1 digest per run.
What it costs
1 credit per profile, per single post, and per 20 posts returned (1 minimum); 30 credits per digest. Failed calls (4xx, 5xx) use no credits.
| Plan | Price per month | Credits | In practice |
|---|---|---|---|
| BASIC | Free | 40 per day | 1 digest and 10 calls a day |
| PRO | $4.99 | 10,000 | about $0.0005 per call of 20 posts, $0.015 per digest |
| ULTRA | $14.99 | 30,000 | 30,000 calls or 1,000 digests |
| MEGA | $49.99 | 100,000 | 100,000 calls or 3,333 digests |
Beyond the monthly quota, paid plans continue at $0.005 per credit. For comparison, the most-subscribed Telegram API on the RapidAPI Hub in our market survey charges $7 for 7,000 requests ($0.001 each), and none of the leading listings sells a digest.
What the Telegram channel scraper API does not do
- Public channels only. Private channels, invite links (
t.me/+...), groups, bots and personal accounts cannot be read; each gets its own error code (private_channel,not_a_channel,channel_not_found), unbilled. - No comments, member lists or reactions by user. None of these is on the public preview.
- No global search. Search runs inside one channel at a time.
- Preview turned off means profile only. For such a channel,
/channelworks and returnspreview_available: false; posts return400 preview_unavailable. - Custom emoji as ids. Custom reactions come as
custom_emoji_id, without the picture. - Temporary media links. CDN links expire; store the files you need.
- Upstream limits. When Telegram slows down or refuses requests, calls return
503 source_unavailable, unbilled, to retry.
Frequently asked questions
Can I scrape a Telegram channel without a Telegram account?
For public channels, yes. Telegram publishes a web preview of every public channel at t.me/s/<name>, and this API reads it, so no account, phone number or api_id is involved. Private channels and groups require membership and cannot be read this way.
How do I get the exact subscriber count of a Telegram channel?
The preview shows a rounded figure ("9.88M"). GET /v1/telegram/channel also reads the channel's profile page and returns the exact count with subscribers_exact: true, as in the 9,046,633 subscribers of Telegram's official channel above.
How do I monitor a Telegram channel for new posts?
Store the newest post id you have, call /v1/telegram/posts with after set to it, and follow next_after while it is present. A check with no new post costs 1 credit, and results are at most one minute old.
Can I scrape Telegram comments or group messages?
No. Comments and group chats are not part of the public channel preview, so this API cannot return them.
Can the AI digest translate a channel?
It summarises rather than translates: the digest is written in the language you choose, whatever the channel's language, and channel_language reports the language of the posts. For a word-for-word reading, open the cited posts.
Get started
Telegram Channel Scraper API
Public Telegram channels as JSON: posts, views, reactions, media, search and an AI digest.
- Telegram
- Web Scraping
- OSINT
- Python
- LLM


