# Telegram Channel Scraper — With Views | $4/1K (`datawell/telegram-channel-scraper`) Actor

Scrape public Telegram channels past the 20-message page limit. Every message carries its view count — the only engagement metric Telegram exposes. Plus media, links, hashtags and subscriber stats. No bot token, no phone number.

- **URL**: https://apify.com/datawell/telegram-channel-scraper.md
- **Developed by:** [datawell](https://apify.com/datawell) (community)
- **Categories:** Social media
- **Stats:** 3 total users, 2 monthly users, 93.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 results

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?

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

## Telegram Channel Scraper

Extract messages from public Telegram channels — with **view counts**, media,
links and subscriber statistics.

No bot token. No phone number. No login.

***

### Why this scraper

**Telegram's own Bot API cannot read foreign channels.** A bot only sees
channels it has been added to as an administrator. That rules out competitor
monitoring, research and anything involving channels you do not control. This
Actor reads the public web mirror instead.

**View counts are included.** Telegram publishes how often each message was
seen — the only engagement number the platform exposes. It arrives here as a
sortable integer, not as `4.48M`.

**Past the 20-message limit.** Each page carries at most 20 messages. Ask for
5,000 and a naive scraper returns 20. This one walks backwards through message
IDs and keeps going.

***

### What you can extract

| Mode | What you get |
|---|---|
| **Channel messages** | Text, view count, date, photos, videos, link previews, hashtags, mentions and forwarding source |
| **Channel info** | Subscriber count plus how many photos, videos, files and links the channel has posted |

***

### Quick start

1. Pick **Channel messages**.
2. Enter a channel — `durov`, `@durov` or `https://t.me/durov` all work.
3. Set **Maximum results**, click **Start**, download as CSV or JSON.

***

### Example inputs

**Recent messages from a channel**

```json
{
  "mode": "messages",
  "channels": ["durov"],
  "maxItems": 2000
}
```

**Monitor several channels at once**

```json
{
  "mode": "messages",
  "channels": ["telegram", "durov", "crypto"],
  "maxItems": 3000
}
```

**Find messages about a topic**

```json
{
  "mode": "messages",
  "channels": ["telegram"],
  "searchQuery": "update",
  "maxItems": 1000
}
```

**Compare channel reach**

```json
{
  "mode": "channels",
  "channels": ["durov", "telegram", "durov_russia"]
}
```

***

### Output fields

#### Messages

| Field | Description |
|---|---|
| `text` | Message content as plain text, emoji preserved |
| `views` | **View count as a number** — Telegram shows `4.48M`, this is sortable |
| `viewsText` | The original wording |
| `date` | When it was posted (ISO 8601) |
| `channel`, `messageId`, `postId`, `url` | Identity and direct link |
| `forwardedFrom`, `isForwarded` | Where a forwarded message came from |
| `hasPhoto`, `hasVideo`, `photoUrl`, `videoUrl` | Attached media |
| `linkPreviewUrl`, `linkPreviewTitle` | Link preview card |
| `hashtags`, `mentions`, `links` | Extracted from the text |
| `isReply`, `isPoll`, `author`, `textLength` | Further context |

#### Channel info

`channel`, `title`, `description`, `subscribers`, `photoCount`, `videoCount`,
`fileCount`, `linkCount`, `image`, `url`

***

### Limits

- **Public channels only.** Private groups and channels without a public handle
  are not accessible — by design, and this Actor does not try to bypass that.
- **View counts are snapshots** from the moment of scraping.
- **Comments are not included.** Telegram hosts channel discussions in a linked
  group, which is a separate space.
- **Very large channels** take time: 20 messages per request means 5,000
  messages need 250 requests.

***

### FAQ

**Do I need a bot token or phone number?**
No. Nothing is required.

**Why not use the official Bot API?**
It only reaches channels where your bot is an admin. For any channel you do not
control, it returns nothing.

**Can I read private channels?**
No, and that is deliberate.

**How far back can I go?**
To the channel's first message, as long as it remains public.

**What formats can I export?**
CSV, Excel, JSON, XML, or straight from the Apify API.

***

### Legal and responsible use

This Actor reads Telegram's own public web preview of public channels. It does
not bypass authentication or access private content.

Message content and channel names can be personal data under GDPR. You remain
responsible for how you store, analyse and republish the output.

# Actor input Schema

## `mode` (type: `string`):

Messages from channels, or just the channel statistics. Each option below says which extra field it needs — fill that one in, the rest are ignored.

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

Channel names, @handles or t.me links — durov, @durov and https://t.me/durov all work. Public channels only.

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

Only messages containing this text. Leave empty for everything.

## `maxItems` (type: `integer`):

Total number of messages to collect. With several channels, the budget is split evenly between them.

## Actor input object example

```json
{
  "mode": "messages",
  "channels": [
    "durov"
  ],
  "searchQuery": "update",
  "maxItems": 200
}
```

# Actor output Schema

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

Message rows with text, view count, date, media and links. Channel rows with subscriber count and content statistics.

## `resultsCsv` (type: `string`):

The same rows as a CSV download, ready for Excel or Google Sheets.

# 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("datawell/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("datawell/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 datawell/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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