# Telegram Channel Scraper - Posts, Views & Reactions (`cprussin/telegram-channel-scraper`) Actor

Scrape public Telegram channel posts without login: text, date, views, emoji reactions, photos, videos, links, forwards, replies and channel subscriber counts. Date filter for incremental runs.

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

## Pricing

from $2.00 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## Telegram Channel Scraper - Posts, Views & Reactions

**Telegram Channel Scraper** exports posts from **public Telegram channels** to JSON, CSV or Excel: full text, date, **view count**, **emoji reactions**, photos and videos, links, hashtags, forwards and replies, plus each channel's **title, description and exact subscriber count**. It reads Telegram's public web preview (`t.me/s/<channel>`), so it needs **no login, no phone number, no API key and no Telegram account**.

- ✅ **No login.** Nothing to set up and no account at risk of a ban.
- ✅ **Engagement data:** views, every reaction with its count (including paid Star reactions), edited flag and author signature.
- ✅ **Media:** photo URLs, video URLs with thumbnails and durations, albums, audio, documents, link previews.
- ✅ **Context:** "forwarded from" (channel + original post), replies (quoted post + text), outbound links and hashtags.
- ✅ **Channel info:** title, description, exact subscriber count, profile photo, verified badge, photo/video/link counters.
- ✅ **Incremental runs.** Set `sinceDate` (e.g. `"24 hours"`) and the run stops at older posts, so scheduled runs only pay for new posts.
- ✅ **Pay per result, no start fee.** Missing, private or disabled channels cost nothing.

### Who uses Telegram channel data?

- **Brand and media monitoring**: track what news, crypto, finance or industry channels post, and how many people see it.
- **Market and crypto research**: collect signals, announcements and sentiment from project and trading channels.
- **Journalists and OSINT researchers**: archive public channel posts with permalinks and timestamps.
- **Marketers and agencies**: benchmark competitors' channels by views, reactions and posting frequency; vet channels before buying ads.
- **Data scientists and AI teams**: build datasets for sentiment analysis, topic modeling, translation or LLM summarization.

### How does the Telegram channel scraper work?

1. Add channels as usernames or links. All of these work: `durov`, `@durov`, `https://t.me/durov`, `https://t.me/s/durov`, `https://t.me/durov/528`.
2. The actor opens each channel's public web preview and pages backwards through its history (`?before=<post id>`), newest post first.
3. Each post is parsed into one clean dataset item. Requests are retried with backoff, rate limits (HTTP 429) are respected, and duplicates are removed.
4. Channels that can't be read (don't exist, are groups/users/bots, or have the web preview disabled) produce one **free** error item explaining why. The rest of the run continues.

### How do I choose which Telegram channels to scrape?

| Field                | Description                                                                                           | Example                          |
| -------------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------- |
| `channels`           | Public channel usernames or t.me links                                                                | `["durov", "https://t.me/tass"]` |
| `maxPostsPerChannel` | Stop after this many posts per channel (newest first)                                                 | `500`                            |
| `sinceDate`          | Only posts on or after this date: `YYYY-MM-DD`, ISO timestamp, or relative (`"24 hours"`, `"7 days"`) | `"7 days"`                       |
| `includeChannelInfo` | Add one channel-profile item per channel (default `true`)                                             | `true`                           |
| `proxyConfiguration` | Optional Apify Proxy for very large runs                                                              | `{ "useApifyProxy": true }`      |

Example: every post from the last week from three channels, with channel stats.

```json
{
  "channels": ["durov", "https://t.me/telegram", "@nytimes"],
  "sinceDate": "7 days",
  "maxPostsPerChannel": 1000,
  "includeChannelInfo": true
}
```

### What data do you get for each Telegram post?

Every item has a `type`: `post`, `channel` or `error`. The **Posts** and **Channels** tabs in the Output view show them as tables.

Post:

```json
{
  "type": "post",
  "channel": "durov_russia",
  "postId": 63,
  "date": "2025-11-22T17:22:48.000Z",
  "edited": false,
  "author": null,
  "text": "Папаха никогда не была просто шапкой. Это про то, откуда ты родом, про уважение и дисциплину. …",
  "views": 3260000,
  "reactions": [
    {
      "emoji": null,
      "customEmojiId": "5305565863728918192",
      "paid": false,
      "count": 32800
    },
    { "emoji": "🫡", "customEmojiId": null, "paid": false, "count": 9750 },
    { "emoji": "🏆", "customEmojiId": null, "paid": false, "count": 5440 }
  ],
  "media": [
    {
      "type": "video",
      "url": "https://cdn4.telesco.pe/file/a0973c48eb.mp4?token=…",
      "thumbnailUrl": "https://cdn4.telesco.pe/file/Xo1so….jpg",
      "duration": "0:56",
      "title": null
    }
  ],
  "linkPreview": null,
  "forwardedFrom": {
    "name": "Khabib Nurmagomedov",
    "url": "https://t.me/khabib_nurmagomedov/127",
    "channel": "khabib_nurmagomedov",
    "postId": 127
  },
  "replyTo": null,
  "links": [],
  "hashtags": [],
  "permalink": "https://t.me/durov_russia/63"
}
```

Channel info:

```json
{
  "type": "channel",
  "channel": "durov",
  "title": "Pavel Durov",
  "description": "Founder of Telegram.",
  "subscribers": 10579568,
  "photoUrl": "https://cdn4.telesco.pe/file/….jpg",
  "verified": true,
  "counters": { "photos": 102, "videos": 46, "links": 200 },
  "url": "https://t.me/durov"
}
```

