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

Scrape public Telegram channels without login: posts with text, views, reactions per emoji, photos, videos, links and link previews, plus channel stats. Filter by keywords and dates, or run in monitor mode to get only new posts. Pay per post.

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

## Pricing

from $1.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.
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

Get the posts of any **public Telegram channel** as clean JSON, CSV or Excel. No Telegram account, no phone number, no API key. Just paste channel names or links and run.

For every post you get the text, publish date, view count, **reactions per emoji**, photos, videos, links, link preview, forward and reply info. You can **filter by keywords** across many channels at once, limit by **date range**, and switch on **monitor mode** to receive only the posts that are new since the last run.

### What you get

- **Posts** with text (plain text, no HTML), date, views, reactions (`{"❤": 61, "👍": 45}` plus a total), photos, videos with thumbnails, documents, links, link preview card, inline buttons, "forwarded from", "reply to", edited flag and author signature.
- **Channel info** (optional): title, description, subscriber count, photo/video/link/file counters, verified badge and channel photo.
- **Clear errors** for channels that cannot be scraped (private, restricted, renamed, or not a channel), as separate items. The rest of the run continues.

### What it does not do

- **Private channels and groups.** Only channels with a public web preview (`https://t.me/s/channel`) work. If Telegram shows "If you have Telegram, you can contact..." instead of posts, the channel cannot be scraped.
- **Comments, member lists, polls results, stories.** Telegram does not show them in the public preview.
- **Full history of huge channels.** The preview pages 20 posts at a time. 1,000 posts means 50 page loads per channel. That works, but very old history in channels with hundreds of thousands of posts is slow.
- **Downloading media files.** You get the URLs. Photo and video links come from Telegram's CDN and stop working after a while, so download them soon if you need the files.
- **Logging in or sending anything.** The scraper only reads public pages.

### Input

| Field | Default | Meaning |
|---|---|---|
| `channels` | required | Channel usernames, `@handles` or `t.me` links, one per line. |
| `maxPostsPerChannel` | 100 | Newest posts first. |
| `startDate`, `endDate` | empty | Absolute (`2026-01-31`) or relative (`7 days`, `2 weeks`, `1 month`). |
| `keywords` | empty | Keep only posts containing one of these (case-insensitive). |
| `keywordsMatchAll` | false | Require every keyword instead of any. |
| `onlyNewPosts` | false | Monitor mode, see below. |
| `monitorName` | empty | Optional name that keeps a monitor's position separate from others. |
| `includeChannelInfo` | true | Save one `channel` item per channel. |
| `includeReactions`, `includeMedia`, `includeLinkPreviews` | true | Turn parts of the post off to get smaller items. |
| `maxPagesPerChannel` | 200 | Safety limit for keyword searches (about 20 posts per page). |
| `proxyConfiguration` | Apify datacenter proxy | Switch to residential if you see rate-limit errors. |

#### Example: latest 50 posts from three channels

```json
{
  "channels": ["telegram", "@durov", "https://t.me/bloomberg"],
  "maxPostsPerChannel": 50
}
```

#### Example: crypto keyword alert over the last week

```json
{
  "channels": ["cointelegraph", "binance_announcements", "bitcoin"],
  "keywords": ["bitcoin", "btc", "etf"],
  "startDate": "7 days",
  "maxPostsPerChannel": 200,
  "includeChannelInfo": false
}
```

#### Example: monitor mode on a schedule

```json
{
  "channels": ["guardian", "thehackernews", "binance_announcements"],
  "onlyNewPosts": true,
  "maxPostsPerChannel": 500
}
```

Save this as a **Task**, add a **Schedule** (for example every 15 minutes), and connect an integration (Slack, email, webhook, Google Sheets). Each run returns only posts published since the previous run.

### Output

One dataset item per post. Example:

```json
{
  "type": "post",
  "channel": "durov",
  "channelTitle": "Pavel Durov",
  "postId": 536,
  "url": "https://t.me/durov/536",
  "date": "2026-07-30T16:55:01.000Z",
  "text": "🇦🇫😈",
  "views": 6180000,
  "reactions": { "⭐": 49200, "custom:5373223594484587136": 274000, "custom:5399847211989246390": 69800 },
  "reactionsTotal": 393000,
  "photos": ["https://cdn4.telesco.pe/file/....jpg"],
  "videos": [],
  "documents": [],
  "links": [],
  "linkPreview": null,
  "buttons": [],
  "forwardedFrom": null,
  "replyTo": null,
  "isPinned": false,
  "isEdited": false,
  "author": "Pavel Durov",
  "scrapedAt": "2026-10-20T19:02:11.512Z"
}
```

A post with a link preview and a video looks like this (shortened):

