# Telegram Channel Scraper (posts, views, reactions, media) (`tamnt67/telegram-channel-scraper`) Actor

Telegram channel posts scraper: text, date, views, reactions, photos, videos, links and forwards, plus channel title and subscriber count. Takes public channel usernames or t.me links, no login or bot token. Use it to monitor Telegram messages from public news or community channels.

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

## Pricing

from $0.60 / 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 (posts, views, reactions, media)

Export the posts of any public Telegram channel with no login, no bot token, no phone number and no API key, for $1 per 1,000 posts on the Free plan, down to $0.60 on higher plans.

Give the Actor channel usernames or t.me links and get each post with text, date, views, reactions, photos, videos, documents, links, link preview, poll, forward source and reply reference, plus the channel's title, description and subscriber count.

### What you can do with it

- **Monitor news channels.** Schedule a daily run with `postsAfter` and get only the new posts from the channels you follow.
- **Track crypto and finance signals.** Export posts with `views`, `reactions` and `date` and analyse which calls get attention.
- **Watch brands and keywords.** Search `text` and `links` of industry channels for mentions.
- **Research and OSINT.** Archive a channel's history with forward sources (`forwardedFrom`) and reply references (`replyToUrl`).
- **Compare competitor channels.** Use `channelSubscribers`, `views` and `reactionsTotal` to compare reach and engagement.
- **Build AI datasets.** Get clean text, or the original HTML in `textHtml`.

### Output fields

Example values come from a real run on the official `telegram` channel.

| Field | Example |
|-------|---------|
| `channel` / `postId` / `url` | telegram / 460 / https://t.me/telegram/460 |
| `date` | 2026-08-26T19:12:34+00:00 |
| `text` / `textHtml` | plain text with line breaks / original HTML with formatting and links |
| `views` | 2330000 (as Telegram shows it, for example 2.33M) |
| `author` | null (post signature when the channel shows authors) |
| `isEdited` | false |
| `forwardedFrom` / `forwardedFromUrl` | null / null (source of a forwarded post) |
| `replyToUrl` / `replyToText` | null / null (the post this one replies to) |
| `photos` | array of image URLs |
| `videos` | \[{ "url": "https://cdn1.telesco.pe/file/6efb59a075.mp4?token=...", "thumbnail": "...", "duration": "0:12" }] |
| `documents` | array of `{ title, extra }` for files |
| `hasSticker` / `hasVoice` / `hasRoundVideo` | false / false / false (media types without a public URL) |
| `links` | all URLs inside the text |
| `linkPreview` | `{ url, siteName, title, description, image }` (see the example below) |
| `poll` | null, or `{ question, type, voters, options: [{ text, percent }] }` |
| `reactions` / `reactionsTotal` | \[] / 0, or `[{ emoji, customEmojiId, isPaid, count }]` and their sum. Empty for channels that turned reactions off (for example @telegram) |
| `isServiceMessage` | false (true for channel service messages) |
| `hashtags` / `mentions` | \["#news"] / \["@durov"] (from the post text) |
| `mediaType` / `mediaTypes` / `mediaCount` | video / \["video", "link"] / 1. `mediaType` is the main one: video, photo, document, voice, roundVideo, sticker, poll or text |
| `audioUrl` | audio file URL when the preview page includes one, else null |
| `isForwarded` / `replyToPostId` | false / 557 |
| `channelTitle` / `channelUsername` / `channelUrl` / `channelDescription` | Telegram News / telegram / https://t.me/telegram / channel bio |
| `channelSubscribers` / `channelVerified` | 9190000 / true |
| `channelPhotosCount` / `channelVideosCount` / `channelFilesCount` / `channelLinksCount` | 16 / 228 / null / 378 |
| `channelAvatar` / `scrapedAt` | avatar image URL / ISO timestamp |

The channel fields are added to every post. Turn off **Add channel info to every post** to leave them out. With **Channel info only** the run saves one record per channel with `channel` and the channel fields above, and no posts.

Download results as JSON, CSV, Excel or XML, or through the API.

### Example output

One real record from a run on `telegram` (long HTML and image URLs are shortened):

