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

Scrape public Telegram channels: posts, views, reactions & media. No login or API key needed. Export JSON, CSV or API. Pay per post.

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

## Pricing

from $2.10 / 1,000 post 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?

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

**Scrape any public Telegram channel — posts, views, reactions, photos and videos — with no Telegram account, no API keys and no login.**

This Telegram Channel Scraper reads the channel's public web preview and turns it into clean, structured data you can export to JSON, CSV, Excel, Google Sheets or the API. Give it one channel or a whole list, set how far back to go, and get every post with its text, view count, reactions and media links.

### What is this Telegram Channel Scraper for?

- 📈 **Channel monitoring** — track what any public channel posts, how often, and how each post performs (views, reactions) over time. Schedule runs and diff the results.
- 🔍 **Research & OSINT** — build searchable archives of public channel posts with dates, links and media for analysis, fact-checking and reporting.
- 🪙 **Crypto & trading communities** — follow announcement and signal channels, extract calls and updates into a spreadsheet or your own pipeline instead of reading them by hand.
- 📰 **Media tracking** — monitor news and niche media channels for mentions, narratives and breaking stories, with timestamps and source URLs for every item.
- 🤖 **Datasets for AI** — collect clean text + metadata corpora from public channels for classification, sentiment or language-model experiments.

### Features

- **Multiple channels in one run** — pass usernames or URLs in any common format (`telegram`, `@telegram`, `https://t.me/telegram`).
- **Deep history** — walks backwards page by page until your post limit is reached or the channel's available history ends. No duplicates.
- **Filters** — date range (start/end) and keyword, so you only pay for posts you actually need.
- **Rich output per post** — plain text + HTML, exact timestamp, view count, reactions (emoji + counts), media type, photo URLs, video URL, document name, forwarded-from source.
- **Channel info included free** — one extra item per channel with title, description and the subscriber/photo/video counters shown on the channel's page.
- **Fail-soft** — a private, renamed or broken channel in your list is skipped with a warning; the rest of the run completes normally.
- **Cheap and fast** — plain HTTP scraping (no browser), so runs finish in seconds and cost fractions of a cent per post.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `channels` | array of strings | `["telegram"]` | Public channel usernames or URLs. |
| `maxPostsPerChannel` | integer (1–5000) | `20` | Maximum matching posts to return per channel. |
| `startDate` | date (optional) | — | Only posts published on/after this date. |
| `endDate` | date (optional) | — | Only posts published on/before this date. |
| `keyword` | string (optional) | — | Only posts whose text contains this word/phrase (case-insensitive). |
| `includeChannelInfo` | boolean | `true` | Add one free channel-info item per channel. |
| `proxyConfiguration` | object | no proxy | Usually unnecessary; enable Apify Proxy if you ever see blocking. |

### Output

One dataset item per post:

| Field | Description |
|---|---|
| `type` | `"post"` (or `"channel"` for the channel-info item) |
| `channel`, `channelTitle` | Channel username and display title |
| `postId`, `postUrl` | Numeric post ID and its `https://t.me/<channel>/<id>` URL |
| `date`, `timestamp` | Publication time (ISO 8601 + Unix seconds) |
| `text`, `textHtml` | Post body as plain text and as HTML |
| `views`, `viewsRaw` | View count. Telegram displays it abbreviated (e.g. `"1.49M"`), so the parsed number is approximate — `viewsRaw` keeps the exact displayed string |
| `forwards` | Always `null` — see Limitations |
| `forwardedFrom` | Source channel/user when the post was forwarded, else `null` |
| `reactions`, `reactionsTotal` | Array of `{ emoji, count }` plus the total. Standard emoji are returned as Unicode; custom (premium) emoji are returned as `custom-emoji:<id>` because the web preview does not expose their character |
| `hasMedia`, `mediaType` | `photo`, `video`, `photo+video`, `document`, `sticker`, `poll`, or `null` |
| `photoUrls`, `videoUrl`, `documentTitle` | Direct media links / document name when present |
| `scrapedAt` | When this item was collected |

#### Real sample output

From an actual test run of this Actor (channels `@telegram` and `@durov`, 25 posts each — 50 posts and 2 channel items returned from 4 page requests in about 7 seconds, zero failed requests). One post item, shortened for readability:

```json
{
  "type": "post",
  "channel": "telegram",
  "channelTitle": "Telegram News",
  "postId": 452,
  "postUrl": "https://t.me/telegram/452",
  "date": "2026-07-19T17:57:31.000Z",
  "timestamp": 1784483851,
  "text": "Ephemeral Bot Messages. You can now send private commands to bots in group chats and receive replies that are only visible to you and the bot…",
  "textHtml": "<b>Ephemeral Bot Messages.</b> You can now send <b>private commands</b> to bots in group chats…",
  "views": 1490000,
  "viewsRaw": "1.49M",
  "forwards": null,
  "forwardedFrom": null,
  "reactions": [],
  "reactionsTotal": null,
  "hasMedia": true,
  "mediaType": "photo",
  "photoUrls": ["https://cdn1.telesco.pe/file/mefp7BXaweTswKeoYKvEc0tRbt7w_gJ…"],
  "videoUrl": null,
  "documentTitle": null,
  "scrapedAt": "2026-11-19T05:48:01.880Z"
}
```

