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

Scrape posts from public Telegram channels: text, date, views, reactions, photos, videos, links, hashtags, plus channel subscribers. Keyword search inside channels and date cut-off for cheap monitoring. No Telegram account needed.

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

## Pricing

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

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

Scrape posts from **public Telegram channels** without a Telegram account, API key or phone number. Get post text, date, **views**, **reactions**, photos, videos, links, hashtags and link previews, plus channel info (title, description, verified badge, **subscriber count**).

### What it's for

- **Crypto, finance and news monitoring**: track announcement channels in near real time.
- **Brand and competitor monitoring**: keyword search inside channels.
- **Research and OSINT on public broadcasts**: archive a channel's history.
- **Content and engagement analytics**: views and reactions per post, channel growth.
- **AI / LLM datasets**: clean text from public channels.

### Features

- Many channels in one run: `durov`, `@telegram`, `https://t.me/s/bbcnews` all work.
- **Keyword search inside channels** (Telegram's own channel search).
- **Only posts after a date**: stops at the first older post, ideal for cheap daily or hourly runs.
- Full history: walks back through the channel page by page, newest first.
- Views and reactions as **numbers** (`5.27M` → `5270000`), plus a `reactionsTotal`.
- Media: photo URLs, video URLs and thumbnails, document names, link previews.
- Channel info on every row (optional): title, username, description, verified, subscribers, photos/videos/links counts.

### Privacy by design

Only the channel's **public broadcast** is collected. Per-post author signatures and posts forwarded from private users are **not** output. Forwards from public channels keep the source channel name and link.

### Input example

```json
{
  "channels": ["durov", "https://t.me/telegram"],
  "searchInChannel": "",
  "maxPostsPerChannel": 500,
  "postedAfter": "2026-11-01"
}
```

### Output example

```json
{
  "postId": 548,
  "channel": "durov",
  "url": "https://t.me/durov/548",
  "date": "2026-09-11T16:04:02+00:00",
  "text": "Telegram has become the sponsor of Codeforces...",
  "views": 5270000,
  "photos": [],
  "videos": [],
  "links": ["https://codeforces.com/blog/entry/156620"],
  "hashtags": [],
  "linkPreview": { "url": "https://codeforces.com/blog/entry/156620", "site": "Codeforces", "title": "Telegram Returns as Title Sponsor of Codeforces!" },
  "reactions": [{ "emoji": "⭐ (paid)", "count": 22000 }, { "emoji": "👍", "count": 37900 }],
  "reactionsTotal": 81400,
  "channelTitle": "Pavel Durov",
  "channelSubscribers": 9890000,
  "channelVerified": true
}
```

### Pricing

Pay per result: **$1.50 per 1,000 posts**, plus a tiny per-run start fee. No monthly rental. Platform usage is included.

### FAQ

**Which channels work?** Public channels that show a web preview at `t.me/s/<name>`. Private channels, groups, users and bots don't (the run log tells you which ones failed).

**Do I need a Telegram account?** No.

**Is it legal?** It reads the public web preview that Telegram itself serves to any visitor, at a polite pace, and leaves out personal data about individual users. You are responsible for how you use the data.

**Missing something?** Open an issue on the Issues tab. I usually reply within 24 hours.

# Actor input Schema

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

Usernames or links: durov, @telegram, https://t.me/s/bbcnews. Only public channels with web preview work (not private groups or users).

## `searchInChannel` (type: `string`):

Only posts matching this keyword, using Telegram's own channel search.

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

Newest first.

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

Stops at the first older post. Great for cheap daily monitoring.

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

Channel title, description, verified badge, subscriber count.

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

Not needed normally. Use a proxy only if you get blocked or want results as seen from another country.

## Actor input object example

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

# Actor output Schema

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

All posts as a table (also JSON, CSV, Excel via the dataset API).

# 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",
        "telegram"
    ]
};

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

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

```

## MCP server setup

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