# Telegram Channel Scraper & Keyword Alerts | $1/1K (`surefeed/telegram-channel-scraper`) Actor

Export posts from public Telegram channels: text, date, views, reactions, photos, videos and links. Search keywords inside channels, limit by date, and get only new posts on every scheduled run. No Telegram account or API key.

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

## Pricing

from $0.67 / 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 & Keyword Alerts

Export posts from **public Telegram channels** — text, date, views, reactions, photos, videos and links — for one channel or hundreds in a single run. **Search keywords inside channels**, limit by date, and turn on **alerts** to get only the posts published since the last run.

- **No Telegram account, phone number or API key** — reads the public web preview Telegram itself provides for channels.
- **Keyword search** — uses Telegram's own search inside each channel, across the whole history.
- **Alerts** — `Only posts published since the last run`: schedule it hourly or daily and receive only what is new.
- **Channel context on every row** — title, description and subscriber count.
- **Fast and cheap** — light HTML requests, no browser. $1 per 1,000 posts.
- **Reliable** — automatic proxy fallback; one channel that fails never throws away posts already saved.
- **Posts only** — comments, members and user data are not collected.

### Quick start

| You want | Input |
|---|---|
| Try it | Leave the prefilled example and press Start: 20 latest posts of `@telegram` |
| Latest posts of several channels | `channels: ["durov", "telegram", "bbcnews"]`, `maxPostsPerChannel: 50` |
| Everything about a topic in a channel | `channels: ["durov"]`, `keywords: ["TON", "privacy"]`, `maxPostsPerChannel: 0` |
| Last week's posts | `postedWithinDays: 7`, `maxPostsPerChannel: 0` |
| Hourly keyword alert | `channels: [...]`, `keywords: ["airdrop"]`, `onlyNewPosts: true`, schedule hourly |
| Full channel archive | `maxPostsPerChannel: 0` |

```json
{
  "channels": ["durov", "https://t.me/telegram"],
  "keywords": ["TON"],
  "postedWithinDays": 30,
  "onlyNewPosts": true
}
```

### Input

| Field | Meaning |
|---|---|
| `channels` | Public channel usernames or links (up to 200) |
| `keywords` | Optional. One Telegram search per keyword inside each channel (up to 20); a post found by several keywords is returned once |
| `postedWithinDays` | Only posts from the last N days |
| `maxPostsPerChannel` / `maxTotalPosts` / `maxRunSeconds` | Limits (0 = none). Newest posts come first |
| `onlyNewPosts` / `monitorKey` | Alerts and an optional name for separate alert memories |

Only **public channels** with a web preview can be read. Private channels, groups, user accounts, invite links and channels that disabled the preview are listed as "not readable" in the run status and `RUN_SUMMARY`; if no channel is readable, the run ends with an **"Input problem"** message, no results and no charge.

### Output

```json
{
  "channel": "durov",
  "channelTitle": "Pavel Durov",
  "channelDescription": "Founder of Telegram.",
  "channelSubscribers": 10000000,
  "channelSubscribersText": "10M",
  "postId": "durov/521",
  "messageId": 521,
  "url": "https://t.me/durov/521",
  "postedAt": "2026-06-01T15:40:13+00:00",
  "text": "TON's native currency is becoming Gram. ...",
  "views": 6890000,
  "viewsText": "6.89M",
  "reactions": [{ "emoji": "stars", "count": 3280 }, { "emoji": "custom", "count": 23800 }],
  "reactionsTotal": 35080,
  "photoUrls": [],
  "hasVideo": false,
  "videoUrl": null,
  "linkPreviewUrl": "https://gram.org/",
  "linkPreviewTitle": "GRAM Explorer - TON Blockchain Explorer",
  "links": ["https://gram.org/"],
  "forwardedFrom": null,
  "author": "Pavel Durov",
  "edited": true,
  "searchKeyword": "TON",
  "matchedKeywords": ["TON"]
}
```

- Telegram shows rounded counters ("385K", "10M"); `views` and `channelSubscribers` are those values as numbers.
- `reactions[].emoji` is the emoji for standard reactions, `stars` for paid reactions and `custom` for custom emoji.
- Media URLs are Telegram CDN links and can expire; download what you need soon after the run.
- `matchedKeywords` lists your keywords that appear literally in the text; Telegram's search can also match word forms, so it may be empty for a post found by search.

**Check `RUN_SUMMARY`** in the key-value store for pages read per channel, unreadable channels and why each channel stopped.

### Pricing

Pay per event, no start fee: **$1 per 1,000 posts**. Posts skipped by alerts and duplicates are never charged. Set a maximum cost per run and the Actor stops cleanly before exceeding it.

### Alert setup

1. List your channels and, optionally, keywords.
2. Turn on `onlyNewPosts`. The first run returns the latest posts (up to your limit); later runs return only newer ones.
3. Schedule it in Apify and connect email, Slack, Discord or a webhook to the dataset.

With a per-channel limit, a run returns the newest posts first; if more new posts than the limit were published between two runs, the older ones are not returned later — raise the limit or run more often.

### Notes

- Reads only content that channel owners published publicly. Respect Telegram's terms, copyright and applicable law when reusing posts.
- Not affiliated with or endorsed by Telegram.
- Something wrong or missing? Open an issue with the run link and the expected result.

# Actor input Schema

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

Public channel usernames or links, one per line: durov, @durov or https://t.me/durov. Private channels, groups and invite links (t.me/+...) cannot be read.

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

Return only posts found by Telegram's search inside each channel for these words, one per line (e.g. bitcoin, airdrop, discount). Empty = all posts.

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

Only posts from the last N days. 0 = any date.

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

Newest posts first. 0 = no limit (the whole channel history).

## `maxTotalPosts` (type: `integer`):

Stop the run after this many posts. 0 = no limit.

## `maxRunSeconds` (type: `integer`):

Soft time limit. 0 = no limit.

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

Remembers the latest post returned for each channel (and keyword) in your account, and returns only newer posts. Schedule it hourly or daily for alerts.

## `monitorKey` (type: `string`):

Optional. Keep separate alert memories for the same channels.

## Actor input object example

```json
{
  "channels": [
    "telegram"
  ],
  "postedWithinDays": 0,
  "maxPostsPerChannel": 20,
  "maxTotalPosts": 0,
  "maxRunSeconds": 0,
  "onlyNewPosts": false
}
```

# Actor output Schema

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

Posts produced by the run.

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

Charged posts, pages read per channel, unreadable channels and why each channel stopped.

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

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

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

```

## MCP server setup

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