# Telegram Channel Scraper (`garnet_puppet/telegram-channel-scraper`) Actor

Give it a public Telegram channel and get its profile plus messages: text, exact publish time, views, reactions, forwards, replies and media links. Subscriber counts are exact, not the rounded 11M the preview page shows. Channels with no web preview return the reason, not an empty file.

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

## Pricing

from $1.00 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

Export messages and channel profiles from **public Telegram channels** over plain HTTP.

No login. No API key. No phone number. No browser — which is why it is fast and cheap.

Give it a channel username and you get the channel profile plus its messages: text, exact publish time, view counts, reactions, forwards, replies, media links, link previews, hashtags, mentions and e-mail addresses found in the text.

***

### What makes this one different

Three things this Actor does that the alternatives do not.

#### 1. Subscriber counts are exact, not rounded

Telegram's public preview page shows `11M subscribers`. Several scrapers parse that rounded label and hand you an integer, which looks precise but is not.

This Actor reads the channel profile page as well and returns the **real number**:

```json
{ "subscriberCount": 11030508, "subscriberCountIsApproximate": false }
```

If the exact number cannot be read, the flag flips to `true` instead of quietly pretending.

#### 2. View counts tell you when they are approximate

Telegram rounds view counts on the preview page (`2.78M`). You get all three pieces, so you can compute with the number *and* know how precise it is:

```json
{ "viewCount": 2780000, "viewCountRaw": "2.78M", "viewCountIsApproximate": true }
```

Small counts arrive exact and the flag is `false`.

#### 3. Channels without a web preview return a reason, not an empty file

About **14% of public channels turn their web preview off**, and Telegram groups never had one. Most scrapers return an empty dataset and leave you guessing whether the channel is dead, private, misspelled — or whether the scraper broke.

This Actor always emits the channel record with the reason:

| Input | `entityKind` | `previewAvailable` | `unavailableReason` | `subscriberCount` |
|---|---|---|---|---|
| `durov` | `channel` | `true` | `null` | `11030508` |
| `coindesk` | `channel` | `false` | `preview_disabled` | `11442` |
| `python` | `group` | `false` | `is_group` | `97001` |
| `nasa` | `not_found` | `false` | `not_found` | `null` |

Note the second row: the channel's messages are unavailable, but you still get its subscriber count.

***

### Input

```json
{
  "channels": ["durov", "@binance_announcements", "https://t.me/s/telegram"],
  "maxMessagesPerChannel": 100
}
```

Channel names are accepted in every common form: `durov`, `@durov`, `t.me/durov`, `https://t.me/s/durov`, or a link to a single message.

| Option | Default | What it does |
|---|---|---|
| `channels` | `["durov"]` | Channel usernames or `t.me` links. |
| `maxMessagesPerChannel` | `100` | Messages per channel. Telegram serves 20 per page request. |
| `searchQuery` | — | Return only messages matching this keyword **inside** the given channels. |
| `sinceDate` | — | ISO date. Pagination stops once older messages are reached. |
| `afterMessageId` | — | Manual watermark: only messages with a higher ID. |
| `incremental` | `false` | Remember the last message ID per channel; the next run returns only what is new. |
| `includeChannelInfo` | `true` | Emit one channel record per channel. |
| `includeMedia` | `true` | Return media URLs. Files are never downloaded. |
| `extractEmails` | `true` | Find e-mail addresses written in the message text. |
| `verifyEmails` | `true` | MX lookup per address, with provider, role, free and disposable flags. |
| `maxRequestsPerChannel` | `60` | Safety cap on page requests for a single channel. |

***

### Output

One dataset with two record types, told apart by `recordType`.

#### Channel record

```json
{
  "recordType": "channel",
  "channelUsername": "durov",
  "channelUrl": "https://t.me/durov",
  "channelTitle": "Pavel Durov",
  "channelDescription": "Founder of Telegram.",
  "channelPhotoUrl": "https://cdn4.telesco.pe/file/...jpg",
  "channelVerified": true,
  "subscriberCount": 11030508,
  "subscriberCountIsApproximate": false,
  "previewAvailable": true,
  "unavailableReason": null,
  "entityKind": "channel",
  "messagesScraped": 100,
  "scrapedAt": "2026-08-27T18:00:00.000Z"
}
```

#### Message record

Channel identity is repeated on every message row, so a spreadsheet export works on its own.

```json
{
  "recordType": "message",
  "channelUsername": "durov",
  "channelTitle": "Pavel Durov",
  "subscriberCount": 11030508,

  "messageId": 542,
  "messageUrl": "https://t.me/durov/542",
  "postedAt": "2026-08-15T13:29:20+00:00",
  "text": "The International Olympiad in Informatics ends today...",

  "viewCount": 2780000,
  "viewCountRaw": "2.78M",
  "viewCountIsApproximate": true,

  "authorSignature": null,
  "isEdited": false,
  "isForwarded": false,
  "forwardedFrom": null,
  "forwardedFromUrl": null,
  "isReply": false,
  "replyToMessageId": null,

  "reactions": [
    { "kind": "paid", "emoji": null, "emojiId": null, "count": 5460, "countRaw": "5.46K", "countIsApproximate": true },
    { "kind": "custom", "emoji": null, "emojiId": "5465587407350942612", "count": 38500, "countRaw": "38.5K", "countIsApproximate": true }
  ],
  "reactionCount": 78700,

  "links": ["https://stats.ioinformatics.org/results/2026"],
  "hashtags": [],
  "mentions": [],
  "linkPreview": null,

  "media": [],
  "hasPhoto": false,
  "hasVideo": false,
  "hasVoice": false,

  "emails": [],
  "contentHash": "38bcfd6b9dc4d22b...",
  "sourceUrl": "https://t.me/s/durov",
  "scrapedAt": "2026-08-27T18:00:00.000Z"
}
```

