Scraper APITelegram
telegram.channel_posts
The posts of a public Telegram channel, newest first: text, links, photos and videos, views, reactions and time. Pages back through the channel's history.
- Id
telegram.channel_posts- Version
- 1
- Billed per
- record — 1 unit for each record of a charged run
- Runs
- within one request
Start it with POST /v1/scrapers/telegram.channel_posts/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.
Inputs
The fields of input. A field that is not listed here is refused.
| Field | Type | Description |
|---|---|---|
channelrequired | string | The public channel's name, e.g. durov or @durov, or its address (https://t.me/durov).Limit: at most 200 characters. |
max_posts | integer | How many posts to return, newest first: 1 to 200.Limit: 1 to 200. Default: 20. |
before | integer | Return only posts older than the post with this number. To continue an earlier run, pass the number of the oldest post it returned.Limit: 2 to 2000000000. |
query | string | Return only the channel's posts that contain these words.Limit: at least 1 characters, at most 200 characters. |
Record fields
Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.
| Field | Type | Notes |
|---|---|---|
id | integer | The post's number in its channel. |
channel | string | The channel's name, without the @. |
url | string | The post's address. |
text | string or null | The post's text as written, line breaks kept. Null for a post without text. |
links | array of string | The addresses the text links to, in order, without repeats. |
created_at | string (date-time) or null | When the post was published, in UTC. |
edited | boolean | True when the channel edited the post after publishing it.Default: false. |
view_count | integer or null | Number of views. Telegram prints large counts rounded: 77.2K is returned as 77200. |
author_signature | string or null | The name the post is signed with, on channels that sign their posts. |
forwarded | boolean | True when the post was forwarded from somewhere else.Default: false. |
forwarded_from | string or null | The name of the channel or person a forwarded post came from; null when Telegram's page does not name it. |
forwarded_from_author | string or null | The name the original post was signed with, when the page shows one. |
forwarded_from_url | string or null | The address of the original post or channel, when Telegram links it. |
reply_to_post_id | integer or null | The number of the post in the same channel this one replies to, when it replies to one. |
media | array of object | The post's photos, videos and files, in order. An album's items are all here. |
type (in media[]) | "photo" | "video" | "voice" | "audio" | "document" | photo, video, voice (a voice message), audio (a music or podcast file) or document (any other file). |
url (in media[]) | string or null | The photo, or the video or voice file. Null for a file Telegram's web preview does not serve: audio, documents and long videos. |
thumbnail_url (in media[]) | string or null | The still image shown for a video. |
duration_s (in media[]) | integer or null | Length of a video or voice message in seconds, when the page states it. |
title (in media[]) | string or null | The name of a file, or the title of an audio track. |
details (in media[]) | string or null | The line under a file's name: its size, or an audio track's performer. |
link_preview | object or null | The preview card of a link in the post, when it shows one. |
url (in link_preview) | string | The address the preview card leads to. |
site_name (in link_preview) | string or null | The site's name as the card shows it. |
title (in link_preview) | string or null | The card's title. |
description (in link_preview) | string or null | The card's text. |
image_url (in link_preview) | string or null | The card's image. |
reactions | array of object | The reactions under the post, in the order Telegram shows them. |
emoji (in reactions[]) | string or null | The reaction's emoji; a star for paid reactions. Null for a custom emoji. |
custom_emoji_id (in reactions[]) | string or null | Telegram's id of a custom emoji, when the reaction is one. |
count (in reactions[]) | integer | How many times it was given. Telegram prints large counts rounded (1.2K is returned as 1200). |
buttons | array of object | The link buttons under the post, in order. |
text (in buttons[]) | string | The button's label. |
url (in buttons[]) | string or null | Where the button leads. |
service_message | boolean | True for a notice Telegram writes itself, such as 'Channel created' or a pinned-post notice.Default: false. |
fetched_at | string (date-time) | When the page was read, in UTC. |
Example request
# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/telegram.channel_posts/runs?wait=60" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"channel":"telegram","max_posts":3}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("telegram.channel_posts", {
"channel": "telegram",
"max_posts": 3,
})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("telegram.channel_posts", {
channel: "telegram",
max_posts: 3,
});
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "telegram.channel_posts", map[string]any{"channel": "telegram", "max_posts": 3})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("telegram.channel_posts", Map.of("channel", "telegram", "max_posts", 3));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run telegram.channel_posts --input channel=telegram --input max_posts=3Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.
The body on its own:
{
"input": {
"channel": "telegram",
"max_posts": 3
}
}Example response
The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.
{
"id": "run_841742f37553189ff9c27ba1",
"scraper_id": "telegram.channel_posts",
"scraper_version": 1,
"status": "ok",
"reason": null,
"input": {
"channel": "telegram",
"max_posts": 3
},
"record_count": 1,
"units": 1,
"units_per_request": null,
"units_per_record": 1,
"units_per_page": null,
"diagnostics": {
"requests": 1,
"bytes": 259214,
"wall_ms": 885,
"facts": {}
},
"created_at": "2026-11-16T22:37:50.170950Z",
"started_at": "2026-11-16T22:37:50.178331Z",
"finished_at": "2026-11-16T22:37:51.066313Z"
}Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.
{
"records": [
{
"id": 460,
"channel": "telegram",
"url": "https://t.me/telegram/460",
"text": "For all the info from today's update and a look back at 13 years of Telegram features — check out our blog:\nhttps://telegram.org/blog/welcome-messages-buttons-TG-13\n\nAugust Features\n1 • 2 • 3 • 4 • 5 • More",
"links": [
"https://telegram.org/blog/welcome-messages-buttons-TG-13",
"https://t.me/telegram/455",
"https://t.me/telegram/456"
],
"created_at": "2026-08-26T19:12:34Z",
"edited": false,
"view_count": 2630000,
"author_signature": null,
"forwarded": false,
"forwarded_from": null,
"forwarded_from_author": null,
"forwarded_from_url": null,
"reply_to_post_id": null,
"media": [],
"link_preview": {
"url": "https://telegram.org/blog/welcome-messages-buttons-TG-13",
"site_name": "Telegram",
"title": "Welcome Messages, Buttons in Messages and Signed Gifts",
"description": "Introducing Welcome Messages to greet new members of groups or channels, Buttons in Messages to make any text interactive, Inline Documents in Messages and much more.",
"image_url": "https://cdn4.telesco.pe/file/Dkzha6bOuWACw6lfAnFD_5Gw7RCWMBRsZmlf4M3Pa5s-B91xIf8HJ-77WAkB_cM_QbzU_HM6LbVdt5F8P6qlVLLsgvldrnisO7LU2ierVl71IyvV3YVIV7jw4t9peznsnbpUKr2yxp_qpGO8dNqBgW6w7DZHJ6EBJJZ0DsGxS3l5yPD3yCBhuMWyxDfwMjFzZzaQ8Zjhh8eQI-izHU1bpnxWILGPhYgc_kg2-pdm8GjKi7VX7_3kBbVOOmkcCwBS0UNZjXP2Iq-7ZqUdmm70H2LatZgDoYVqr2S9b7PEL5XhgbLTrSXnhBa1lpN-1H029p5s9h-FKNgAUyNTlAKn4g.jpg"
},
"reactions": [],
"buttons": [],
"service_message": false,
"fetched_at": "2026-11-19T18:07:41.397508Z"
}
],
"next_cursor": null
}What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].
- Shortened:
links: 6 items, the first 3 shown.
A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the Telegram scrapers are in their own section there.