```json
{
  "channel": "telegram",
  "postId": 460,
  "url": "https://t.me/telegram/460",
  "date": "2026-08-26T19:12:34+00:00",
  "text": "For all the info from today's update and a look back at 13 years of Telegram features — check out our blog:\nhttps://telegram.org/blog/welcome-messages-buttons-TG-13\n\nAugust Features\n1 • 2 • 3 • 4 • 5 • More",
  "textHtml": "For all the info from today's update and a look back at <b>13 years of Telegram features</b> — check out our blog:<br>...",
  "views": 2330000,
  "author": null,
  "isEdited": false,
  "forwardedFrom": null,
  "forwardedFromUrl": null,
  "replyToUrl": null,
  "replyToText": null,
  "photos": [],
  "videos": [],
  "documents": [],
  "hasSticker": false,
  "hasVoice": false,
  "hasRoundVideo": false,
  "links": [
    "https://telegram.org/blog/welcome-messages-buttons-TG-13",
    "https://t.me/telegram/455",
    "..."
  ],
  "linkPreview": {
    "url": "https://telegram.org/blog/welcome-messages-buttons-TG-13",
    "siteName": "Telegram",
    "title": "Welcome Messages, Buttons in Messages and Signed Gifts",
    "description": "Introducing Welcome Messages to greet new members of groups or channels, Buttons in Messages to make any text interactive, Inline Documents in Messages and much more.",
    "image": "https://cdn4.telesco.pe/file/IegrSbVkw3WD2PZcfI94CW7_uwqQBR2ER5xLXLwCDJrdggEDvqKIS0y15OIK99To6Kgu...jpg"
  },
  "poll": null,
  "reactions": [],
  "reactionsTotal": 0,
  "isServiceMessage": false,
  "channelTitle": "Telegram News",
  "channelUsername": "telegram",
  "channelUrl": "https://t.me/telegram",
  "channelDescription": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
  "channelSubscribers": 9190000,
  "channelPhotosCount": 16,
  "channelVideosCount": 228,
  "channelFilesCount": null,
  "channelLinksCount": 378,
  "channelVerified": true,
  "channelAvatar": "https://cdn1.telesco.pe/file/OwI3A35Why7I3_ZKL_s2NXZi8bt9KANSrC6yj0yDOp8m...jpg",
  "scrapedAt": "2026-11-05T13:21:39.381Z"
}
```

### How to use

1. Paste channel usernames or links into **Channels**, one per line: `durov`, `@telegram`, `https://t.me/telegram` or `https://t.me/s/telegram`.
2. Set **Max posts per channel** (posts come newest first, 20 per page) and optionally **Only posts after date**, so the run stops when it reaches older posts. That keeps scheduled monitoring runs cheap.
3. Click **Start**. Posts appear in the dataset page by page.

#### Example input

```json
{
  "channels": ["telegram", "durov", "https://t.me/bloomberg"],
  "maxPostsPerChannel": 500,
  "postsAfter": "2026-01-01",
  "includeChannelInfo": true,
  "proxyConfiguration": { "useApifyProxy": true }
}
```

Tips:

- Schedule a daily run with `postsAfter` set to yesterday, or `lastNDays: 1`, to get only new posts. For exact incremental runs pass the highest `postId` of the last run as `afterPostId` (or per channel in `afterPostIds`, for example `{"durov": 450}`).
- Filters: `postsBefore` (date range together with `postsAfter`), `keywords` and `excludeKeywords` (case-insensitive, text and link preview), and `mediaTypes` (photo, video, document, voice, roundVideo, sticker, poll, link, text). Posts that do not match are not saved and not charged.
- `channelInfoOnly: true` returns only the channel profile (subscribers, description, counters), one page request per channel.
- `postsAfter` takes an ISO date such as `2026-01-01` or `2026-01-01T12:00:00Z`. Any other value stops the run at the start with a clear error, before anything is scraped or charged.
- Media URLs may expire; download them soon after scraping if you need them.
- The default Apify datacenter proxy is enough for t.me preview pages.

### Pricing and cost examples

You pay per post saved to the dataset ("Post" event). Platform usage and proxy traffic are already included in the per-post price.

