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

The Telegram Channel Scraper extracts posts from public Telegram channels — text, views, reactions, images, videos, files, link previews, forwards and channel subscriber counts — with no login, phone number or bot token. Ideal for crypto, news and brand monitoring, OSINT and research.

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

## Pricing

from $2.00 / 1,000 messages

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?

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 — Posts, Views, Reactions & Media (No Login)

Extract Telegram channel data without an account, phone number or bot token. The **Telegram Channel Scraper** turns any public channel into clean JSON, CSV or Excel — post text, views, reactions, images, videos, files, link previews, forwards, replies and the channel's subscriber count.

### ✨ Features

- 📜 **Full channel history**: every post of a public channel, newest first, all the way back to its first post — or just the latest few.
- 👀 **Views & reactions**: view counts and per-emoji reaction counts for every post, plus edited flags and author signatures.
- 🖼️ **Media**: direct image and video URLs (albums included), file names, stickers and voice flags.
- 🔗 **Context**: link previews with title, description and image; forwarded-from source; replied-to post; polls with results.
- 🔍 **Keyword filter**: return only the posts in a channel that match a keyword.
- 🔄 **Only new since last run**: the scraper remembers where it stopped per channel, so a scheduled run returns only new posts — no duplicates, no wasted credits.
- 📊 **Channel info**: title, description, avatar and subscriber / photo / video / file / link counts.
- ⚡ **No browser, no login**: hundreds of posts per second; runs finish in seconds, not minutes.

### 🛠️ How It Works

1. **Add channels** – handles (`durov`, `@telegram`) or links (`https://t.me/durov`), one per line.
2. **Set limits** – `maxMessages` per channel (set it high for the full history), optionally a `keyword` and a `postedAfter` date.
3. **Schedule it** – tick **Only new since last run** and put the scraper on a schedule to monitor channels continuously.
4. **Run the scraper** – results land in the dataset, ready to download or fetch via API, webhook or integration.

### 💵 Pricing

Pay only for what you extract — no fee per run:

| Event        | Price              |
| ------------ | ------------------ |
| Message      | $0.002 per post    |
| Channel info | $0.001 per channel |

1,000 posts cost $2. Monitoring 50 channels every hour with **Only new since last run** costs only the new posts that actually appeared — a channel posting 20 times a day adds about $1.20 per month. Untick **Include channel info** if you only want posts.

### 📊 Sample Output Data

Post:

```json
{
    "type": "message",
    "id": 532,
    "channel": "durov",
    "url": "https://t.me/durov/532",
    "text": "🎠 Telegram now supports carousels\n\nOne small step for messaging, one giant leap toward turning cat photos into keynote presentations. 😺…",
    "html": "<tg-emoji emoji-id=\"5224362841208793190\">…</tg-emoji> Telegram now supports carousels<br><br>…",
    "createdAt": "2026-07-19T21:45:01+00:00",
    "isEdited": false,
    "views": 5860000,
    "reactions": [
        { "emoji": "⭐", "customEmojiId": null, "count": 5800 },
        { "emoji": null, "customEmojiId": "5373223594484587136", "count": 55300 },
        { "emoji": "👍", "customEmojiId": null, "count": 13400 }
    ],
    "totalReactions": 74500,
    "author": "Pavel Durov",
    "forwardedFrom": null,
    "replyTo": null,
    "images": [],
    "videos": [
        {
            "url": "https://cdn4.telesco.pe/file/181642ae31.mp4?token=…",
            "thumbnail": "https://cdn4.telesco.pe/file/EGIEwZp_2Wg9yyExjdWNh1Mmvj2o3MXqUmrQgTA2R0Ysu31OUDGW5ui83G8FSi9iGzD_5F-Hsnm….jpg"
        }
    ],
    "files": [],
    "linkPreview": {
        "url": "https://telegram.org/blog/carousels",
        "siteName": "Telegram",
        "title": "Carousels, Rich Previews and More",
        "description": "Today's update lets you…",
        "image": "https://cdn4.telesco.pe/file/qPM36ml00_TRTfG8ljJy8EeRK_B669PTW_vGW-k9JVL_jRp….jpg"
    },
    "links": ["https://telegram.org/blog/carousels"],
    "poll": null,
    "isSticker": false,
    "isVoice": false,
    "scrapedAt": "2026-08-29T10:24:44.605Z"
}
```

A forwarded post carries `forwardedFrom: { "name": "Telegram News", "url": "https://t.me/telegram/312" }`; a reply carries `replyTo: { "url": "https://t.me/tginfo/4405", "author": "Telegram Info", "text": "…" }`.

Channel info:

```json
{
    "type": "channel",
    "channel": "durov",
    "url": "https://t.me/durov",
    "title": "Pavel Durov",
    "description": "Founder of Telegram.",
    "avatar": "https://cdn4.telesco.pe/file/XM6L4Ztt6ZFIH8HcgXKvHt8Sd-C4ret67-rCSugkO8-ZTtmvrxmY70mHEHaxLTKA1912eX….jpg",
    "subscribers": 11000000,
    "photos": 102,
    "videos": 45,
    "files": null,
    "links": 197,
    "scrapedAt": "2026-08-29T10:24:44.509Z"
}
```

### ℹ️ Good to know

- Works with **public channels** only. Private channels, invite links (`t.me/+…`), groups, bots and user profiles are skipped with a warning — Telegram does not expose their content without an account.
- Discussion-thread comments and member lists are not part of a channel's public page and are not collected.
- Counts such as `views` and `subscribers` are the rounded figures Telegram displays (e.g. `14.7M` → `14700000`). Reactions with a `customEmojiId` are premium custom emoji; the id can be resolved in any Telegram client.
- Video URLs are signed by Telegram's CDN and expire after a few hours — download what you need.
- **Only new since last run** keeps one cursor per channel in the `telegram-channel-scraper-state` key-value store of your account; delete `LAST_MESSAGE_IDS` there to start over.

Turn Telegram channels into structured data with the **Telegram Channel Scraper** today! 🚀

# Actor input Schema

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

Public Telegram channels to scrape, one per line — a handle (durov, @telegram) or a link (https://t.me/durov). Returns the channel info plus its posts, newest first.

## `maxMessages` (type: `integer`):

Maximum number of posts to collect per channel. Set it high to get a channel's full history.

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

Only return posts in each channel that match this keyword (Telegram's own in-channel search).

## `postedAfter` (type: `string`):

Skip posts older than this date (YYYY-MM-DD).

## `sinceLastRun` (type: `boolean`):

Remember the newest post of each channel and, on the next run, return only posts published after it. Ideal for scheduled monitoring — no duplicates, no wasted credits.

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

Also save one item per channel with its title, description, avatar and subscriber count.

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

The default works; residential proxies are not needed.

## Actor input object example

```json
{
  "channels": [
    "durov"
  ],
  "maxMessages": 50,
  "sinceLastRun": false,
  "includeChannelInfo": true,
  "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": [
        "durov"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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