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

Export posts, views, reactions and media from any public Telegram channel. No API key, no phone number and no Telegram account needed.

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

## Pricing

from $2.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/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, reactions and media from any public Telegram channel.

No API key. No phone number. No login. No Telegram account of any kind.

### How it works

Telegram publishes a web preview of every public channel at `t.me/s/<channel>`. This Actor reads that, so there is nothing to authenticate and nothing to configure. Give it a channel name and it returns the posts.

### Input

| Field | Description |
|---|---|
| `channels` | Public channel usernames or links, comma separated. Accepts `durov`, `@durov`, `t.me/durov` or `https://t.me/s/durov` |
| `maxPosts` | Cap per channel, so 3 channels at 100 returns up to 300 posts. Each post is one billable result |
| `postsSince` | Stop once posts are older than this date, YYYY-MM-DD |
| `searchText` | Only keep posts containing this text, case insensitive |

Paginating backwards through a channel's history is handled for you, so `maxPosts` is the only thing controlling how far back it goes.

### Output

One item per post.

| Field | Description |
|---|---|
| `channel`, `postId`, `url` | Which channel and post, plus a direct link |
| `datetime` | ISO timestamp of the post |
| `author` | Post author where the channel shows signatures |
| `text`, `textLength` | Post text with line breaks preserved |
| `views` | View count, expanded from Telegram's `4.48M` style to `4480000` |
| `forwardedFrom` | Original channel if the post is a forward |
| `replyTo` | Link to the post being replied to |
| `photos`, `videos`, `hasMedia` | Media URLs attached to the post |
| `links` | External links found in the post text |
| `reactions`, `totalReactions` | Emoji reactions and their counts |
| `scrapedAt` | Retrieval timestamp |

### What this cannot do

Private channels, groups and direct messages are not accessible through the public preview and never will be. If a channel is not visible at `t.me/s/<name>` in a browser, this Actor cannot read it either. Channels set to hide their post history will return nothing.

Some channels disable the web preview entirely. The run tells you which channels failed and why rather than silently returning an empty dataset.

### Uses

**Market and competitor monitoring.** Track announcement channels in crypto, gaming, retail or news.

**Research and OSINT.** Archive public channel output with timestamps and view counts.

**Content and trend analysis.** Find which posts got traction using views and reactions.

**Alerting.** Run on a schedule with `postsSince` set to yesterday and get only what is new.

# Actor input Schema

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

Public channel usernames or links, comma separated. Accepts durov, @durov, t.me/durov or https://t.me/s/durov.

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

Cap applied to each channel separately, so 3 channels at 100 returns up to 300 posts. Each post is one billable result.

## `postsSince` (type: `string`):

Stop once posts are older than this date, YYYY-MM-DD. Leave blank for no limit.

## `searchText` (type: `string`):

Only keep posts whose text contains this string, case insensitive.

## Actor input object example

```json
{
  "channels": "durov",
  "maxPosts": 100
}
```

# 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("spookyweb/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("spookyweb/telegram-channel-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 spookyweb/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=spookyweb/telegram-channel-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/lpgGJahWb4cj0wbVs/builds/qtKPRl5d7NRClRY6X/openapi.json