Messages arrive **oldest first**, so an incremental feed reads in chronological order.

A field that is not on the page comes back as `null` — never invented. A channel with no reactions returns `reactions: null`, not an empty list, because "none" and "zero" are different answers.

#### Reactions

`kind` tells you what the reaction actually is:

- `standard` — a plain emoji; the character is in `emoji`
- `custom` — a custom emoji; Telegram serves only an ID, so `emoji` is `null` and `emojiId` is set
- `paid` — a Telegram Stars reaction, which carries no emoji at all

Counts follow the same honesty rule as views: `count`, `countRaw` and `countIsApproximate`.

#### E-mail addresses

Every address found in the message text is checked against DNS and returned with what is known about it:

```json
{
  "address": "team@acme-labs.io",
  "status": "deliverable_domain",
  "mxProvider": "Google Workspace",
  "isFreeProvider": false,
  "isRoleAccount": false,
  "isDisposable": false,
  "mxChecked": true,
  "smtpChecked": false,
  "mailboxVerified": null
}
```

**Mailbox existence is never claimed.** `smtpChecked` is always `false` and `mailboxVerified` is always `null`, because the SMTP handshake that would prove it is not possible from this platform. The strongest honest answer is `deliverable_domain`: the domain accepts mail, the individual mailbox is unknown.

***

### Incremental mode

Turn on `incremental` and the Actor remembers the highest message ID it delivered for each channel. The next run returns only newer messages.

The watermark advances **only past messages that were actually delivered**, and it is written per channel as soon as that channel finishes. If a run stops halfway, nothing is lost and nothing is billed twice.

Pair it with a schedule to keep a channel mirrored with one small run per hour.

***

### Limits, stated plainly

- **Public channels only.** Private channels, groups and direct messages are out of reach without an account, and this Actor never asks for one.
- **About 14% of public channels disable their web preview.** Those return a channel record with `previewAvailable: false` and no messages. There is no way around it without an account.
- **Comments and discussion threads are not included.**
- **Cross-channel keyword search is not supported.** Telegram has no public endpoint for it. `searchQuery` searches *inside* the channels you name.
- **Media files are not downloaded.** You get URLs; fetch what you need yourself.
- **Polls and documents are not parsed.** They were not found in any channel sampled while building this, and untested extraction is not shipped.
- **View and reaction counts are rounded by Telegram** above a few thousand. The `*IsApproximate` flags tell you exactly when.

***

### Frequently asked questions

**Is this Actor affiliated with Telegram?**
No. It reads the same public pages your browser gets at `t.me/<channel>`, with no account and
no API key.

**Why did a channel return a profile but no messages?**
About 14% of public channels turn their web preview off, and Telegram groups never had one.
Those return `previewAvailable: false` with the reason — and the subscriber count is still
filled in, which is the part most scrapers drop.

**Can it read private channels or groups?**
No. There is no login and no account, so anything behind Telegram's sign-in wall is out of
reach by design.

**Why is the subscriber count sometimes marked approximate?**
The message page shows a rounded figure (`11M`). This Actor fetches the profile page for the
exact number (`11 031 634`) and only falls back to the rounded one when the profile cannot be
read — and then it says so with `subscriberCountIsApproximate: true` instead of passing a
rounded number off as exact.

**Is this legal?**
It reads public pages only, with no login. `t.me` publishes no `robots.txt`, and no private
data is accessed.

### How it works

Three public pages, nothing else:

| Page | What it gives |
|---|---|
| `t.me/<channel>` | exact subscriber count, title, description, photo, verified badge |
| `t.me/s/<channel>` | 20 messages per request |
| `t.me/s/<channel>?before=<id>` | the previous 20 messages |
| `t.me/s/<channel>?q=<keyword>` | in-channel search, also paginated |

No headless browser, no proxy, no account. That is where the low run cost comes from.

# Actor input Schema

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

Public channel usernames or t.me links. Accepted forms: durov, @durov, t.me/durov, https://t.me/s/durov.

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

How many messages to return for each channel. Telegram serves 20 messages per page request.

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

Optional keyword. When set, only messages matching this keyword inside the given channels are returned.

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

ISO date, for example 2026-01-31. Pagination stops once older messages are reached.

## `afterMessageId` (type: `integer`):

Manual watermark. Only messages with a higher ID are returned.

## `incremental` (type: `boolean`):

Remember the last message ID per channel and return only new messages on the next run.

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

Emit one channel record per channel with the exact subscriber count, title, description and photo.

## `includeMedia` (type: `boolean`):

Return photo, video, voice and sticker URLs. Files are never downloaded.

## `extractEmails` (type: `boolean`):

Find e-mail addresses written in the message text.

## `verifyEmails` (type: `boolean`):

Run an MX lookup for every extracted address and report provider, role, free and disposable flags. Mailbox existence is never claimed.

## `maxRequestsPerChannel` (type: `integer`):

Hard safety cap on the number of page requests made for a single channel.

## Actor input object example

```json
{
  "channels": [
    "durov"
  ],
  "maxMessagesPerChannel": 100,
  "incremental": false,
  "includeChannelInfo": true,
  "includeMedia": true,
  "extractEmails": true,
  "verifyEmails": true,
  "maxRequestsPerChannel": 60
}
```

# Actor output Schema

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

One record per channel (profile with the exact subscriber count) and one per message (text, exact publish time, views, reactions, forwards, replies, media links and e-mail addresses).

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

Counts for the whole run: channels processed, messages delivered, requests made, and how many channels returned no messages. Read this to see whether the run did what you expected.

# 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"
    ]
};

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

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

```

## MCP server setup

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