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

Scrape messages from any public Telegram channel - text, view counts, forward info, media links, post dates and channel stats. No login, no phone number, no API keys required.

- **URL**: https://apify.com/mrdoe/telegram-channel-scraper.md
- **Developed by:** [MrDoe](https://apify.com/mrdoe) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 message scrapeds

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

![Telegram Channel Scraper](https://api.apify.com/v2/key-value-stores/ZufoLXRwZJKRdXU7w/records/telegram-channel-scraper--hero.png)

## Telegram Channel Scraper

**Scrape messages from any public Telegram channel — text, view counts, forward info, media links, post dates and channel stats.** Give it a channel username or link and get one clean row per message, with no Telegram account, phone number, or API keys required.

This Actor is a **Telegram channel scraper**, a **Telegram message exporter**, and a **Telegram channel monitor** rolled into one.

### At a glance

- **Input:** one or more Telegram channel usernames or `t.me` links.
- **Output:** one row per message — text, views, post date, forwards, media links and channel info.
- **History:** walks back through a channel's full message history up to your `maxResults`.
- **Login:** none required — no account, no phone number, no cookies, no API credentials.
- **Runs on:** the Apify platform — schedule it, call it via API, or wire it into Make/Zapier/Google Sheets.

### What does the Telegram Channel Scraper do?

Give it a **channel username or link** and it returns that channel's messages, newest first, walking back through its history as far as you need. Every message becomes one clean dataset row, along with the channel's own name, avatar and subscriber count.

![How the Telegram Channel Scraper reads a channel](https://api.apify.com/v2/key-value-stores/ZufoLXRwZJKRdXU7w/records/telegram-channel-scraper--channel-input.png)

Everything visible in a channel becomes a dataset field:

| In the channel                    | Dataset field                                          |
| ---------------------------------- | ------------------------------------------------------- |
| The message text                   | `text`                                                   |
| View count                         | `viewsCount`                                             |
| "Forwarded from ..."                | `forwardedFromName`, `forwardedFromUrl`                  |
| Post date/time                     | `postedAt` (`YYYY-MM-DD HH:mm`)                          |
| Attached photo/video/file          | `mediaType`, `mediaUrls`                                 |
| Channel name, avatar, subscribers  | `channel.title`, `channel.avatarUrl`, `channel.subscribersCount` |
| The message link                   | `url`, `messageId`                                       |

### Why use this Telegram scraper?

- **Full message history, on demand** — walk back through a public channel's posts as far as `maxResults` allows, no manual scrolling.
- **Engagement at a glance** — view counts on every message, so you can spot what actually landed.
- **Track reposts and reach** — `forwardedFromName`/`forwardedFromUrl` show when a message originated elsewhere.
- **Media without opening the app** — direct links to each message's photo(s) and video(s).
- **Channel stats included** — title, avatar and subscriber count come back with every message, no separate lookup.
- **No login** — no account, no phone number, nothing to connect and nothing to get banned or verified.
- **Standard exports** — JSON, CSV, Excel, XML, or the Apify API.

### What makes this Actor different?

Most Telegram scraping tools need a phone number, an `api_id`/`api_hash` from my.telegram.org, or a logged-in client session — all fragile and all tied to a real Telegram account that can get flagged. This one reads Telegram's own public channel data with **zero credentials**, works identically for any public channel, and handles pagination and rate limiting for you.

### How it works

![How the Telegram Channel Scraper works](https://api.apify.com/v2/key-value-stores/ZufoLXRwZJKRdXU7w/records/telegram-channel-scraper--how-it-works.png)

1. **Your input** — one or more channel usernames or links.
2. **The Actor reads it** — it handles everything between your input and clean results: no login, rate-limit handling, retries, and paging back through history up to your `maxResults`.
3. **Output** — a dataset row per message with its stats, media links and channel info.

### What data you get

| Field                 | Description                                                                                          |
| ---------------------- | ------------------------------------------------------------------------------------------------------ |
| `url`                  | Direct link to the message                                                                            |
| `messageId`            | The message's numeric ID within the channel                                                           |
| `text`                 | Full message text, with line breaks preserved                                                         |
| `postedAt`             | Publish time, `YYYY-MM-DD HH:mm` (UTC)                                                                 |
| `viewsCount`           | View count                                                                                             |
| `forwardedFromName`    | Name of the original channel/source, if this message was forwarded — otherwise `null`                 |
| `forwardedFromUrl`     | Link to the original forwarded message, if present — otherwise `null`                                 |
| `mediaType`            | `photo`, `video`, `document`, `voice`, `video_note`, `sticker`, `poll`, or `null` if the message is text-only |
| `mediaUrls`            | Direct link(s) to the message's photo(s)/video(s), when the preview page exposes one                  |
| `channel.username`     | The channel's handle                                                                                   |
| `channel.title`        | The channel's display name                                                                             |
| `channel.avatarUrl`    | The channel's avatar image                                                                             |
| `channel.subscribersCount` | Subscriber count at the time of the run                                                            |

![Clean, spreadsheet-friendly output fields](https://api.apify.com/v2/key-value-stores/ZufoLXRwZJKRdXU7w/records/telegram-channel-scraper--clean-fields.png)

### Input parameters

| Parameter            | Type    | Required | Default | Description                                                                                                    |
| --------------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| `channels`            | Array   | Yes      | –       | Channel usernames or links, e.g. `"telegram"`, `"@telegram"`, or `"https://t.me/telegram"`.                    |
| `maxResults`          | Integer | No       | `50`    | Stop after this many messages **per channel**. Raise it for a full history export.                             |
| `proxyConfiguration`  | Object  | No       | Apify Proxy | Optional. Helpful for large exports or many channels in one run.                                          |

### Example output

![Telegram channel dataset output](https://api.apify.com/v2/key-value-stores/ZufoLXRwZJKRdXU7w/records/telegram-channel-scraper--output.png)

```json
{
    "url": "https://t.me/telegram/450",
    "messageId": 450,
    "text": "Rich Text Editor. You can now create articles and long posts in a visual editor...",
    "postedAt": "2026-07-19 17:57",
    "viewsCount": 1170000,
    "forwardedFromName": null,
    "forwardedFromUrl": null,
    "mediaType": "video",
    "mediaUrls": ["https://cdn1.telesco.pe/file/9998a6a814.mp4?token=..."],
    "channel": {
        "username": "telegram",
        "title": "Telegram News",
        "avatarUrl": "https://cdn1.telesco.pe/file/dL7Lf1VcA...jpg",
        "subscribersCount": 9570000
    }
}
```

### How to use the Telegram Channel Scraper

1. Open the Actor.
2. Add one or more **`channels`** — a bare handle, `@handle`, or full `t.me` link all work.
3. Set **`maxResults`** (per channel).
4. Press **Start**.
5. Read the rows in the **Dataset** tab (export JSON / CSV / Excel / XML).

### Usage examples

**Pull a channel's latest posts**

```json
{ "channels": ["telegram"], "maxResults": 30 }
```

**Track several news channels at once**

```json
{ "channels": ["bbcnews", "cnnbrk", "@telegram"], "maxResults": 20 }
```

**Export a channel's full history**

```json
{ "channels": ["durov"], "maxResults": 1000 }
```

### Tips for best results

- **`maxResults` is per channel**, not per run — 3 channels at `maxResults: 20` can return up to 60 rows.
- **Only public channels work.** If a channel has no `t.me` link (private groups, private channels), there's nothing for this Actor — or any logged-out tool — to read.
- **Schedule it** on the same channels and diff `viewsCount` between runs to track how posts perform over time.
- **`mediaUrls` links can expire** — download promptly if you need to keep the files.
- **A row is a snapshot at collection time** — view counts keep moving after you scrape.

### Limitations

- **Public channels only.** Private channels, private groups, and channels without a `t.me` link return no data.
- Very old messages in a large channel may take a few extra pages to reach — raise `maxResults` accordingly.
- View counts are Telegram's own displayed figures (sometimes rounded, e.g. "1.4M") and are converted to plain numbers.
- A message's forward/media info reflects what Telegram's public page exposes; some document types don't expose a direct file URL without opening the app.

### Export formats & integrations

Export the dataset as **JSON, CSV, Excel, or XML** from the Dataset tab or the Apify API. Connect results to Google Sheets, Make, Zapier, Slack, or your own systems via the API and webhooks, and schedule runs to build a channel-activity history.

### Frequently asked questions

**Do I need a Telegram account or API keys to use this?**

No. It works fully logged out — no account, no phone number, no `api_id`/`api_hash` from my.telegram.org.

**Can I scrape a private channel or group?**

No. Only public channels (the ones with a shareable `t.me/<channel>` link) can be read without an account. Private channels and groups aren't accessible logged-out by design.

**How far back can it go?**

As far as `maxResults` allows — the Actor walks back through the channel's full message history page by page.

**What counts as a "message"?**

Each individual post in the channel, including text-only posts, media posts, and forwarded posts. A photo/video album posted as one message returns as a single row with multiple `mediaUrls`.

**Why did a run return nothing?**

Usually the channel name is wrong, or the channel is private/nonexistent/has disabled its public preview. Double-check the handle and that the channel is genuinely public.

**Are the view counts exact?**

They match what Telegram itself displays, which is rounded for large numbers (e.g. "1.4M" becomes `1400000`). Small counts are exact.

**Is this against Telegram's rules?**

The Actor only reads Telegram's own public channel preview, the same page anyone can open in a browser without logging in. You are responsible for how you use the data — see below.

### Related scrapers

Building a social-media data pipeline? These pair well with this Actor:

- [Instagram Reel & Audio Scraper](https://apify.com/mrdoe/instagram-reel-and-audio-scraper-trending-sound-finder) — Reels by sound or by profile, with optional video/audio download.
- [TikTok Scraper](https://apify.com/mrdoe/tiktok-scraper) — profile videos with views, likes, comments and audio/video download.
- [YouTube Video Downloader](https://apify.com/mrdoe/youtube-video-downloader) — videos, Shorts, playlists and whole channels as MP4/MP3.
- [Facebook Marketplace Scraper](https://apify.com/mrdoe/facebook-marketplace-scraper) — listings, prices and locations, no login.

### Support

Found a bug or need another field exposed? Open an issue on the Actor's **Issues** tab in the Apify Console.

### Legal / responsible use

This Actor collects publicly available Telegram channel data — the same content anyone can view without logging in. It does not access private channels, groups, or any account. You are responsible for how you use the Actor and its output, including compliance with Telegram's Terms of Service, copyright in any content you collect, and the data-protection laws that apply to you (GDPR, CCPA, and others).

# Actor input Schema

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

Public Telegram channels to scrape. A bare handle ("telegram"), an "@handle", or a full link ("https://t.me/telegram") all work. Only public channels (ones with a t.me link) can be scraped.

## `maxResults` (type: `integer`):

Stop scraping a given channel once this many messages have been collected for it, walking back through its history as needed.

## `proxyConfiguration` (type: `object`):

Optional. A proxy is recommended for large exports or when scraping many channels in one run.

## Actor input object example

```json
{
  "channels": [
    "telegram"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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": [
        "telegram"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrdoe/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": ["telegram"] }

# Run the Actor and wait for it to finish
run = client.actor("mrdoe/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": [
    "telegram"
  ]
}' |
apify call mrdoe/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrdoe/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/IH6GODfsHJ7ODejQ5/builds/NCbwKhfSqjh4qhkqG/openapi.json