Error (not charged):

```json
{
  "type": "error",
  "channel": "wallstreetbets",
  "errorCode": "notAChannel",
  "error": "@wallstreetbets is a group, not a channel. Only public channel posts can be scraped."
}
```

**Field notes**

- `date` is an ISO 8601 UTC timestamp. `postId` is the channel's message number; `permalink` opens the post in Telegram.
- `views` and reaction `count`s are what Telegram shows, so large numbers are rounded (`18.9M` becomes `18900000`). `subscribers` on the channel item is exact.
- `reactions`: standard reactions have an `emoji`. Custom (premium) emoji reactions only expose a `customEmojiId`. Paid Telegram Stars reactions have `paid: true`.
- `media[].type` is one of `photo`, `video`, `roundVideo`, `voice`, `audio`, `document`, `sticker`, `poll`, `location`. Photo and video URLs point to Telegram's CDN and **expire after a while**; download them soon if you need the files. Documents and audio link to the post, because the preview doesn't expose the file.
- `author` is the post signature, when the channel enables signatures.
- `text` is plain text with line breaks. Custom emoji appear as their standard fallback emoji.
- `errorCode`: `notFound`, `previewDisabled`, `notAChannel`, `invalidInput` or `failed`.

### How much does it cost to scrape Telegram channels?

Pay-per-event, only for what you get. No start fee.

| Event                                      | Price      |
| ------------------------------------------ | ---------- |
| Post (one post in the dataset)             | **$0.002** |
| Channel info (one per channel, if enabled) | **$0.001** |

That's **$2 per 1,000 posts**. Error items, duplicates and posts filtered out by `sinceDate` are free. If you set a **maximum cost per run**, the actor stops cleanly when it reaches it.

### Tips for scraping Telegram channels

- **Daily monitoring:** schedule the actor with `sinceDate: "24 hours"` and send new posts to Google Sheets, Slack, email or a webhook with Apify integrations.
- **Full history:** leave `sinceDate` empty and raise `maxPostsPerChannel`. The preview goes back to the channel's first post.
- **Only stats:** set `maxPostsPerChannel: 1` with `includeChannelInfo: true` to get subscriber counts for a list of channels cheaply.
- Very large runs (many thousands of pages) may hit Telegram rate limits. The actor backs off automatically; add Apify Proxy if it keeps happening.

### What are the limits of scraping Telegram?

- **Public channels only.** The actor reads what anyone can see at `t.me/s/<channel>` without logging in. It **cannot** read private channels, invite-only links (`t.me/+…`), groups, direct messages, or comments.
- Some channel owners disable the web preview. Those channels return a `previewDisabled` error item (free).
- Comments/discussion threads, poll results and exact view counts aren't available in the web preview.

### Telegram channel scraper FAQ

**Do I need a Telegram account, API ID or phone number?** No. The actor uses Telegram's public web preview, the same page you see when you open `https://t.me/s/durov` in a browser.

**Can it scrape private channels or groups?** No, and it never will. Only public channels with the web preview enabled are supported.

**How far back can it go?** Usually to the channel's first post. `maxPostsPerChannel` and `sinceDate` let you limit it.

**Can I use it through the API or with AI agents?** Yes. Call it through the Apify API, the Apify MCP server or any Apify integration. Pricing is per event only, so it works well with agent payments.

**Is scraping Telegram legal?** The actor only collects content that channel owners publish publicly on the web. Posts can still contain personal data, so you are responsible for how you store and use it (e.g. GDPR/CCPA), for respecting [Telegram's Terms of Service](https://telegram.org/tos) and copyright, and for not using the data for spam, harassment or surveillance of individuals.

**Disclaimer:** This actor is not affiliated with, endorsed by or sponsored by Telegram. Telegram is a trademark of Telegram FZ-LLC.

### Related actors

- [substack-scraper](https://apify.com/cprussin/substack-scraper): Substack newsletter posts, content and public stats.
- [youtube-transcripts](https://apify.com/cprussin/youtube-transcripts): Captions and transcripts from YouTube videos and channels.
- [bilibili-scraper](https://apify.com/cprussin/bilibili-scraper): Bilibili videos, comments, trending and search results.

# Actor input Schema

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

Public Telegram channels: usernames or links. Any of these work: durov, @durov, https://t.me/durov, https://t.me/s/durov, https://t.me/durov/123. Private channels, invite links (t.me/+...) and groups are not supported.

## `maxPostsPerChannel` (type: `integer`):

Stop after this many posts for each channel, newest first. Each post is billed as one event.

## `sinceDate` (type: `string`):

Only posts published on or after this date: YYYY-MM-DD, an ISO timestamp, or relative like "24 hours", "7 days" or "1 month". Scraping stops when older posts are reached, so scheduled runs only pay for new posts.

## `includeChannelInfo` (type: `boolean`):

Add one item per channel with its title, description, exact subscriber count, photo and media counters. Billed as one channel-info event per channel.

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

Optional. Not needed for normal volumes. Use Apify Proxy for very large runs if Telegram starts rate-limiting.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "https://t.me/telegram"
  ],
  "maxPostsPerChannel": 20,
  "includeChannelInfo": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `channels` (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": [
        "durov",
        "https://t.me/telegram"
    ],
    "maxPostsPerChannel": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("cprussin/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",
        "https://t.me/telegram",
    ],
    "maxPostsPerChannel": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("cprussin/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",
    "https://t.me/telegram"
  ],
  "maxPostsPerChannel": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call cprussin/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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