# Telegram Channel Scraper: Posts, Views, Reactions and Media (`datagrovehq/telegram-channel-scraper`) Actor

Scrape public Telegram channels: every post with text, date, views, reactions, Stars, photos, videos, links and forwards, plus channel title and subscriber count. Keyword search and date filters. No login, no phone, no API key.

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

## Pricing

$0.50 / 1,000 post scrapeds

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 and Media

Scrape any public Telegram channel. Get every post with its **text, date, views, reactions, paid Stars, photos, videos, link previews and forwards**, plus the channel's title and subscriber count. Go back through the whole archive, filter by date, or search inside a channel by keyword.

- **No login, no phone number, no API key.** It reads Telegram's public web preview (`t.me/s/<channel>`), the same page anyone can open in a browser.
- **Fast and cheap.** Plain HTTP, no browser: 1,000 posts in about a minute.
- **Whole archive.** Pages back from the newest post to the first one, or stop at a date you choose.
- **Pay only for results.** $0.50 per 1,000 posts. No start fee, no monthly rent.

### What you can do with it

- Monitor news, crypto, finance or brand channels and get new posts into a sheet, database or alert.
- Measure what performs: views, reactions and Stars per post, compared across channels.
- Build a text dataset of a channel's history for research, sentiment analysis, RAG or model training.
- Track every post that mentions a keyword in the channels you follow.

### Input

| Field | What it does | Default |
|---|---|---|
| `channels` | Usernames or links: `durov`, `@durov`, `https://t.me/durov`, `https://t.me/s/durov` | |
| `maxPostsPerChannel` | Posts per channel, newest first | 100 |
| `searchKeywords` | Only posts matching these words, using Telegram's in-channel search | |
| `postedAfter` | Only posts on or after this date (YYYY-MM-DD) | |
| `postedBefore` | Only posts before this date (YYYY-MM-DD) | |
| `proxyConfiguration` | Optional Apify Proxy for very large runs | off |

Example:

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

### Output

One result per post. Example (shortened):

```json
{
  "channel": "durov",
  "channelTitle": "Pavel Durov",
  "channelSubscribers": 9950000,
  "postId": 563,
  "url": "https://t.me/durov/563",
  "date": "2026-11-16T17:06:39+00:00",
  "edited": false,
  "text": "Patent trolls are running rampant, empowered by AI. ...",
  "html": "Patent trolls are running rampant, empowered by AI. <br/>...",
  "views": 887000,
  "author": "Pavel Durov",
  "forwardedFrom": null,
  "replyToUrl": null,
  "photos": [],
  "videos": [],
  "documents": [],
  "poll": null,
  "linkPreview": null,
  "links": ["https://t.me/humanbot"],
  "hashtags": [],
  "reactions": [{ "emoji": null, "customEmojiId": "5373223594484587136", "count": 14000 }],
  "reactionsTotal": 23150,
  "paidStars": 3260
}
```

Fields:

- `views`, `reactionsTotal`, `paidStars`: numbers, already converted from Telegram's "887K" style.
- `photos`: image URLs. `videos`: video URL, thumbnail and duration when Telegram shows them.
- `linkPreview`: URL, site name, title, description and image of the link card.
- `forwardedFrom`, `forwardedFromUrl`: the original channel of a forwarded post.
- `replyToUrl`: the post this one replies to.
- `searchKeyword`: the keyword that matched, when you use `searchKeywords`.
- `edited`: true if the post was edited.

If a channel cannot be read, you get one result with an `error` field instead (for example a private channel or a name that does not exist), and the run continues with the other channels.

### Pricing

You pay per post in the dataset: **$0.50 per 1,000 posts**. Error rows are free. Set a maximum cost per run in the run options and the scraper stops cleanly when it reaches it.

### Limits

- Only **public channels** have a web preview. Private channels, groups, bots and personal accounts are not available.
- Some channel owners turn off the web preview; those channels return an error row.
- Telegram shows some media types (for example some videos and stickers) only in the app. Those posts still come with their text and a `mediaNeedsApp: true` flag.
- Reactions that use custom emoji come with their `customEmojiId`; standard emoji come with the emoji itself.
- Video URLs from Telegram's CDN expire after some time. Download them soon after the run if you need the files.

### FAQ

**Do I need a Telegram account?** No. The scraper only reads pages that are public on the web.

**How far back can it go?** To the channel's first post. Use `postedAfter` to stop earlier.

**Can I run it on a schedule?** Yes. Use an Apify schedule with `postedAfter` set to a recent date, or a small `maxPostsPerChannel`, to collect only new posts.

**Something is missing or broken?** Open an issue on the Issues tab with the channel name. We read and answer every one.

# Actor input Schema

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

Public Telegram channels. Use a username (durov), @username, or a link (https://t.me/durov or https://t.me/s/durov).

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

Stop after this many posts from each channel (newest first). With search keywords, the cap applies per channel and keyword.

## `searchKeywords` (type: `array`):

Only posts that match these keywords, using Telegram's own in-channel search. Each keyword is searched in each channel.

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

Optional. Skip posts published before this date (YYYY-MM-DD). Scraping stops once it reaches older posts.

## `postedBefore` (type: `string`):

Optional. Skip posts published on or after this date (YYYY-MM-DD).

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

Not needed for normal use. Turn on if Telegram starts rate-limiting large runs.

## Actor input object example

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

# Actor output Schema

## `results` (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",
        "durov"
    ]
};

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

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

```

## MCP server setup

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