Telegram Scraper avatar

Telegram Scraper

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Telegram Scraper

Telegram Scraper

Seamlessly extract public messages from any Telegram public channel and gain valuable insights. Perfect for researchers, marketers, and data analysts.

Pricing

from $1.00 / 1,000 results

Rating

4.6

(7)

Developer

codemaster devops

codemaster devops

Maintained by Community

Actor stats

30

Bookmarked

1.1K

Total users

5

Monthly active users

5 days ago

Last modified

Features

Limited permissions

Share

Telegram Channel Scraper

Collect public Telegram channel posts into an Apify dataset for channel monitoring, content research, and news tracking. No Telegram API ID, phone number, or login is needed. Private channels, member lists, and app-only content are outside the Actor's scope.

Run on Apify

Use this repository as the Actor's Git source. Apify reads .actor/actor.json, its input/output schemas, and .actor/Dockerfile. The container uses Node 22 and installs the committed dependency lockfile with npm ci.

{
"channels": ["mediumcom", "https://t.me/telegram"],
"maxPostsPerChannel": 10,
"includeComments": false,
"maxListingPagesPerChannel": 100,
"proxy": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

Usernames, @handles, and public t.me URLs are accepted. Channel names are normalized and deduplicated without regard to case. The default proxy configuration uses Apify residential proxies; availability and charges depend on your Apify plan. Custom proxy URLs are also supported. For a small local connectivity check, {"useApifyProxy": false} disables proxies; Telegram may block direct requests.

Inputs

InputDefaultMeaning
channelsRequired1–100 public channel usernames or URLs
maxPostsPerChannel101–2000 matching posts per channel
usePostIdRangefalseEnable inclusive post ID bounds
postsFrom1Inclusive minimum ID when range mode is enabled
postsTo0Inclusive maximum ID; 0 or omitted means no upper bound
fromDate, toDateUnsetInclusive ISO dates or timestamps with timezone
includeCommentsfalseAttempt the public discussion widget for each selected post, even if its listing has no replies counter
maxCommentsPerPost100–1000 comments from the returned widget page; zero disables requests
maxListingPagesPerChannel1001–10000 listing pages, including pages with no matching posts
maxRequestsPerMinute60Global request rate, 1–600
maxConcurrency31–50 concurrent requests
minConcurrency1Minimum concurrency; must not exceed maximum
navigationTimeoutSecs120Per-navigation timeout, 1–300 seconds
requestTimeoutSecsUnsetDeprecated timeout alias; navigation timeout takes precedence
proxyResidentialApify SDK proxy configuration

ID endpoints are normalized if reversed. Date bounds must be ordered. Numeric strings are accepted for integer inputs, but fractions, unsafe IDs, booleans in numeric fields, and values outside the limits fail validation. Bare dates mean midnight UTC, including toDate; use an explicit end-of-day timestamp to include the entire final day.

{
"channels": ["telegram"],
"usePostIdRange": true,
"postsFrom": 400,
"postsTo": 450,
"fromDate": "2024-01-01T00:00:00Z",
"maxPostsPerChannel": 20
}

The Actor starts at the upper ID bound, or the latest public preview, and scans toward older IDs. It selects the newest matching IDs visible in those pages. Deleted, inaccessible, and unsupported empty posts are skipped. The limit is a maximum, not a promise of that many results. Filters do not cause an unbounded history scan: the page budget still applies. Concurrent discussion requests can change the order in which rows appear in the dataset.

Output

Each row represents one post, identified by (channelName, id):

{
"id": 450,
"channelName": "telegram",
"channelTitle": "Telegram",
"authorName": "Telegram",
"authorTelegram": "https://t.me/telegram",
"date": "2026-01-05T12:00:00+00:00",
"viewsCount": "1.2M",
"text": "Example public announcement",
"attachments": [
{ "type": "photo", "url": "https://cdn.example/image.jpg" }
]
}

Available fields also include channelDescription, subscribersText, repliedTo, forwardedTitle, forwardedFromUrl, linkPreview, reactions (emoji, numeric count, display count), commentsCount, and unsupportedReason. Optional fields are absent when Telegram does not expose them. Displayed views and subscribers remain strings. Media extraction supports public photo backgrounds, video/audio sources, and document links; a URL does not guarantee a downloadable original file. Message line breaks are preserved.

When comments are requested, rows may include comments, commentsCollected, and commentsStatus:

StatusMeaning
public_widget_onlyParsed the HTML returned by Telegram's public discussion widget
not_requestedComment limit was zero
failedDiscussion fetch or parsing exhausted retries; base post retained

Comment collection uses Telegram's discussion=1 widget. It excludes the original post and duplicate comment IDs. It does not paginate or authenticate into discussions; maxCommentsPerPost caps the returned page rather than guaranteeing that many comments. Empty widget results do not prove that the discussion has no comments. Hidden, private, and app-only replies are unavailable.

RUN_SUMMARY in the default key-value store contains per-channel selected/completed IDs, visited pages, stop reasons, and exhausted requests. Stop reasons include max_posts, lower_bound, max_listing_pages, no_public_posts, public_preview_unavailable, end_of_history, and request_failed. A normal Telegram contact/profile page with no public preview is skipped with a warning and public_preview_unavailable; it does not fail the other channels. A page-budget stop produces partial results with a warning. Unrecognized pages, blocked responses, and exhausted technical requests still cause the run to fail after recording its summary and available results, instead of silently reporting complete success.

Local development

Use Node 22 or later and the Apify CLI:

npm ci
npm test
npm run lint
apify validate-schema
apify run --input-file examples/basic-input.json

Local runs write only to storage/; they do not deploy or upload results to Apify Console. audit/smoke-input.json is a bounded direct-connect check with two posts and one listing page. On Windows, the legacy powershell.exe directory must be on PATH for Crawlee's local memory monitor.

Crawlee checkpoints serializable crawl state for migration and resurrection. Use apify run --resurrect to retain local storage. Dataset writes and state checkpoints are not one transaction: a crash between them can duplicate a row. Consumers needing exactly-once results should deduplicate by (channelName, id). Resume only with the same input; start a fresh run when changing filters or limits.

Maintenance and platform compatibility

The bytewells branch's Node 22 Docker image, lockfile installation, file ownership, clearer metadata, and example input apply to Apify and are incorporated here. Its removed tests/CI, older channel handling, and Bytewells billing text are not carried over. See audit/REPORT.md for the branch comparison and findings.

Dependencies are locked. Targeted basic-ftp and Crawlee minimatch overrides address transitive advisories that upstream dependency ranges have not yet resolved. Remove them when upstream ranges include patched versions, and rerun tests and HTTP/proxy checks when updating. CI tests Node 22 and 24 and checks production dependency advisories.

The branch has also been built and tested on a private Apify Actor with residential proxies: ten posts in about 22 seconds, and six posts plus thirty public comments in about 27 seconds. See audit/CLOUD_TEST.md. These are individual live runs; network latency and channel availability affect future timings. Production deployment is separate.

Respect the source site's terms and applicable data handling requirements. Collect only the public data needed for your use case. Avoid committing credentials, local storage, or exported datasets.

Support

Report the public channel, expected posts/fields, run ID, and sanitized input at Quick Life Solutions or Discord. Remove proxy credentials and tokens from reports.