| Apify plan | Price per 1,000 posts |
|------------|-----------------------|
| Free (default price) | $1.00 |
| Bronze | $0.80 |
| Silver | $0.70 |
| Gold, Platinum, Diamond | $0.60 |

Cost examples on the Free plan:

- 100 posts ≈ $0.10
- 1,000 posts ≈ $1.00
- 10,000 posts ≈ $10.00 (≈ $6.00 on Gold and higher plans)

The Apify Free plan includes $5 of platform credit every month. If you spend it only on this Actor, that covers about 5,000 posts per month.

You are charged only for posts saved to the dataset. A channel that does not exist, is private or has no public preview saves nothing. Posts older than `postsAfter` are skipped and not charged. A page that still fails after 4 attempts stops that channel; posts saved before that are kept and charged. Duplicate posts and duplicate channels in the input are skipped. Service messages are saved like posts (with `isServiceMessage: true`) and are charged. To set a hard cap, enter a maximum total charge per run in the run options. The Actor stops as soon as that limit is reached.

### Use it via API, on a schedule, or from an AI agent

**JavaScript** (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('tamnt67/telegram-channel-scraper').call({
    channels: ['telegram', 'durov'],
    maxPostsPerChannel: 200,
    postsAfter: '2026-01-01',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("tamnt67/telegram-channel-scraper").call(run_input={
    "channels": ["telegram", "durov"],
    "maxPostsPerChannel": 200,
    "postsAfter": "2026-01-01",
})

items = client.dataset(run["defaultDatasetId"]).list_items().items
print(items)
```

**cURL** (runs the Actor and returns the posts in one call):

```bash
curl -X POST "https://api.apify.com/v2/acts/tamnt67~telegram-channel-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channels": ["telegram"], "maxPostsPerChannel": 100}'
```

The sync endpoint waits for the run to finish, so use it for small runs and the client libraries for large ones.

**Schedules:** create an Apify Schedule for this Actor or a saved task to collect new posts from the same channels daily or hourly.

**AI agents:** the Apify MCP server at https://mcp.apify.com lets AI assistants such as Claude or Cursor run this Actor and read its results.

### FAQ

#### How much does Telegram Channel Scraper cost?

Telegram Channel Scraper costs $1 per 1,000 posts on the Free plan and $0.80, $0.70 or $0.60 per 1,000 on higher Apify plans. 100 posts cost about $0.10 on the Free plan. The Free plan's $5 monthly credit covers about 5,000 posts.

#### How many posts do I get per channel?

Telegram Channel Scraper returns up to `maxPostsPerChannel` posts for each channel, from 1 to 50,000, newest first. The default is 100. If you set `postsAfter`, the run also stops at the first post older than that date.

#### How can I get more posts?

Raise `maxPostsPerChannel` (up to 50,000) and remove `postsAfter`. Telegram Channel Scraper pages back through the public preview until it reaches the channel's oldest post or your limit.

#### Can I run it on a schedule or through the API?

Yes. Telegram Channel Scraper works with Apify Schedules for daily or hourly runs, and with the Apify API through the JavaScript and Python clients or a single cURL call. It needs no Telegram account, bot token or phone number.

#### How fresh is the data?

Telegram Channel Scraper reads the t.me preview pages live at the time of each run. Nothing is cached. View and reaction counts are what Telegram shows at that moment, and every record has a `scrapedAt` timestamp.

#### Is it legal to scrape Telegram channels?

Telegram Channel Scraper collects only publicly visible posts from public channel preview pages, without logging in. You are responsible for how you use the data, including complying with Telegram's terms of service and with data protection laws such as GDPR. This is not legal advice.

### Limitations

- Only channels with a public preview (t.me/s/username) can be scraped. Private channels, groups and channels that disabled the preview return no posts.
- Media URLs point to Telegram's CDN and may expire after some time.
- Stickers and round videos have no public URL; only the flags `hasSticker` and `hasRoundVideo` are returned. Voice messages get `audioUrl` only when the preview page includes the file; otherwise only `hasVoice`.
- `views`, reaction counts and channel counters are parsed from the rounded numbers Telegram shows (for example 2.33M becomes 2330000).
- Comments under posts are not scraped, and there is no search across all of Telegram: keywords filter the posts of the channels you list.
- `keywords`, `excludeKeywords`, `mediaTypes` and `postsBefore` do not shorten the scan: posts are read newest first until the post limit, `postsAfter`/`lastNDays`/`afterPostId` or the start of the channel is reached.
- `hashtags` and `mentions` are read from the post text with simple patterns.
- `reactions` is empty and `reactionsTotal` is 0 for channels that turned reactions off, such as @telegram. The preview page shows most reactions as an emoji ID, so `emoji` is usually null and `customEmojiId` identifies the reaction; paid star reactions have `isPaid: true`.
- A `postsAfter` value that is not a valid ISO date makes the run fail at the start with an error message; nothing is scraped or charged.
- Channel counters that Telegram does not show are null.
- Telegram can change its preview pages at any time. If the Actor stops returning data, report an issue and it will be fixed quickly.

### Changelog

- 1.0 update (2026-11-23): new filters `postsBefore`, `lastNDays`, `afterPostId`/`afterPostIds` (incremental runs), `keywords`, `excludeKeywords` and `mediaTypes`, a **Channel info only** mode, and new post fields `hashtags`, `mentions`, `mediaType`, `mediaTypes`, `mediaCount`, `audioUrl`, `isForwarded` and `replyToPostId`. Existing inputs and fields work as before.
- 1.0 update (2026-11-19): an API call that leaves out `channels` no longer gets the example value added; the example is used only when the run has no input source at all. The README now explains that `reactions` is empty for channels with reactions turned off and that `emoji` is usually null (use `customEmojiId`).
- 1.0 (2026-11-19): an invalid `postsAfter` date now stops the run at the start with a clear error instead of being ignored.

### Integrations

Works with every Apify integration: API, webhooks, Zapier, Make, Google Sheets, Slack, n8n, LangChain and the Apify MCP server.

### Support

Found a problem or missing field? Report it in the Issues tab of this Actor.

# Actor input Schema

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

Public channel usernames or links, one per line: durov, @telegram, https://t.me/telegram or https://t.me/s/telegram.

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

Newest posts first. Telegram shows 20 posts per page.

## `postsAfter` (type: `string`):

Optional ISO date such as 2026-01-01 or 2026-01-01T12:00:00Z. Older posts are skipped and scraping stops when they are reached.

## `postsBefore` (type: `string`):

Optional. ISO date such as 2026-01-31 or 2026-01-31T12:00:00Z. Newer posts are skipped (not charged); together with "Only posts after date" this gives a date range.

## `lastNDays` (type: `integer`):

Optional. Same as "Only posts after date" set to N days ago. If both are set, the later date wins.

## `afterPostId` (type: `integer`):

Optional. Save only posts with a higher post ID than this (the number at the end of t.me/channel/123). Handy for incremental runs: pass the highest postId of the last run.

## `afterPostIds` (type: `object`):

Optional. Like "Only posts after post ID" but per channel, for example {"durov": 450, "telegram": 380}. Overrides the single value for the channels listed.

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

Optional. Save only posts whose text or link preview contains at least one of these words (case-insensitive). Posts are still read page by page, so a rare keyword in a big channel can take a while; non-matching posts are not charged.

## `excludeKeywords` (type: `array`):

Optional. Skip posts whose text or link preview contains any of these words (case-insensitive).

## `mediaTypes` (type: `array`):

Optional. Save only posts with at least one of these: photo, video, document, voice, round video, sticker, poll, link (links or link preview), text (no media). Empty = all posts.

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

Adds channel title, username, description, subscriber count, media counters, verified flag and avatar to each record.

## `channelInfoOnly` (type: `boolean`):

Save one record per channel with its title, username, description, subscribers, photo/video/file/link counts, verified flag and avatar, and no posts. One page request per channel.

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

Apify datacenter proxy is enough for t.me preview pages.

## Actor input object example

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

# Actor output Schema

## `posts` (type: `string`):

Dataset with one record per post: text, date, views, reactions, photos, videos, documents, links, link preview, poll, forward and reply info, plus channel info.

## `postsCsv` (type: `string`):

The same dataset exported as CSV.

# 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"
    ],
    "maxPostsPerChannel": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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