# Telegram Channel Posts Scraper (`datakit_lab/telegram-channel-posts-scraper`) Actor

Export posts from public Telegram channels: text, date, views, reactions, engagement rate, media, links, hashtags and forwards. Filter by keywords and date range. No login, no phone, no API key.

- **URL**: https://apify.com/datakit_lab/telegram-channel-posts-scraper.md
- **Developed by:** [DataKit Lab](https://apify.com/datakit_lab) (community)
- **Categories:** Social media, News, Marketing
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Posts Scraper

Export posts from **public Telegram channels** to a spreadsheet, JSON or API: text, date, views, reactions, engagement rate, media types, photo URLs, links, hashtags, forwards and the channel's exact subscriber count.

**No Telegram account, phone number, bot token or API key needed.** The scraper reads the public web preview of a channel (`t.me/s/<channel>`) — the same page anyone can open in a browser.

### What can you do with it?

- 📰 **Media monitoring** — collect every post of news channels for a period and analyse topics.
- 🔎 **Keyword monitoring** — find all posts that mention a brand, product, ticker or person, over any period.
- 📈 **Competitor and influencer research** — compare views, reactions and engagement rate of posts across channels before buying ads.
- 🤖 **Feed data to AI / LLM pipelines** — clean text with links and hashtags, ready for summarisation or sentiment analysis.
- 🗂 **Archive** your own channel to CSV/Excel.

### Features

- Many channels in one run (usernames, `@names` or `t.me` links — any format).
- **Keyword filter** (one or several keywords, any of them matches) — goes much deeper than the ~20 latest matches that Telegram's own search returns. The scraper reads up to `maxPostsToScan` newest posts per channel (default 5,000, max 20,000) and keeps the matching ones. For busy news channels 5,000 posts can be just a few days — raise the limit or narrow the date window.
- **Date filter**: absolute (`2026-01-31`) or relative (`7 days`, `3 months`).
- Newest posts first, with a per-channel limit — you get exactly as much as you asked for.
- **Engagement rate** per post (reactions ÷ views × 100).
- Exact subscriber count of each channel added to every row (optional; `channelSubscribersExact: false` means Telegram only returned the rounded value, e.g. 9.98M).
- Channels that don't exist or are private are **skipped** (logged in the run summary), the run continues.
- Lightweight: plain HTTP requests, no browser — fast and reliable.

### Input example

```json
{
  "channels": ["durov", "https://t.me/telegram", "@bbcrussian"],
  "searchQuery": "",
  "maxPostsPerChannel": 200,
  "dateFrom": "30 days"
}
```

| Field | Description |
|---|---|
| `channels` | Public channels: `durov`, `@durov`, `https://t.me/durov`, `https://t.me/s/durov`. |
| `searchQuery` | Optional keyword filter: `bitcoin` or `bitcoin, btc, биткоин` (any keyword matches, case-insensitive). |
| `maxPostsToScan` | Safety limit of posts read per channel while filtering (default 5,000, max 20,000). |
| `maxPostsPerChannel` | Newest N posts per channel. `0` = no limit, up to `maxPostsToScan` posts per channel (default 5,000, max 20,000). Default 100. |
| `dateFrom` / `dateTo` | Optional date window (UTC). `2026-01-31` or `7 days`, `2 weeks`, `1 month`. A bare date in `dateTo` is inclusive (whole day). |
| `includeChannelInfo` | Add channel title, verified badge and subscriber count to every post. Default `true`. |
| `skipServiceMessages` | Skip "pinned message", "channel photo updated" etc. Default `true`. |

### Output example

One row per post:

```json
{
  "channel": "durov",
  "postId": 562,
  "url": "https://t.me/durov/562",
  "date": "2026-11-15T22:48:26.000Z",
  "text": "Noticed in the banya today: I'm getting skinnier. ...",
  "views": 225000,
  "reactionsTotal": 27690,
  "reactions": [{ "emoji": "⭐", "count": 5630 }, { "emoji": "custom:5399847211989246390", "count": 12700 }],
  "engagementRate": 12.307,
  "mediaTypes": ["photo"],
  "photoUrls": ["https://cdn4.telesco.pe/file/....jpg"],
  "linkPreviewUrl": null,
  "linkPreviewTitle": null,
  "links": [],
  "hashtags": [],
  "forwardedFrom": null,
  "forwardedFromUrl": null,
  "isReply": false,
  "edited": false,
  "author": "Pavel Durov",
  "channelTitle": "Pavel Durov",
  "channelSubscribers": 9980532,
  "channelSubscribersExact": true,
  "channelVerified": true,
  "scrapedAt": "2026-11-16T01:18:29.000Z"
}
```

Download the results as **JSON, CSV, Excel, XML or HTML**, or get them via the Apify API, webhooks and integrations (Google Sheets, Zapier, Make, n8n, Slack…).

A run summary (posts per channel, skipped channels) is saved to the key-value store as `SUMMARY`.

### Pricing

**Free during launch** — you pay only the small Apify platform usage of your runs (about $0.005 per 1,000 posts). **Pay-per-result pricing is coming soon** (planned around $0.80 per 1,000 posts); Apify will notify users of the Actor at least 14 days before the price applies. Invalid, private or non-existent channels never produce results and never cost anything extra.

### Tips

- `views` and reaction counts on Telegram's web preview are rounded for big numbers (e.g. `7.92M`, `33.9K`); we convert them to numbers (`7920000`, `33900`).
- Custom (premium) emoji reactions are returned as `custom:<emoji id>`; paid star reactions as `⭐`.
- Only channels that have a public web preview work. Groups, private channels and channels where the owner disabled the preview are skipped.
- For large exports set `maxPostsPerChannel: 0`, a date window and `maxPostsToScan` up to 20,000 per channel.
- Speed: roughly 1,000 posts per minute with the default 512 MB memory.

### Is it legal?

The scraper collects only publicly available posts from public channels — the same content anyone can see in a browser without logging in. It does not collect private messages, member lists, phone numbers or emails. You are responsible for using the data in line with applicable laws (e.g. GDPR) and Telegram's terms.

### Русский

Сборщик постов из **публичных Telegram-каналов** без аккаунта и телефона: текст, дата, просмотры, реакции, ER, медиа, ссылки, хэштеги, репосты и точное число подписчиков. Фильтр по ключевым словам и датам, на время запуска бесплатно (платите только за работу сервера Apify), позже — оплата только за сохранённые посты.

### Support

Found a bug or need an extra field? Open an issue on the **Issues** tab — we check issues twice a week.

# Actor input Schema

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

Public Telegram channels. Usernames (durov, @durov) or links (https://t.me/durov). Only public channels with a web preview work; private chats and groups do not.

## `searchQuery` (type: `string`):

Keep only posts whose text contains this word or phrase (case-insensitive). Several keywords — separate with commas (any of them matches). Leave empty to get all posts. You pay only for matching posts.

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

Newest posts first. 0 = no limit, up to "Max posts to read per channel" (default 5,000, max 20,000).

## `dateFrom` (type: `string`):

Absolute date (2026-01-31) or relative period (7 days, 7 days ago, 2 weeks, 3 months). Empty = no limit.

## `dateTo` (type: `string`):

Absolute date, inclusive (2026-10-31 = up to the end of 31 Oct, UTC) or relative period (1 day). Empty = up to now.

## `maxPostsToScan` (type: `integer`):

Safety limit: how many newest posts per channel the scraper reads while applying the keyword/date filters (default 5000, max 20000). Without a keyword filter it never stops before "Max posts per channel".

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

Adds channelTitle, channelVerified and channelSubscribers (exact count) to each post. Costs nothing extra.

## `skipServiceMessages` (type: `boolean`):

Service messages have no content worth analysing; skipping them saves money.

## `maxConcurrency` (type: `integer`):

How many channels to scrape at the same time (1–5).

## Actor input object example

```json
{
  "channels": [
    "durov"
  ],
  "maxPostsPerChannel": 20,
  "maxPostsToScan": 5000,
  "includeChannelInfo": true,
  "skipServiceMessages": true,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

No description

## `summary` (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"
    ],
    "maxPostsPerChannel": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("datakit_lab/telegram-channel-posts-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"],
    "maxPostsPerChannel": 20,
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datakit_lab/telegram-channel-posts-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/ZqrS5IKbrfdRZabSb/builds/5WaA8EOhf7oGcVEHp/openapi.json
