# Telegram Channel Scraper: Posts, Views & Reactions (`sourcedirect/telegram-channel-scraper`) Actor

Messages from public Telegram channels, no login or API keys: text, date, views, reactions, photos, videos, forwards, replies, links and hashtags, plus channel info (subscribers). Search within channels and filter by date.

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

## Pricing

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

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: Posts, Views & Reactions

Collect messages from **public Telegram channels**, with no Telegram account, phone number or API keys. For each post you get:

- full text
- date
- view count
- reactions, including paid Star reactions
- photos, videos and link previews
- forwarded-from source and replies
- links, hashtags and mentions

You also get channel info: title, description, subscribers and verified badge.

### Use cases

- **Crypto and market monitoring:** follow announcement and signal channels, and alert on keywords.
- **News and OSINT research:** archive channels, track narratives, see what gets forwarded where.
- **Brand and community tracking:** measure views and reactions on posts about your product.
- **AI agents:** "Summarize what @channel posted this week", in one call.

### Input

| Field | What it does |
|---|---|
| `channels` | Usernames (`durov`), `@usernames`, or links (`https://t.me/telegram`) |
| `maxMessagesPerChannel` | Newest first. Default 50 |
| `searchQuery` | Only posts matching a text, using Telegram's own channel search |
| `postedWithinDays` / `onlyPostsNewerThan` | Date limit. Paging back stops once older posts are reached |
| `includeChannelInfo` | Adds one free item per channel with title, description, subscribers and counters |

#### Example

```json
{ "channels": ["durov", "https://t.me/telegram"], "maxMessagesPerChannel": 100, "postedWithinDays": 30 }
```

### Output example

This is a real result, shortened:

```json
{
  "type": "message",
  "channel": "durov",
  "messageId": 548,
  "url": "https://t.me/durov/548",
  "date": "2026-09-11T16:04:02+00:00",
  "text": "🤝 Telegram has become the sponsor of Codeforces — the largest competitive programming platform in the world. ...",
  "views": 1840000,
  "viewsText": "1.84M",
  "author": "Pavel Durov",
  "isEdited": false,
  "forwardedFrom": null,
  "replyTo": null,
  "photos": [],
  "videos": [],
  "linkPreview": null,
  "links": [],
  "hashtags": [],
  "reactions": [{ "emoji": "⭐", "customEmojiId": null, "isPaid": true, "count": 1520 }],
  "reactionsTotal": 60770,
  "channelTitle": "Pavel Durov",
  "channelSubscribers": 10600000
}
```

Forwarded posts include `forwardedFrom: { name, url }`, and replies include `replyTo: { url, author, text }`.

### Pricing

**$0.001 per message.** Channel-info items and errors are free. There are no platform-usage charges on top and no fee per run.

For example, 1,000 messages cost $1. If you set a maximum cost, the run stops cleanly when it is reached.

### Using it from AI agents (MCP)

Available through the [Apify MCP server](https://mcp.apify.com) for Claude, ChatGPT, Cursor and other MCP clients. Agents can also pay per call through Apify's agentic payments.

Example prompts:

- "What did @durov post in the last two weeks? Summarize with view counts."
- "Search the @telegram channel for posts about stories."

### Good to know

- **Public channels only.** This reads Telegram's public web preview (`t.me/s/<channel>`). Private channels, groups, chats and users aren't accessible; they return an error item explaining why, at no cost.
- **Counts are rounded by Telegram.** Views and reactions show as "1.84M"; we convert them to numbers and keep the original text in `viewsText`.
- **Reactions:** standard emoji come as `emoji`. Telegram's custom emoji only expose an ID (`customEmojiId`), and paid Star reactions are marked `isPaid`.
- **Media:** photo URLs and video thumbnails come from Telegram's CDN, and links can expire after a while. Some media types only open in the Telegram app; the post text is still returned.
- **Legal:** the data comes from Telegram's public channel previews. This Actor doesn't collect member lists or private data.

### FAQ

**Can I track a channel continuously?** Yes. Schedule the Actor with `postedWithinDays: 1` and connect it to Slack, Google Sheets, Zapier, Make or n8n.

**How far back can it go?** As far as the channel's history goes. It pages back 20 posts at a time; in our tests the whole history of @telegram (about 440 posts) loaded in 22 pages.

**Something not working?** Open an issue on the **Issues** tab with the channel name.

# Changelog

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

# Actor input Schema

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

One per line: a username (durov), @username, or link (https://t.me/durov). Only public channels with a web preview work.

## `maxMessagesPerChannel` (type: `integer`):

Newest messages first. Telegram's preview shows 20 per page.

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

Only messages matching this text (Telegram's own channel search).

## `postedWithinDays` (type: `integer`):

Only messages from the last N days. 0 = no limit.

## `onlyPostsNewerThan` (type: `string`):

Date like 2026-09-01. Stops paging back once older messages are reached.

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

Also return one item per channel with title, description, subscribers and counters (free).

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

How many channels to read at the same time.

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

Not needed for normal use. Enable for very large jobs if Telegram starts rate-limiting.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "https://t.me/telegram"
  ],
  "maxMessagesPerChannel": 50,
  "postedWithinDays": 0,
  "includeChannelInfo": true,
  "maxConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `messages` (type: `string`):

No description

## `overview` (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": [
        "telegram"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sourcedirect/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("sourcedirect/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 sourcedirect/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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