# Telegram Channel Scraper — Posts, Views & Engagement (`scrapeai/telegram-channel-scraper`) Actor

Extract posts, view counts, subscriber numbers, and engagement metrics from public Telegram channels. Pure HTTP via t.me/s/ public preview — no API key, no login. Track competitors, monitor channels, and analyze reach for growth and market research. Clean JSON.

- **URL**: https://apify.com/scrapeai/telegram-channel-scraper.md
- **Developed by:** [ScrapeAI](https://apify.com/scrapeai) (community)
- **Categories:** Social media, Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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 — Posts, Views & Engagement

Extract posts, view counts, subscriber numbers, and engagement metrics from public Telegram channels with high speed. Pure HTTP via `t.me/s/` public preview — **no API key, no session token, no login required**.

***

### What does Telegram Channel Scraper do?

**Telegram Channel Scraper** extracts posts, views, channel metrics, and media content from public Telegram channels via public web preview.

It serves as a fast, reliable, and lightweight alternative to Telegram API credentials for competitor analysis, channel monitoring, trend detection, content aggregation, and market research.

- **Extract Posts & Metrics:** Scrape post IDs, text content, publication timestamps, view counts, and calculated engagement rates (% of subscribers viewing posts).
- **Channel Overview:** Extract total subscriber counts, channel title, description/bio, profile photo, and official verification status.
- **Media & Attachments:** Detect photos, videos, documents, and external link previews, along with direct media asset URLs.
- **Dynamic Dataset Outputs:** Export clean JSON, CSV, Excel, HTML, or XML datasets dynamically based on your `INPUT.json` configuration.

***

### Why use Telegram Channel Scraper?

- **Zero Credentials Needed:** Operates completely via public web preview (`t.me/s/`) without requiring `API_ID`, `API_HASH`, or phone logins.
- **Blazing Fast Speed:** Built on Cheerio HTTP parsing without browser automation overhead — scrape hundreds of channel posts in seconds.
- **Automatic Pagination:** Automatically paginates backwards through channel history to fetch up to your specified `maxPosts` limit.
- **Engagement Rate Analysis:** Automatically calculates post reach and engagement rates (`(views / subscribers) * 100`) for data-driven channel benchmarking.
- **Apify Integration:** Run on schedules, trigger via Webhooks, or consume via Apify REST API.

***

### What data can Telegram Channel Scraper extract?

#### Post Output Fields

| Field Name | Type | Description |
|---|---|---|
| `itemType` | String | Data type identifier (`"post"`) |
| `channelUsername` | String | Telegram channel handle (e.g. `durov`) |
| `channelTitle` | String | Channel display title |
| `postId` | Integer | Unique numeric post ID |
| `postUrl` | String | Direct web URL to the post (e.g. `https://t.me/durov/215`) |
| `publishedAt` | String | ISO 8601 publication timestamp |
| `text` | String | Clean plain text message content |
| `html` | String | Formatted HTML content of the post |
| `views` | Integer | Numeric view count |
| `viewsFormatted` | String | Formatted view count string (e.g. `15.2K`, `1.2M`) |
| `subscriberCount` | Integer | Total subscriber count of the channel |
| `subscriberCountText` | String | Formatted subscriber text |
| `engagementRate` | Float | Calculated view-to-subscriber percentage (`views / subscribers * 100`) |
| `hasPhoto` | Boolean | `true` if post contains images |
| `hasVideo` | Boolean | `true` if post contains video files |
| `hasDocument` | Boolean | `true` if post contains downloadable documents |
| `hasLinkPreview` | Boolean | `true` if post includes a web link preview card |
| `mediaUrls` | Array | Direct URLs to attached photo/video assets |
| `isVerified` | Boolean | `true` if channel has Telegram's verified badge |
| `telegramUrl` | String | Public web URL for channel (`https://t.me/durov`) |
| `scrapedAt` | String | ISO 8601 timestamp when data was extracted |

#### Channel Summary Fields (`itemType: "channel_summary"`)

| Field Name | Type | Description |
|---|---|---|
| `channelUsername` | String | Telegram handle |
| `channelTitle` | String | Display title |
| `description` | String | Channel bio / description |
| `subscriberCount` | Integer | Numeric subscriber count |
| `subscriberCountText` | String | Formatted subscriber count |
| `isVerified` | Boolean | Verification status |
| `photoUrl` | String | Channel profile photo URL |
| `telegramUrl` | String | Channel URL |

***

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `channels` | Array | `["durov", "telegram"]` | List of channel handles or URLs |
| `channelList` | String | `""` | Alternative newline-separated channel list |
| `maxPosts` | Integer | `50` | Max posts per channel to extract |
| `outputType` | String | `"all"` | Output dataset mode (`"posts"`, `"channel_summary"`, `"all"`) |
| `includeChannelInfo` | Boolean | `true` | Embed channel title & subscriber count in each post |
| `proxyConfiguration` | Object | `{}` | Apify proxy configuration |
| `maxConcurrency` | Integer | `10` | Maximum parallel requests |
| `debugLog` | Boolean | `false` | Enable verbose debug logging |

#### Example `INPUT.json`

```json
{
  "channels": [
    "durov",
    "https://t.me/techcrunch"
  ],
  "maxPosts": 50,
  "outputType": "all",
  "includeChannelInfo": true,
  "debugLog": false
}
```

***

### Output Example

```json
[
  {
    "itemType": "channel_summary",
    "channelUsername": "durov",
    "inputUrl": "durov",
    "channelTitle": "Durov's Channel",
    "description": "Thoughts from Pavel Durov, founder of Telegram.",
    "subscriberCount": 11340520,
    "subscriberCountText": "11 340 520 subscribers",
    "isVerified": true,
    "photoUrl": "https://cdn4.cdn-telegram.org/file/...",
    "telegramUrl": "https://t.me/durov",
    "scrapedAt": "2026-08-06T14:50:00.000Z"
  },
  {
    "itemType": "post",
    "channelUsername": "durov",
    "channelTitle": "Durov's Channel",
    "subscriberCount": 11340520,
    "subscriberCountText": "11 340 520 subscribers",
    "postId": 215,
    "postUrl": "https://t.me/durov/215",
    "publishedAt": "2026-08-01T15:30:00+00:00",
    "text": "Telegram has surpassed 950 million active users this month.",
    "views": 2400000,
    "viewsFormatted": "2.4M",
    "engagementRate": 21.16,
    "hasPhoto": true,
    "hasVideo": false,
    "hasDocument": false,
    "hasLinkPreview": false,
    "mediaUrls": [
      "https://cdn4.cdn-telegram.org/file/..."
    ],
    "isVerified": true,
    "telegramUrl": "https://t.me/durov",
    "scrapedAt": "2026-08-06T14:50:01.000Z"
  }
]
```

***

### How to use Telegram Channel Scraper

1. **Enter Channels:** Add usernames or URLs in the `channels` list (e.g. `"durov"`, `"@telegram"`).
2. **Set Post Limit:** Choose how many recent posts to fetch per channel using `maxPosts`.
3. **Select Output Mode:** Set `outputType` to `"posts"`, `"channel_summary"`, or `"all"`.
4. **Run Scraper:** Click **Start** on Apify Console or run locally with `apify run`.
5. **Export Data:** Download in JSON, CSV, or Excel format.

***

### FAQ & Legal Disclaimer

> **Disclaimer:** This Actor extracts data publicly available via Telegram web preview (`t.me/s/`). It does not bypass private channel access control or extract private user data. Users are responsible for ensuring compliance with applicable data protection regulations (such as GDPR) and terms of service.

# Actor input Schema

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

List of Telegram channel handles or URLs (e.g. 'durov', '@telegram', 'https://t.me/techcrunch').

## `channelList` (type: `string`):

Newline-separated list of Telegram channel usernames or URLs.

## `maxPosts` (type: `integer`):

Maximum number of recent channel posts to extract per channel (0 for channel summary only).

## `outputType` (type: `string`):

Choose which data items to output to the dataset: posts only, channel summary only, or all.

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

Whether to embed channel title, username, and subscriber count into each extracted post object.

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

Proxy options for scraping Telegram public web preview.

## `maxConcurrency` (type: `integer`):

Maximum parallel HTTP requests.

## `debugLog` (type: `boolean`):

Enable verbose debug logging.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "telegram"
  ],
  "maxPosts": 50,
  "outputType": "all",
  "includeChannelInfo": true,
  "maxConcurrency": 10,
  "debugLog": false
}
```

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

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

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

```

## MCP server setup

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