```json
{
  "type": "post",
  "channel": "telegram",
  "postId": 445,
  "text": "For all the features from this update, like statistics and custom limits for polls ... check out the full blog:\nhttps://telegram.org/blog/ai-bot-revolution-11-new-features",
  "views": 1830000,
  "reactions": {},
  "videos": [{ "url": "https://cdn1.telesco.pe/file/....mp4?token=...", "thumbnailUrl": "https://cdn1.telesco.pe/file/...", "duration": "0:06" }],
  "links": ["https://telegram.org/blog/ai-bot-revolution-11-new-features"],
  "linkPreview": {
    "url": "https://telegram.org/blog/ai-bot-revolution-11-new-features",
    "siteName": "Telegram",
    "title": "Guest AI Bots, Bot-to-Bot Chats, Chat Automation, ...",
    "description": "Telegram adds over 10 new features ...",
    "imageUrl": "https://cdn4.telesco.pe/file/....jpg"
  }
}
```

One item per channel when `includeChannelInfo` is on:

```json
{
  "type": "channel",
  "channel": "telegram",
  "title": "Telegram News",
  "description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
  "subscribers": 9280000,
  "photosCount": 16,
  "videosCount": 228,
  "linksCount": 378,
  "filesCount": null,
  "verified": true,
  "photoUrl": "https://cdn1.telesco.pe/file/....jpg",
  "url": "https://t.me/telegram",
  "scrapedAt": "2026-10-20T19:02:10.004Z"
}
```

And one item per channel that failed:

```json
{
  "type": "error",
  "channel": "bbcnews",
  "error": "\"bbcnews\" was not found or has no public preview (private, restricted, renamed, or not a channel).",
  "url": "https://t.me/bbcnews",
  "scrapedAt": "2026-10-20T19:02:09.120Z"
}
```

Notes on fields:

- `views` and counters are numbers. Telegram shows "6.18M"; you get `6180000` (rounded the way Telegram rounds).
- `reactions` keys are the emoji. Paid star reactions use `⭐`. Custom (premium) emoji have no character in the public preview, so they appear as `custom:<id>`.
- `date` is UTC in ISO 8601.
- `isPinned` is only true when Telegram marks it in the preview, which is rare.

In the Apify Console the **Posts** view shows the main columns; the **Channels** view shows channel items. Use the API link with `?format=csv` or `?format=xlsx` for spreadsheets.

### Monitor mode (only new posts)

With `onlyNewPosts` on, the scraper remembers the newest post ID of every channel in your key-value store named `telegram-channel-scraper-state`. On the next run it returns only posts newer than that and updates the position. The position is kept per **saved Task**; if you run the Actor directly, it is kept per channel list, or per `monitorName` when you set one. A copy is also saved as `STATE` in each run's own key-value store so you can see it.

- The first run returns the normal number of posts (`maxPostsPerChannel`) and saves the position.
- If a channel published more than `maxPostsPerChannel` posts between two runs, the extra older ones are skipped. Set the limit higher than the busiest channel can post between runs.
- Keyword and date filters still apply, but the position always moves to the channel's newest post, so a filtered-out post is not returned later.
- Turn off **Include channel info** for scheduled monitors. Otherwise every run also saves (and charges for) one channel item per channel, even when there are no new posts.
- To start over, delete the matching `STATE-...` record from the `telegram-channel-scraper-state` key-value store (Storage > Key-value stores), or set a new `monitorName`.

### Pricing

This Actor uses **pay per event**. You pay a small fixed price for each item the scraper saves, nothing for compute time:

| Event | Price | When |
|---|---|---|
| Post scraped | $0.0015 per post ($1.50 per 1,000) | Every `post` item saved |
| Channel info | $0.002 per channel | Every `channel` item (off with `includeChannelInfo: false`) |
| Actor start | $0.0001 per run | Once per run |

Filtered-out posts, duplicate pages and error items are free. 10 channels with 100 posts each cost about $1.52. Set **Maximum cost per run** in the run options and the scraper stops cleanly when it is reached, keeping everything it saved so far. Apify subscription tiers get a discount.

### Use cases

- **News and brand monitoring:** follow dozens of news or company channels and get an alert when a keyword appears.
- **Crypto and finance:** watch exchange announcement channels and analysts for tokens, listings, or "airdrop".
- **Research and OSINT:** collect posts with dates, views and reactions for analysis in Python, R or a spreadsheet.
- **Marketing:** compare engagement (views, reactions per emoji) across competitor channels, find the posts that worked.
- **Content pipelines:** feed channel posts into a database, Google Sheets, Slack or your own LLM workflow through Apify integrations.

### Legal note

The scraper reads only public pages that Telegram publishes to everyone without login, the same pages you see in a browser at `t.me/s/channel`. It does not log in, bypass restrictions or access private content. You are responsible for how you use the data: respect Telegram's terms of service, copyright of the channel owners and privacy laws such as GDPR when posts contain personal data. Do not use it for spam or to republish others' content without permission.

### FAQ

