Telegram Channel Messages Scraper avatar

Telegram Channel Messages Scraper

Pricing

from $0.17 / 1,000 item extracteds

Go to Apify Store
Telegram Channel Messages Scraper

Telegram Channel Messages Scraper

Export public Telegram channel history with message IDs, text, timestamps, engagement, authors, forwarding context, links, and media metadata for monitoring and OSINT archives.

Pricing

from $0.17 / 1,000 item extracteds

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

5 days ago

Last modified

Categories

Share

Export telegram channel messages from anonymous public t.me previews into a structured Apify dataset.

The Actor accepts channel usernames, @handles, and public t.me URLs.

It follows Telegram's public archive pagination and returns message IDs, text, timestamps, engagement counters, authors, forwarding context, links, reactions when visible, and media metadata.

Use it for scheduled monitoring, OSINT archives, research snapshots, and data pipelines without a Telegram account.

What does Telegram Channel Messages Scraper do?

The Actor reads server-rendered public channel archive pages at t.me/s/<channel>.

It normalizes every visible message into one stable record.

Each record has a channel handle and message ID that can be used as a durable comparison key.

Results can be ordered oldest-first for archives or newest-first for monitoring.

Optional date bounds narrow the accepted records.

The Actor does not join channels, log in, or access private Telegram data.

Who is it for?

OSINT researchers can preserve timestamped public statements and source links.

Media monitors can collect recent public channel posts on a schedule.

Data analysts can export message history to CSV, Excel, JSON, or BI tools.

Developers can feed public messages into search, classification, or alert pipelines.

Compliance teams can retain reproducible public-source snapshots subject to their own legal policies.

Choose Telegram Info Scraper when you only need profile or channel metadata.

Choose Telegram Media Downloader when downloading public media files is the primary job.

Why use this Actor?

  • No Telegram login or API credentials are required.
  • Public channel usernames and URLs share one input contract.
  • Archive pagination is bounded and deduplicated by message ID.
  • Output includes both plain text and optional sanitized message HTML.
  • Media URLs and structured media metadata are included when Telegram exposes them.
  • Date filters and sort order support repeat monitoring workflows.
  • Invalid private or invite links fail clearly instead of producing misleading empty data.
  • A 256 MB HTTP implementation avoids browser overhead.

What data can you extract?

FieldMeaning
channelHandlePublic channel username without @
channelTitleVisible channel title
channelUrlCanonical channel URL
channelPhotoUrlPublic channel image URL when exposed
messageIdStable message ID within the channel
messageUrlCanonical public message URL
publishedAtTelegram publication timestamp
textPlain-text message body
htmlOptional sanitized body HTML
viewsVisible view count
forwardsVisible forward count
repliesVisible reply/comment count
commentsUrlPublic comments link when exposed
authorName, authorUrlVisible message author context
isForwardedWhether Telegram marks the message as forwarded
forwardedFromName, forwardedFromUrlVisible original-source context
reactionsVisible emoji reaction counts
mediaTyped photo, video, audio, document, or voice metadata
mediaUrlsDirect media URLs for convenient export
linksUnique non-media links in the widget
scrapedAtExtraction timestamp

Optional Telegram fields are returned as null or empty arrays when they are not visible in the public web preview.

How to scrape public Telegram channel history

  1. Open the Actor in Apify Console.
  2. Add one or more public channels such as telegram, @durov, or https://t.me/s/telegram.
  3. Set maxMessages to the total number of records you need.
  4. Increase maxPagesPerChannel only when you need deeper history.
  5. Optionally add minDate or maxDate in ISO 8601 format.
  6. Choose oldest-first for an archive or newest-first for monitoring.
  7. Click Start.
  8. Open the Dataset tab to inspect, download, or integrate the records.

A small first run is recommended before collecting deep history from many channels.

Input parameters

channels

An array of public usernames, @handles, or t.me channel/post URLs.

Example: ["telegram", "@durov"].

Up to 100 channel inputs are accepted in one run.

startUrls

Apify request-list style public t.me URLs.

Use this field when another Actor or integration already emits URL objects.

maxMessages

Maximum records saved across all channels.

The default is 100 and the hard maximum is 10,000.

maxPagesPerChannel

Maximum archive pages requested for each channel.

One page normally exposes around 20 messages.

The default is 10 and the hard maximum is 250.

minDate and maxDate

Optional inclusive ISO 8601 date bounds.

Example: 2025-01-01T00:00:00Z.

sortOrder

Use oldestFirst for chronological archives.

Use newestFirst for recent-message review and monitoring.

includeHtml

Set to true to include Telegram's message-body HTML in addition to plain text.

Example input

{
"channels": ["telegram", "durov"],
"maxMessages": 40,
"maxPagesPerChannel": 3,
"sortOrder": "oldestFirst",
"includeHtml": false
}

For a recurring monitor, schedule the Actor and compare channelHandle/messageId keys with the previous dataset.

Example output

{
"channelHandle": "samplechannel",
"channelTitle": "Sample Channel",
"channelUrl": "https://t.me/samplechannel",
"messageId": 1234,
"messageUrl": "https://t.me/samplechannel/1234",
"publishedAt": "2025-01-15T12:00:00+00:00",
"text": "This is an example public update.",
"views": 12500,
"forwards": 45,
"replies": 12,
"authorName": "Sample Channel",
"isForwarded": false,
"reactions": [],
"media": [],
"mediaUrls": [],
"links": ["https://example.org/report"],
"scrapedAt": "2025-01-15T12:05:00.000Z"
}

The exact optional fields depend on what Telegram exposes for that message.

