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

Scrape any public Telegram channel. Extract posts, view counts, reactions, media URLs. No API key or account needed. Fast, paginated, multi-channel.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

Scrape public Telegram channels — posts, views, media, and engagement metrics. No API key or Telegram account required.

### Features

- **No API key needed** — scrapes public web previews
- **Posts with metadata** — text, date, views, forwards, reactions
- **Media extraction** — photo and video URLs
- **Channel analytics** — subscriber count, posting frequency, engagement rate
- **Pagination** — scrape hundreds of posts per channel
- **Multi-channel** — scrape multiple channels in one run

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `channelUrls` | array | *required* | Channel URLs or usernames (e.g., `https://t.me/durov` or `@durov`) |
| `maxPostsPerChannel` | integer | 100 | Max posts to scrape per channel (0 = all available) |
| `includeMedia` | boolean | true | Extract photo/video URLs |
| `proxyConfiguration` | object | none | Proxy settings for requests |

#### Example input

```json
{
    "channelUrls": ["https://t.me/durov", "@breakingmash", "bbcrussian"],
    "maxPostsPerChannel": 50,
    "includeMedia": true
}
```

### Output

Each post is saved as a dataset item:

```json
{
    "channelName": "durov",
    "channelTitle": "Pavel Durov",
    "channelSubscribers": 10600000,
    "channelDescription": "...",
    "postId": 453,
    "postDate": "2025-10-10T19:02:21+00:00",
    "postText": "The new Telegram update is here...",
    "postUrl": "https://t.me/durov/453",
    "postViews": 6830000,
    "postForwards": null,
    "reactions": [{"emoji": "❤️", "count": 15000}],
    "mediaType": "video",
    "mediaUrl": "https://...",
    "forwardedFrom": null
}
```

### Use Cases

- **Marketing research** — analyze competitor channels, content performance
- **Content strategy** — find best-performing post types and topics
- **Audience analytics** — engagement rates, peak posting times
- **Media monitoring** — track news channels, brand mentions
- **Data journalism** — collect and analyze public discourse

### Pricing

Pay per result: $1.50 per 1,000 posts scraped.

### Limitations

- Only works with **public** channels (channels with public web preview)
- Private channels and groups are not accessible
- Reactions may not be visible on all channels via web preview
- Rate limited to avoid being blocked by Telegram

# Actor input Schema

## `channelUrls` (type: `array`):

List of Telegram channel URLs (https://t.me/channel_name) or just usernames (@channel_name or channel_name)

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

Maximum number of posts to scrape per channel. Set 0 for all available posts.

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

Extract photo and video URLs from posts

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

Proxy settings for requests. Recommended if scraping many channels.

## Actor input object example

```json
{
  "channelUrls": [
    "https://t.me/durov"
  ],
  "maxPostsPerChannel": 100,
  "includeMedia": true
}
```

# 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 = {
    "channelUrls": [
        "https://t.me/durov"
    ]
};

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

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

```

## MCP server setup

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