# Telegram Public Channel Scraper & Incremental Monitor (`clearstack-data/telegram-public-channel-monitor`) Actor

Fast HTTP-only Telegram public channel scraper without login, phone number, or proxies. Extract posts, views, reactions, media URLs, links, and subscriber counts with keyword filters and incremental 'only new messages' monitoring.

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

## Pricing

from $0.75 / 1,000 message scrapeds

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 Public Channel Scraper & Incremental Monitor

Scrape and monitor public **Telegram channels** (`t.me/s/<channel>`) at high speed using pure HTTP — **no Telegram login, no phone number, no session ban risk, and zero proxies required**.

Built for **OSINT**, **crypto/market alerts**, **news & competitor monitoring**, and scheduled **n8n / Make / AI Agent (MCP)** pipelines.

### Key Features

- **Incremental Monitor Mode (`onlyNewSinceLastRun`):** Persists the highest `messageId` seen per channel in an Apify Key-Value Store and outputs/charges **only brand-new posts published since your last run** — ideal for hourly or daily cron alerts.
- **Full Backwards Pagination:** Automatically walks `?before=<messageId>` up to `maxMessagesPerChannel` (up to 2,000 posts per channel) or stops at your optional `sinceDate` cutoff.
- **Rich Structured Output:** Extracts message text, `messageId`, `publishedAt`, `views` + parsed integer `viewsNum`, `reactions` (each with `emoji`, `type` (`emoji`, `custom_emoji` or `paid_stars`), `customEmojiId` and count), `photoUrls`, external `links`, `hashtags`, `mentions`, `forwardedFrom`, `replyToMessageId`, plus channel title and subscriber count.
- **Optional Keyword Filtering:** Pass `keywords` (OR logic) so you only receive and pay for messages matching your topics.
- **Ultra-Low Cost Pure HTTP Engine:** Runs on 256–512 MB RAM with zero browser overhead.

### Example Input

```json
{
  "channels": ["durov", "@telegram", "https://t.me/bloomberg"],
  "maxMessagesPerChannel": 40,
  "onlyNewSinceLastRun": true,
  "monitorStateName": "news-watch",
  "includeMediaUrls": true
}
```

### Example Output

```json
{
  "channel": "durov",
  "channelTitle": "Du Rove's Channel",
  "channelSubscribers": "10.5M",
  "channelSubscribersNum": 10500000,
  "messageId": 547,
  "postUrl": "https://t.me/durov/547",
  "publishedAt": "2026-11-20T12:00:00+00:00",
  "text": "Official announcement text...",
  "views": "2.3M",
  "viewsNum": 2300000,
  "hasPhoto": true,
  "hasVideo": false,
  "hasDocument": false,
  "photoUrls": ["https://cdn4.telesco.pe/file/..."],
  "links": ["https://telegram.org/..."],
  "hashtags": [],
  "mentions": [],
  "forwardedFrom": null,
  "replyToMessageId": null,
  "reactions": [],
  "matchedKeywords": [],
  "isNewSinceLastRun": true,
  "scrapedAt": "2026-11-22T00:40:00.000Z"
}
```

### Pricing (Pay-Per-Event)

Pay only for messages returned (`message-scraped`) plus a small `$0.002` per-run start fee, with **zero extra platform usage costs** charged to you. In Incremental Monitor Mode, previously seen messages are skipped and **never charged again**.

> **Scope note:** Works on all public Telegram channels with web preview enabled (`t.me/s/<channel>`). Private invite-only channels/groups and global keyword search across unknown channels are not supported without a Telegram account.

### Ready-to-Import n8n Template & Claude / Cursor MCP

- **Dedicated MCP server (`get_telegram_channel_posts` tool with spending cap & trimmed output):** install [`clearstack-data-mcp`](https://www.npmjs.com/package/clearstack-data-mcp) ([GitHub](https://github.com/Wordhalm/clearstack-data-mcp)) in Claude Code, Claude Desktop, Cursor, Windsurf, or VS Code:
  ```bash
  claude mcp add clearstack-data -e APIFY_TOKEN=your_token -- npx -y clearstack-data-mcp
  ```
- **Free n8n workflow JSON (Hourly Telegram Channels -> Slack / AI Digest):** [Wordhalm/clearstack-data-automation-templates](https://github.com/Wordhalm/clearstack-data-automation-templates)
- **Apify remote MCP:** `https://mcp.apify.com?tools=clearstack-data/telegram-public-channel-monitor`

### Related Actors by ClearStack Data

- [Google Ads Transparency Center Scraper & Competitor Monitor](https://apify.com/clearstack-data/google-ads-transparency-scraper) — Bulk extract and monitor new competitor Google Ads (Text, Image, Video, EU DSA).
- [EU Company KYB, VAT (VIES) & Official Registry Enricher](https://apify.com/clearstack-data/eu-company-kyb-enricher) — Validate EU-27 VAT and enrich European companies via official APIs.
- [EU TED, France BOAMP & UK Public Tenders Monitor](https://apify.com/clearstack-data/eu-public-tenders-monitor) — Daily EU TED, France BOAMP & UK public tenders feed.

# Actor input Schema

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

List of public Telegram channel usernames or URLs (e.g. 'durov', '@telegram', 'https://t.me/bloomberg', 'https://t.me/s/durov').

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

Maximum number of posts to extract per channel (newest first, automatically paginates backwards).

## `sinceDate` (type: `string`):

Optional ISO date cutoff (e.g. '2026-11-01'). Stops paginating when posts are older than this date.

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

Optional list of keywords (case-insensitive). When provided, only messages matching at least one keyword are returned and charged.

## `onlyNewSinceLastRun` (type: `boolean`):

When enabled, saves the latest message ID per channel in a persistent Apify Key-Value Store and outputs/charges ONLY brand-new posts published since the previous run.

## `monitorStateName` (type: `string`):

Key-Value Store suffix used to persist per-channel cursors when 'onlyNewSinceLastRun' is enabled.

## `includeMediaUrls` (type: `boolean`):

Include extracted photo preview URLs and external links found inside each message.

## `concurrency` (type: `integer`):

Number of channels to scrape in parallel.

## `requestDelayMs` (type: `integer`):

Polite delay between consecutive page fetches per channel.

## `timeoutMs` (type: `integer`):

Maximum wait time per HTTP request in milliseconds.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "telegram",
    "bloomberg"
  ],
  "maxMessagesPerChannel": 40,
  "sinceDate": "",
  "keywords": [],
  "onlyNewSinceLastRun": false,
  "monitorStateName": "default",
  "includeMediaUrls": true,
  "concurrency": 3,
  "requestDelayMs": 300,
  "timeoutMs": 15000
}
```

# Actor output Schema

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

Dataset containing one structured record per public Telegram channel post.

## `runSummary` (type: `string`):

JSON summary with message counts per channel, skipped cursor counts, and channel metadata.

# 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",
        "bloomberg"
    ],
    "keywords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("clearstack-data/telegram-public-channel-monitor").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",
        "bloomberg",
    ],
    "keywords": [],
}

# Run the Actor and wait for it to finish
run = client.actor("clearstack-data/telegram-public-channel-monitor").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",
    "bloomberg"
  ],
  "keywords": []
}' |
apify call clearstack-data/telegram-public-channel-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clearstack-data/telegram-public-channel-monitor"
        }
    }
}
```

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/DrTRf7Yom9XijRq0C/builds/VVeDzpFQrIqpMErUS/openapi.json