How much does it cost to scrape Telegram channel messages?

The Actor uses pay-per-event pricing.

Each run has a $0.005 start fee.

Each saved message is charged under the item event.

The current per-message tiers are:

PlanPrice per message
Free$0.00032612
Bronze$0.00028358
Silver$0.00022120
Gold$0.00017015
Platinum$0.00011343
Diamond$0.000079404

At the Bronze tier, 100 messages cost about $0.03336 including the start fee.

At the Bronze tier, 1,000 messages cost about $0.28858 including the start fee.

Only accepted dataset messages incur the item event; rejected, duplicate, or filtered records do not.

Apify platform pricing and plan rules can affect the final billed total.

Scheduled monitoring workflow

Create an Apify Schedule with a small newest-first limit.

Keep the resulting dataset or export it to your database.

Use channelHandle plus messageId as the unique key.

Compare the current run with the previous run to identify newly visible messages.

Use a webhook to trigger Slack, email, a queue, or your own endpoint after successful runs.

The Actor exports snapshots; it does not itself send alerts or maintain a cross-run change ledger.

Export and integration options

Download the dataset as JSON, JSONL, CSV, Excel, XML, or RSS from Apify Console.

Connect Apify to Google Sheets for analyst review.

Send records to Make, Zapier, n8n, or a webhook.

Use the Dataset API for incremental ingestion into a data warehouse.

Store canonical messageUrl values with your analysis so reviewers can return to the public source.

Media CDN links may expire, so downstream systems should not treat them as permanent file storage.

Run with the Apify API

cURL

curl -X POST \
"https://api.apify.com/v2/acts/automation-lab~telegram-public-channel-history-scraper/runs?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channels":["telegram"],"maxMessages":20,"sortOrder":"newestFirst"}'

JavaScript

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/telegram-public-channel-history-scraper').call({
channels: ['telegram'],
maxMessages: 20,
sortOrder: 'newestFirst',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/telegram-public-channel-history-scraper').call(
run_input={'channels': ['telegram'], 'maxMessages': 20, 'sortOrder': 'newestFirst'}
)
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Never put an Apify token in source control.

Use with MCP and AI agents

Add the Apify MCP server to Claude Code:

claude mcp add --transport http apify \
"https://mcp.apify.com?tools=automation-lab/telegram-public-channel-history-scraper"

Claude Desktop

Add this JSON to Claude Desktop's MCP configuration:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/telegram-public-channel-history-scraper"
}
}
}

Cursor

Add the same apify server URL in Cursor Settings → Tools & MCP → New MCP Server.

VS Code

Add the same HTTP MCP server URL to your VS Code MCP configuration, then enable the automation-lab/telegram-public-channel-history-scraper tool.

Example prompt: “Collect the 20 newest public messages from the Telegram channel and summarize recurring product themes with source URLs.”

Example prompt: “Archive up to 100 public messages from these two channel URLs in chronological order and return the dataset link.”

AI-generated interpretations should preserve message URLs and publication timestamps for source review.

Limits and expected behavior

Only anonymous public Telegram web previews are supported.

Private channels, invite links, /c/ links, login-only messages, and deleted posts are unavailable.

Telegram may expose only part of a channel's history through its public pagination.

Reactions, forwards, replies, authors, or media fields may be absent on individual messages.

The default implementation uses direct HTTP and does not expose an automatic residential proxy fallback.

A source layout change can require a parser update.

Very broad date ranges still require pagination; date filters do not create a Telegram server-side search.

Messages are deduplicated within a run, not across separate runs.

Reliability and troubleshooting

The run says the channel is invalid.

Use a public username or https://t.me/s/<username> URL, not an invite or private link.

The channel has no output.

Confirm that its public web preview is visible in a logged-out browser and check the date range.

I received fewer records than requested.

Increase maxPagesPerChannel, remove restrictive date bounds, and verify that Telegram exposes older pages publicly.

A media URL no longer works.

Telegram CDN links are source URLs, not durable storage. Process permitted media soon after extraction.

A run fails with an upstream HTTP error.

Retry later after checking Telegram's public page. The Actor automatically retries transient network failures twice.

Inspect the run log for the channel and page that failed before changing limits.

Responsible use and legality

Use the Actor only for public data you are authorized to collect and process.

Follow Telegram's terms, Apify's terms, copyright rules, privacy law, and applicable data-retention requirements.

Do not use the output for harassment, unlawful surveillance, discrimination, doxxing, or attempts to identify protected people.

Minimize collection, retain source context, secure exported datasets, and delete data when it is no longer needed.

The Actor does not bypass access controls or grant rights to reuse message text or media.

You are responsible for the purpose, legal basis, and downstream use of each run.

Combine discovery, metadata, and message-history Actors only when each additional dataset is necessary for your workflow.

FAQ

Does this Actor require a Telegram account?

No. It reads anonymous public web previews.

Can it scrape private channels or groups?

No. Private, invite-only, joined-account, and login-gated content is intentionally unsupported.

Does it download media files?

No. It exports media metadata and public URLs when exposed. Use Telegram Media Downloader for a file-download workflow.

Can I scrape one direct post URL?

Yes. A public post URL is normalized to its channel archive; the Actor returns channel history subject to your limits and filters.

Are results real-time?

Results reflect what Telegram exposes when each page is fetched. Scheduled runs provide periodic snapshots, not a live stream.

How do I avoid duplicate records in my database?

Use the combination of channelHandle and messageId as the unique key.

Why are some counters null?

Telegram does not expose every engagement field on every public message widget.

What output order should I use?

Use oldest-first for archival imports and newest-first for review or monitoring.