# Telegram Channel Scraper (`parseforge/telegram-channel-scraper`) Actor

Scrape messages, media, and metadata from public Telegram channels by username or URL. Returns each message as a flat row with text, reactions, and media links. No API key needed.

- **URL**: https://apify.com/parseforge/telegram-channel-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Social media, News
- **Features:** Limited permissions
- **Stats:** 40 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $11.25 / 1,000 result items

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner-v4.webp)](https://apify.com/parseforge?fpr=vmoqkp)

### Telegram Channel Scraper

**Scrape messages, media, and metadata from any public Telegram channel, up to a million per run.** Every message comes with its full text, reactions, media links, and channel subscriber count. No Telegram API key or bot token required. Export to CSV, JSON, Excel, or XML.

Telegram's official API requires a developer account, an app registration, and a bot token, and it rate-limits you quickly. This Actor reads the public channel preview pages directly, so you can archive messages from any number of channels at once. Filter by date range, message type, or media presence, and get a flat row for every matching post.

| Who uses it | What they scrape Telegram for |
|---|---|
| OSINT analysts | Archiving a channel's full message history before it is deleted or made private. |
| Market researchers | Tracking product announcements, feature discussions, and sentiment in niche community channels. |
| Journalists | Collecting and verifying public statements and media shared in news and political channels. |
| Data scientists | Building a text corpus from channel discussions for NLP model training or trend analysis. |

### What it does

This Actor collects messages from public Telegram channels by username or URL and returns each one as a flat row with text, media links, reactions, and optional channel metadata.

- 📅 **Date-range filtering:** set a From and To date to capture only messages posted in a specific window.
- 📎 **Media-only mode:** skip text-only posts and return only messages that contain a photo, video, voice note, document, or sticker.
- 🏷️ **Message-type filtering:** restrict results to text, photos, videos, polls, forwarded messages, replies, and more.
- 📊 **Channel metadata:** optionally attach the channel title, description, subscriber count, and verified flag to every row.
- 🔗 **Link preview extraction:** capture the URL, site name, title, description, and image from any link preview card in a message.
- 📝 **Dual text output:** get both the plain-text and the HTML-formatted version of every message body.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Telegram data

**🗄️ Archive a channel before it disappears.**

An OSINT investigator feeds a list of at-risk Telegram channels and sets a high maxItems to capture the complete message history for offline storage.

**📈 Monitor competitor product launches.**

A market analyst scrapes a competitor's announcement channel weekly, filtering for photo and video messages to catch every new product reveal.

**📰 Collect public statements for a news story.**

A journalist scrapes a political figure's channel with a date filter set to the last 30 days to gather all recent public statements and attached media.

**🧠 Build a training dataset for a language model.**

A data scientist scrapes several discussion channels, keeping only text messages, to create a clean corpus for fine-tuning a domain-specific NLP model.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key** | Uses the public web preview, so you never register a bot or handle OAuth tokens. |
| **Multi-channel** | Scrape dozens of channels in a single run, with an optional per-channel message cap. |
| **Reactions included** | Every message can carry its full reactions array with emoji and counts. |
| **Fixed schema** | Every row has the same flat structure, ready for CSV, JSON, Excel, or XML export. |

### How it compares

This Actor focuses on scraping message content from public Telegram channels, while the alternatives below target member lists or general contact extraction from websites.

| Feature | ParseForge | Telegram Groups and Channel Member Scraper | Contact Details Scraper |
|---|---|---|---|
| Scrapes message text and media from channels | Yes | Not listed | Not listed |
| Filters by message type (photo, video, poll, etc.) | Yes | Not listed | Not listed |
| Includes reactions on messages | Yes | Not listed | Not listed |
| Extracts channel metadata (subscribers, description) | Yes | Not listed | Not listed |
| Scrapes member lists from groups | Not listed | Yes | Not listed |
| Extracts emails and phone numbers from websites | Not listed | Not listed | Yes |

### Configure the run

Drive the Actor from a list of channel usernames or URLs, and filters run as each message is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "channels": [
    "durov",
    "telegram"
  ],
  "maxItems": 10
}
```

A larger pull:

```json
{
  "channels": [
    "durov",
    "telegram"
  ],
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.015 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $1.50 |
| 1,000 results | $15.00 |
| 10,000 results | $150.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Telegram Channel Scraper](https://apify.com/parseforge/telegram-channel-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Telegram through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=parseforge/telegram-channel-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results for a channel?**

Check that the channel has a public preview enabled. Open its URL in an incognito browser window. If you cannot see the messages without logging in, the Actor cannot access them either.

**Why are some old messages missing?**

Telegram's public preview only shows a limited history for some channels. Very old messages may not be available through the web preview. Try setting a narrower date range to see what is reachable.

**The run is taking a long time. Is that normal?**

Yes, especially when scraping many channels or a high message count. The Actor respects Telegram's rate limits to avoid being blocked. You can reduce the maxItems or the number of channels to speed it up.

**Why do I see fewer messages than my maxItems setting?**

The channel may have fewer total messages than your maxItems value, or your date filter and message-type filters may be excluding many posts. Try widening the date range or clearing the message-type filter.

**Why are media URLs returning a 404 when I try to download them?**

Telegram media URLs can expire after some time. Download the files soon after the scrape completes. The Actor provides the direct URL as it appears at the time of scraping.

### FAQ

| Question | Answer |
|---|---|
| Do I need a Telegram API key or bot token? | No. This Actor reads the public web preview of channels, so you do not need to register an app, create a bot, or handle any API credentials. |
| Can I scrape private channels or groups? | No. The Actor can only access channels that have a public preview enabled. Private channels and groups are not accessible without a logged-in session. |
| How do I format the channel input? | You can use a plain username like `durov`, an @username like `@durov`, or a full URL such as `https://t.me/durov` or `https://t.me/s/durov`. |
| What message types can I filter on? | You can restrict results to text, photo, video, voice, document, sticker, poll, location, service messages, forwarded messages, or replies. |
| Does the Actor download the actual media files? | No. It returns the URLs to the media files. You can download the files separately using the URLs in the dataset. |
| How many messages can I scrape in one run? | You can set the maximum up to 1,000,000 messages per run. You can also set a per-channel cap to limit how many messages are taken from each channel. |
| Can I get the subscriber count of a channel? | Yes. Enable the 'Include Channel Metadata' option, and every message row will include the channel title, description, subscriber count, and verified flag. |
| What output formats are supported? | The Actor can export your dataset as CSV, JSON, Excel, or XML through the standard Apify output options. |
| Does it handle messages with link previews? | Yes. When you enable 'Include Link Preview', the Actor extracts the URL, site name, title, description, and image from any link preview card attached to a message. |
| Can I get both plain text and HTML for each message? | Yes. Set the Text Output Format to 'Both plain text and HTML', and each row will contain a text field and an html field. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Telegram Messenger Inc. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `channels` (type: `array`):

List of public Telegram channels to scrape. Accepts channel usernames (e.g. `durov`), `@usernames`, or full URLs (`https://t.me/durov` or `https://t.me/s/durov`). The channel must have a public preview enabled.

## `maxItems` (type: `integer`):

How many messages to collect per run.

## `maxItemsPerChannel` (type: `integer`):

Cap on messages scraped from any single channel. Useful when scraping many channels but you only want recent messages from each. Leave empty for no per-channel cap.

## `fromDate` (type: `string`):

Only return messages posted on or after this date (ISO 8601, e.g. `2025-01-01`). Leave empty to include the oldest available messages.

## `toDate` (type: `string`):

Only return messages posted on or before this date (ISO 8601, e.g. `2026-12-31`). Leave empty to include up to the most recent message.

## `messageTypes` (type: `array`):

Restrict to specific message types. Leave empty to include all types.

## `onlyWithMedia` (type: `boolean`):

Skip text-only messages. Returns only messages that include at least one photo, video, voice note, document, sticker, or animated GIF.

## `includeChannelMetadata` (type: `boolean`):

Include channel title, description, subscriber count, and verified flag on every message record. Adds one extra request per channel.

## `includeReactions` (type: `boolean`):

Include the reactions array (emoji and counts) on each message. Disable to keep records lighter.

## `includeLinkPreview` (type: `boolean`):

Include link preview metadata (URL, site name, title, description, image) when a message contains a preview card.

## `outputFormat` (type: `string`):

How to render the message body. `text` strips formatting; `html` keeps Telegram's HTML; `both` returns both fields.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "telegram"
  ],
  "maxItems": 10,
  "onlyWithMedia": false,
  "includeChannelMetadata": true,
  "includeReactions": true,
  "includeLinkPreview": true,
  "outputFormat": "both"
}
```

# Actor output Schema

## `overview` (type: `string`):

Table view with the most useful message fields (channel, message ID, date, text, type, views, reactions).

## `fullData` (type: `string`):

Complete dataset with every field, including media arrays and reactions.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "channels": [
        "durov",
        "telegram"
    ],
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/telegram-channel-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "channels": [
        "durov",
        "telegram",
    ],
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/telegram-channel-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "channels": [
    "durov",
    "telegram"
  ],
  "maxItems": 10
}' |
apify call parseforge/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/telegram-channel-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/d8j7pX3djK6PZZkJ4/builds/Umkv2wfHEXbnigy0z/openapi.json
