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

Pull the latest posts from any public Telegram channel in seconds: 100 posts in about 10 s, no login or API key. Each post includes text, views, reactions, date, media and link URLs, forwards and channel info (title, subscribers). Export JSON/CSV, call it via API or schedule daily monitoring.

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

## Pricing

from $0.56 / 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.
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

### What does Telegram Channel Scraper do?

**Telegram Channel Scraper** solves one problem: getting the posts of a public Telegram channel as structured data without a Telegram account, bot token or API key. It reads the public web preview ([t.me/s/channel](https://t.me/s/telegram)), so 100 posts of a channel arrive in about 10 seconds and nothing you own can be rate-limited or banned.

Every post becomes one record with `channel`, `postId`, `url`, `date`, `text` (and optional HTML), `views`, `reactions` (emoji and counts), `mediaUrls`, `links`, `forwardedFrom`, `replyTo` and `editedAt`; an optional `channel-info` record adds title, description, subscriber count and avatar. Export JSON/CSV/Excel, call the REST API, or schedule the Actor and push new posts to Slack, Sheets, Make or your own pipeline.

### Why use Telegram Channel Scraper?

- **Monitor news and announcements** from crypto projects, software vendors, media outlets or government channels.
- **Track engagement**: views and reaction counts per post make it easy to rank content and spot what resonates.
- **Build datasets for research or AI**: export clean JSON/CSV of thousands of posts with dates and links for NLP, trend analysis or RAG pipelines.
- **Archive channels** on a schedule and keep your own searchable history.
- **Brand and competitor monitoring**: collect every mention across a set of channels and pipe it into Slack, Sheets or a database.

Because it reads the public preview, it only works for **public channels with the web preview enabled**. Private channels, invite links (`t.me/+...`), groups and bots are not supported.

### How to scrape Telegram channels

1. Open the Actor and enter one or more channels — usernames (`telegram`, `@durov`) or links (`https://t.me/durov`) both work.
2. Set **Max posts per channel** (default 50). Optionally limit by date with **Only posts newer than / older than**.
3. Click **Start**. Results appear in the **Dataset** tab within seconds.
4. Download the data as JSON, CSV, Excel, XML or HTML, or fetch it through the API.
5. Optional: add a **Schedule** to run daily and only collect new posts by setting `postsNewerThan` to yesterday.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `channels` | array | `["telegram", "durov"]` | Public channel usernames or t.me URLs |
| `maxPostsPerChannel` | integer | `50` | Newest N posts per channel |
| `postsNewerThan` | string | – | `YYYY-MM-DD` or ISO date; scraping stops once older posts are reached |
| `postsOlderThan` | string | – | Skip posts published after this date |
| `includeChannelInfo` | boolean | `true` | Add one `type: "channel"` item per channel |
| `includeTextHtml` | boolean | `false` | Add the original formatted HTML of each post |
| `proxyConfiguration` | object | none | Usually not needed; enable Apify Proxy if you get HTTP 429 |

Example input:

```json
{
  "channels": ["telegram", "https://t.me/durov"],
  "maxPostsPerChannel": 100,
  "postsNewerThan": "2026-01-01"
}
```

### Output

Each post is one dataset item:

```json
{
  "type": "post",
  "channel": "durov",
  "postId": 548,
  "url": "https://t.me/durov/548",
  "date": "2026-09-10T16:05:00+00:00",
  "timestamp": 1789056300,
  "text": "Telegram has become the sponsor of Codeforces — the largest competitive programming platform in the world...",
  "author": null,
  "views": 772000,
  "viewsRaw": "772K",
  "reactions": [
    { "emoji": "⭐", "customEmojiId": null, "isPaid": true, "count": 10000 },
    { "emoji": "🔥", "customEmojiId": null, "isPaid": false, "count": 18100 }
  ],
  "reactionsTotal": 38220,
  "links": [{ "url": "https://codeforces.com/blog/entry/156620", "text": "Codeforces" }],
  "linkPreview": { "url": "https://codeforces.com/...", "siteName": "Codeforces", "title": "...", "description": "...", "imageUrl": "https://cdn4.telesco.pe/file/..." },
  "imageUrls": ["https://cdn4.telesco.pe/file/..."],
  "videoUrls": [],
  "videos": [],
  "documents": [],
  "poll": null,
  "forwardedFrom": null,
  "replyTo": null,
  "isForwarded": false,
  "isReply": false,
  "isEdited": false,
  "hasMedia": true
}
```

Channel items (`"type": "channel"`) contain `title`, `username`, `description`, `photoUrl`, `subscribers`, `photosCount`, `videosCount`, `filesCount`, `linksCount` and `isVerified`.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

### Data fields

| Field | Description |
|---|---|
| `postId`, `url`, `date`, `timestamp` | Post identity and publish time (UTC) |
| `text`, `textHtml` | Plain text (line breaks preserved) and optional original HTML |
| `views`, `viewsRaw` | View count as a number and as shown (`772K`) |
| `reactions`, `reactionsTotal` | Per-emoji counts, paid (star) reactions flagged, custom emoji IDs |
| `links`, `linkPreview` | Links inside the text and the rendered link preview card |
| `imageUrls`, `videos`, `videoUrls`, `documents`, `audio`, `stickerUrl`, `poll` | Media attached to the post (direct CDN URLs) |
| `forwardedFrom`, `replyTo` | Source of forwards and the quoted message for replies |
| `author`, `isEdited`, `isServiceMessage`, `hasMedia` | Post metadata |

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

Pricing is **pay per event**: you pay a small amount per post and per channel-info item, nothing else. Scraping the latest 1,000 posts from a channel typically finishes in under a minute. Set **Max posts per channel** and date filters to control cost precisely; the Actor stops as soon as your limit or your run's maximum charge is reached.

### Tips

- Telegram's preview returns about 20 posts per page, so 1,000 posts means ~50 requests. Keep `maxPostsPerChannel` at what you actually need.
- For daily monitoring, schedule the Actor and set `postsNewerThan` to the previous day; the run will stop paging as soon as it hits older posts.
- Media URLs point at Telegram's CDN and can expire after a while — download files you need promptly.
- If you scrape hundreds of channels in one run and see HTTP 429 in the log, enable Apify Proxy in **Proxy configuration**.

### FAQ and disclaimers

**Does it work for private channels or groups?** No. Only public channels with the web preview enabled (`https://t.me/s/<channel>` must open in a browser).

**Do I need a Telegram account?** No. Nothing is logged in and no Telegram API credentials are used.

**Is it legal?** The Actor only collects publicly available data that Telegram itself serves to anyone on the web. You are responsible for how you use the data and for complying with Telegram's terms and applicable laws (e.g. GDPR when storing personal data). This is an unofficial tool and is not affiliated with Telegram.

**Something is missing or broken?** Telegram occasionally changes its preview markup. Please open an issue in the **Issues** tab with the channel name and we will fix it quickly. Custom features and integrations are available on request.

# Actor input Schema

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

Public Telegram channels to scrape. Accepts usernames (e.g. `telegram`, `@durov`) or URLs (`https://t.me/telegram`, `https://t.me/s/telegram`). Private channels and channels without a public preview cannot be scraped.

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

Maximum number of posts to collect from each channel, newest first. Each page of history returns about 20 posts.

## `postsNewerThan` (type: `string`):

Skip posts published before this date. Accepts `YYYY-MM-DD` or a full ISO 8601 timestamp. Scraping stops for a channel once posts older than this date are reached, which saves time and cost.

## `postsOlderThan` (type: `string`):

Skip posts published after this date. Accepts `YYYY-MM-DD` or a full ISO 8601 timestamp.

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

Push one extra dataset item per channel with `type: "channel"` containing title, description, subscriber count and media counters.

## `includeTextHtml` (type: `boolean`):

Add a `textHtml` field with the original formatted HTML of each post (bold, links, custom emoji).

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

Optional. t.me usually works without a proxy. Enable Apify Proxy if you scrape many channels at once and start seeing HTTP 429 responses.

## Actor input object example

```json
{
  "channels": [
    "telegram",
    "durov"
  ],
  "maxPostsPerChannel": 50,
  "includeChannelInfo": true,
  "includeTextHtml": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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",
        "durov"
    ],
    "maxPostsPerChannel": 50,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

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

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

```

## MCP server setup

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