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

Scrape posts, views, reactions, media and channel stats from public Telegram channels. No login, no API key, no phone number.

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

## Pricing

from $0.35 / 1,000 post 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?

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

Scrapes posts and channel details from public Telegram channels using the public web preview at `t.me/s/<channel>`. No Telegram account, API key or phone number is needed.

### Input

| Field | Description |
|---|---|
| `channels` | Channel usernames or links. `durov`, `@durov` and `https://t.me/durov` are all accepted. |
| `maxPostsPerChannel` | Maximum posts per channel, newest first. Default 100. |
| `postedAfter` | Optional. Stop at posts older than this date (`YYYY-MM-DD`). |
| `searchQuery` | Optional. Keyword or `#hashtag`, matched using Telegram's in-channel search. |
| `includeChannelInfo` | Output one channel record per channel. Default `true`. |
| `proxyConfiguration` | Optional. Not normally needed. |

```json
{
  "channels": ["durov", "https://t.me/telegram"],
  "maxPostsPerChannel": 200,
  "postedAfter": "2026-01-01"
}
```

### Output

Each dataset item has a `type` of `post`, `channel` or `error`.

**Post**

```json
{
  "type": "post",
  "channel": "durov",
  "id": 552,
  "url": "https://t.me/durov/552",
  "date": "2026-10-11T14:52:40+00:00",
  "edited": false,
  "author": "Pavel Durov",
  "text": "Designers × AI ...",
  "textHtml": "...",
  "views": 1340000,
  "reactions": [{ "emoji": "⭐", "customEmojiId": null, "paid": true, "count": 6070 }],
  "photos": [],
  "videos": [{ "url": null, "thumbnailUrl": "https://cdn4.telesco.pe/...", "duration": "1:15" }],
  "documents": [],
  "links": ["https://t.me/designers"],
  "hashtags": [],
  "forwardedFrom": null,
  "replyTo": null,
  "linkPreview": null
}
```

**Channel**

```json
{
  "type": "channel",
  "channel": "durov",
  "url": "https://t.me/durov",
  "title": "Pavel Durov",
  "description": "Founder of Telegram.",
  "verified": true,
  "subscribers": 10300000,
  "photos": 102,
  "videos": 47,
  "files": null,
  "links": 200,
  "avatarUrl": "https://cdn4.telesco.pe/..."
}
```

Counts such as "1.2M" are converted to integers. The dataset includes **Posts** and **Channels** table views, and can be exported as JSON, CSV, Excel or HTML.

### API usage

Run the Actor and get results in one request:

```bash
curl -X POST "https://api.apify.com/v2/acts/solarg~telegram-channel-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"channels": ["durov"], "maxPostsPerChannel": 100}'
```

With the JavaScript client:

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('solarg/telegram-channel-scraper').call({"channels": ["durov"], "maxPostsPerChannel": 100});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

With Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("solarg/telegram-channel-scraper").call(run_input={"channels": ["durov"], "maxPostsPerChannel": 100})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

You can also schedule runs in Apify Console and send results to Google Sheets, Slack, webhooks, Zapier, Make or n8n through Apify's integrations.

### Pricing

- $0.50 per 1,000 posts
- $0.001 per channel record

Platform usage is included in the price.

### Limitations

- Only public channels with a web preview are supported. Private channels, groups and bots return an `error` item.
- Post comments are not available in the web preview.
- Some videos only expose a thumbnail. In that case `url` is `null`.
- Custom emoji reactions are returned as `customEmojiId`, not as a character.

### Notes

The data is publicly visible without logging in, but posts may contain personal data. You're responsible for using it in line with applicable law, such as GDPR.

Report problems in the Issues tab.

# Actor input Schema

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

Public Telegram channels. Usernames (durov, @durov) or links (https://t.me/durov) all work.

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

Newest posts first. The scraper pages back through history until this limit (or the date limit) is reached.

## `postedAfter` (type: `string`):

Stop when posts get older than this date. Format YYYY-MM-DD.

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

Optional keyword or #hashtag. Only matching posts are returned (uses Telegram's own in-channel search).

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

Add one item per channel with title, description, verified badge, subscriber/photo/video/link counts and avatar.

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

Usually not needed. Use only if you see repeated request failures.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "telegram"
  ],
  "maxPostsPerChannel": 20,
  "includeChannelInfo": true
}
```

# Actor output Schema

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

All scraped items in the default dataset.

# 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"
    ],
    "maxPostsPerChannel": 20
};

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

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

```

## MCP server setup

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