Reaction-rich posts look like this (post from `@durov`, values as displayed by Telegram):

```json
{
  "postUrl": "https://t.me/durov/544",
  "views": 4450000,
  "viewsRaw": "4.45M",
  "reactions": [
    { "emoji": "paid-reaction", "count": 15100 },
    { "emoji": "custom-emoji:5373223594484587136", "count": 41400 },
    { "emoji": "custom-emoji:5399847211989246390", "count": 16900 }
  ],
  "reactionsTotal": 84834
}
```

And the free channel-info item:

```json
{
  "type": "channel",
  "channel": "telegram",
  "channelTitle": "Telegram News",
  "channelUsername": "@telegram",
  "description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
  "subscribers": 9090000,
  "subscribersRaw": "9.09M",
  "photosCount": 16,
  "videosCount": 228,
  "linksCount": 378
}
```

### Pricing

**Pay per result: $0.003 per post scraped** ($3 per 1,000 posts), with Apify platform usage included — no separate platform charges on top. Channel-info items are free — you are only charged for post items actually delivered to the dataset. Filtered-out posts are not charged. The default run (1 channel, 20 posts) costs about **$0.06** in Actor fees, so the free plan's $5 monthly credit covers dozens of test runs.

### Limitations — please read

This Actor uses only the **public web preview** (`t.me/s/<channel>`). That is what makes it login-free, and it defines what is possible:

- **Public channels only.** Private channels, groups and channels with the web preview disabled cannot be scraped.
- **No forwards/shares count.** The web preview does not display one, so `forwards` is always `null`. (The `forwardedFrom` field does tell you when a post was forwarded and from where.)
- **Counts are approximate.** Telegram rounds views, reactions and subscribers on the preview ("1.49M", "41.4K"). Parsed numbers inherit that rounding; the exact displayed string is kept in `viewsRaw` / `subscribersRaw`.
- **Custom emoji reactions** are reported as `custom-emoji:<id>` — the preview does not expose their Unicode character. Standard emoji reactions are returned as the real emoji.
- **No comments.** Discussion-group comments/replies are not part of the channel preview and are not collected.
- **Edited posts** are returned in their current (edited) form, as displayed.

### FAQ

**Do I need a Telegram account or API key?**
No. The Actor only reads public web pages — nothing to sign up for, no session strings, no phone number.

**Can it scrape private channels or groups?**
No. Only public channels with a public preview. If a channel in your list is private or invalid, it is skipped with a warning and the rest still run.

**How far back can it go?**
As far as the public preview serves — the Actor paginates backwards until your `maxPostsPerChannel` limit is met or Telegram stops serving older pages.

**Why is `forwards` always null?**
Telegram's web preview simply doesn't show a forwards count. Rather than invent a number, the field is `null` and the limitation is documented here.

**Are filtered posts charged?**
No. You are charged per post item pushed to the dataset; posts removed by the date/keyword filters never reach the dataset.

**How fast is it?**
In testing, 50 posts from 2 channels took ~7 seconds (4 page requests). A 1,000-post channel history is typically a few minutes at most.

**Can I run it on a schedule?**
Yes — use Apify's schedules to re-run it (e.g. hourly or daily) and integrate the dataset with webhooks, Make, Zapier or the Apify API for monitoring workflows.

# Actor input Schema

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

Usernames or URLs of public Telegram channels. Accepts "telegram", "@telegram", "https://t.me/telegram" or "https://t.me/s/telegram". Private channels and groups cannot be scraped.

## `endDate` (type: `string`):

Only return posts published on or before this date. Leave empty for no upper bound.

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

Emit one extra dataset item per channel with its title, description and subscriber/photo/video counters as shown on the public preview page. Channel-info items are free (not charged).

## `keyword` (type: `string`):

Only return posts whose text contains this word or phrase (case-insensitive). Leave empty to return all posts.

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

Maximum number of matching posts to return per channel. The scraper walks backwards through the channel history until this limit is reached or no older posts exist.

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

The public Telegram preview usually works without a proxy. Enable Apify Proxy (residential) only if you see repeated blocking.

## `startDate` (type: `string`):

Only return posts published on or after this date. Leave empty for no lower bound.

## Actor input object example

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

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing all scraped data

# 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("diminutive_objective/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("diminutive_objective/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 diminutive_objective/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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