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

Scrape public Telegram channels: posts, views, reactions, media links and subscriber counts. No login or proxy needed.

- **URL**: https://apify.com/aswin_dg/telegram-channel-scraper.md
- **Developed by:** [Aswin D G](https://apify.com/aswin_dg) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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.

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

Get posts from any **public Telegram channel** as clean data: text, date, views, reactions, photos, links, hashtags and subscriber counts. No Telegram account, API key or login needed.

### What you can do with it

- **Track competitors and brands**: see what a channel posts, how many people see it and which posts perform best.
- **Monitor news and crypto channels**: pull the latest posts on a schedule and send them to your own tools.
- **Research an audience**: compare subscriber counts, post frequency and reactions across many channels.
- **Search inside channels**: find every post that mentions a word, a product or a person.
- **Build datasets** for analysis or AI projects from public channel content.

### How to use it

1. Add one or more channels. Usernames (`durov`), handles (`@durov`) and links (`https://t.me/durov`) all work.
2. Choose how many posts you want per channel.
3. Click **Start**, then download the results as JSON, CSV or Excel, or read them through the API.

### Input

| Field                       | What it does                                                                                                                        |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **Channels**                | Public channels to scrape.                                                                                                          |
| **Max posts per channel**   | Stops after this many posts, newest first. Default 100.                                                                             |
| **Search inside channels**  | Only returns posts containing this text.                                                                                            |
| **Only posts newer than**   | Skips older posts. `YYYY-MM-DD` means midnight UTC; add a time and offset for your own time zone, like `2026-01-01T00:00:00+05:30`. |
| **Include channel details** | Saves each channel's title, description and subscriber count to the `CHANNELS` key-value store record.                              |
| **Max concurrency**         | How many pages load at once. Lower it if you see errors.                                                                            |

Example:

```json
{
    "channels": ["durov", "telegram"],
    "maxPostsPerChannel": 200,
    "postsNewerThan": "2026-01-01"
}
```

### Output

Each post is one record:

```json
{
    "channel": "durov",
    "postId": 533,
    "url": "https://t.me/durov/533",
    "date": "2026-10-20T14:03:11+00:00",
    "text": "Post text here",
    "views": 7050000,
    "reactions": [{ "emoji": "👍", "count": 120000 }],
    "mediaType": "photo",
    "mediaTypes": ["photo"],
    "mediaUrls": ["https://cdn.example/photo.jpg"],
    "links": ["https://example.com"],
    "hashtags": ["#news"],
    "forwardedFrom": null,
    "replyToPostId": null,
    "authorSignature": null,
    "edited": false,
    "channelTitle": "Pavel Durov",
    "channelSubscribers": 10100000
}
```

Posts that mix media, such as an album with photos and videos, list every type in `mediaTypes`. `mediaType` holds the first one.

With **Include channel details** on, the details of every channel (title, description, subscriber count, media counts, verified badge and avatar) are saved as a list in the `CHANNELS` record of the key-value store, so the posts table stays clean when you export it to CSV or Excel. Each post also carries `channelTitle` and `channelSubscribers`.

### Good to know

- **Public channels only.** Private channels, groups, bots and users have no public page and are skipped with a warning in the log.
- **Post limits.** Telegram shows posts through its public web preview, so what you get is what any visitor can see.
- **Search is done by Telegram**, so it can also match words inside linked pages or previews, not only the visible text.
- **Media files** are returned as links, not downloaded.
- **Respect the rules.** Only collect public information, follow Telegram's terms and your local laws, and avoid collecting personal data you have no reason to hold.

### Tips

- Run it on a **schedule** with **Only posts newer than** to collect new posts every day.
- Use **Search inside channels** to keep results small and cheaper.

### Questions or a feature request?

Open an issue on the Actor page and describe the channel and the data you need. Fixes for Telegram layout changes are made quickly.

# Actor input Schema

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

Public Telegram channels to scrape. Use usernames (durov), @handles (@durov) or links (https://t.me/durov).

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

Stop after this many posts from each channel (newest first).

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

Only return posts that contain this text. Leave empty to get all posts.

## `postsNewerThan` (type: `string`):

Skip posts older than this moment. A plain date like 2026-01-01 means midnight UTC. To use your own time zone, add a time and offset, for example 2026-01-01T00:00:00+05:30. Leave empty for no limit.

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

Also save the title, description, subscriber count and media counts of each channel to the CHANNELS record in the key-value store.

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

How many pages to load at the same time. Lower this if Telegram starts returning errors.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "telegram"
  ],
  "maxPostsPerChannel": 100,
  "searchQuery": "",
  "postsNewerThan": "",
  "includeChannelInfo": true,
  "maxConcurrency": 5
}
```

# Actor output Schema

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

No description

## `channels` (type: `string`):

No description

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

```

## MCP server setup

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