**A channel gives an error but I can open it in Telegram.**
Open `https://t.me/s/<channel>` in a normal browser. If you see posts, retry the run (Telegram sometimes has hiccups). If you see a "contact" page instead, the owner disabled the web preview or the channel is private. Nothing can be done about that without a logged-in account, and this Actor deliberately does not log in.

**Can it scrape groups or comments?**
No. Only channels with a public preview. Comments under posts live in a linked discussion group that Telegram does not show in the preview.

**How far back can it go?**
As far as the channel history goes, 20 posts per page. For a 50,000-post channel that is 2,500 pages, so use a date range or `maxPostsPerChannel` to keep runs short.

**Why are some reaction keys `custom:123...`?**
Those are premium custom emoji. Telegram's public preview only gives their ID, not a picture or character.

**Media links stop working after some days.**
That is how Telegram's CDN works. Download the files right after the run if you need to keep them.

**Does it need proxies?**
Normal use works with the default datacenter proxies. If you scrape hundreds of channels in one run and see rate-limit errors, choose residential proxies in the input.

**Is the text HTML?**
No. Text is plain with line breaks kept. Links inside the text are listed separately in `links`.

**How do I get the result as CSV or Excel?**
Open the run's dataset and choose the format, or add `?format=csv` or `?format=xlsx` to the dataset API link.

### Changelog

See [CHANGELOG.md](./CHANGELOG.md).

# Changelog

This Actor's version history is a separate document: https://apify.com/lmbtechnology/telegram-channel-scraper/changelog.md

# Actor input Schema

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

Public channels to scrape, one per line. Use the username (`durov`), the handle (`@durov`) or a link (`https://t.me/durov`). Private channels, groups without a web preview, users and bots cannot be scraped and produce an error item instead.

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

How many posts to save for each channel, newest first. Telegram shows about 20 posts per page, so 100 posts means about 5 page loads per channel.

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

Skip posts older than this. Use an absolute date (`2026-01-31`) or a relative one (`7 days`, `2 weeks`, `1 month`). The scraper stops paging a channel once it reaches older posts.

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

Skip posts newer than this. Absolute (`2026-02-15`, included until the end of that day) or relative (`1 day`). Leave empty for "now".

## `keywords` (type: `array`):

Keep only posts whose text (or link preview title) contains at least one of these words or phrases. Matching ignores upper and lower case. Leave empty to keep all posts. Tip: the scraper keeps paging until it finds "Maximum posts per channel" matching posts or runs out of history, so set a date range or a page limit for rare keywords.

## `keywordsMatchAll` (type: `boolean`):

When on, a post must contain every keyword. When off (default), one matching keyword is enough.

## `onlyNewPosts` (type: `boolean`):

Remember the newest post of each channel and, on the next run, return only posts published after it. The position is saved in your key-value store named `telegram-channel-scraper-state`, one record per saved Task (or per monitor name, or per channel list when you run the Actor directly). Ideal with a schedule. The first run returns the normal number of posts.

## `monitorName` (type: `string`):

Only for monitor mode. Give each monitor its own name to keep separate positions, for example when two schedules watch the same channels with different keywords. Leave empty to use the saved Task, or the channel list when you run the Actor directly. Letters, numbers and - \_ . only.

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

Also save one item per channel with its title, description, subscriber count and media counters (`type: "channel"`).

## `includeReactions` (type: `boolean`):

Add the reaction counts per emoji and the total to every post.

## `includeMedia` (type: `boolean`):

Add photo URLs, video URLs with thumbnails and document names to every post. Media links come from Telegram's CDN and expire after some time.

## `includeLinkPreviews` (type: `boolean`):

Add the link preview card (site name, title, description, image) when a post has one.

## `maxPagesPerChannel` (type: `integer`):

Safety limit on how many preview pages (about 20 posts each) to load for one channel. Mostly useful together with keywords so a rare keyword does not walk through the whole channel history.

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

Proxies used to reach Telegram. Datacenter proxies (default) work for normal use. Switch to residential proxies if you scrape many channels at once and start seeing rate-limit errors.

## Actor input object example

```json
{
  "channels": [
    "telegram",
    "durov"
  ],
  "maxPostsPerChannel": 100,
  "keywordsMatchAll": false,
  "onlyNewPosts": false,
  "includeChannelInfo": true,
  "includeReactions": true,
  "includeMedia": true,
  "includeLinkPreviews": true,
  "maxPagesPerChannel": 200,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": []
  }
}
```

# Actor output Schema

## `posts` (type: `string`):

All scraped items as JSON (type "post", "channel" or "error").

## `postsOnly` (type: `string`):

Posts as CSV, without channel and error items.

## `monitorState` (type: `string`):

The newest post ID per channel saved by monitor mode (only present when "Only new posts" is on).

# 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"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": []
    }
};

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

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

```

## MCP server setup

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