# Telegram Channel Posts Scraper (`leorochasantos/telegram-channel-posts`) Actor

Scrape public Telegram channels without login, phone number, or API key: posts with text, views, media, forwards and link previews, plus exact subscriber counts. Clean typed JSON, $0.001 per post.

- **URL**: https://apify.com/leorochasantos/telegram-channel-posts.md
- **Developed by:** [Leonardo Santos](https://apify.com/leorochasantos) (community)
- **Categories:** Social media, News, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.65 / 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/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 Posts Scraper

Scrape **public Telegram channels** — posts, view counts, media, forwards, link
previews, and exact subscriber counts — as clean, typed JSON. **No login, no phone
number, no Telegram API key, no session files.** Just channel names in, structured
data out, at **$0.001 per post**.

### Why this actor?

- **No credentials, ever.** Works purely from Telegram's public web preview — you never
  risk an account, share a phone number, or manage MTProto sessions.
- **Clean typed output.** Numeric `views` (not `"1.72M"` strings), ISO 8601 dates,
  absolute post URLs, typed `media` arrays, decoded plain `text` plus original `html`.
  Built for LLM pipelines, MCP tools, dashboards, and spreadsheets.
- **Honest error handling.** A nonexistent name, user account, group chat, or
  preview-disabled channel produces one **free, classified error item**
  (`error_code: not_found | group_chat | preview_disabled | ...`) — never pages of
  `null` junk you paid for.
- **Channel metadata included free.** Title, description, **exact** subscriber count,
  photo, and verified badge ship as a free `channel` item with every run.
- **Deep history.** Paginates newest-first to up to 1,000 posts per channel, with an
  `oldestPostDate` cutoff for incremental syncs.
- **Cheap and fast.** HTTP-only (no browser), 256 MB memory, seconds per run,
  $0.001/post — a fraction of what comparable scrapers charge.

### Input

```json
{
  "channels": ["telegram", "@durov", "https://t.me/cointelegraph"],
  "postsLimit": 50,
  "oldestPostDate": "2026-06-01",
  "includeChannelInfo": true
}
```

- `channels` — usernames, @-handles, or t.me URLs (mixed freely, deduplicated, max 50).
- `postsLimit` — newest-first posts per channel (default 20, max 1000). `0` = metadata only.
- `oldestPostDate` — optional ISO date; stops pagination once older posts are reached.
- `includeChannelInfo` — emit the free channel-metadata item (default true).

### Output

One `post` item per post (charged), one free `channel` item per channel, free `error`
items for failed inputs:

```json
{
  "type": "post",
  "input": "durov",
  "channel": "durov",
  "post_id": 531,
  "url": "https://t.me/durov/531",
  "date": "2026-07-16T20:45:25.000Z",
  "text": "Telegram now has a Rich Text Editor...",
  "html": "Telegram now has a <b>Rich Text Editor</b>...",
  "views": 1170000,
  "media": [{ "kind": "video", "url": "https://cdn1.telesco.pe/...", "thumb_url": "https://...", "duration_s": 10 }],
  "link_preview": null,
  "forwarded_from": null,
  "reply_to_post_id": null,
  "author": "Pavel Durov",
  "is_service_message": false,
  "scraped_at": "2026-07-18T19:36:13.707Z"
}
```

```json
{
  "type": "channel",
  "channel": "telegram",
  "title": "Telegram News",
  "description": "The official Telegram on Telegram...",
  "subscribers": 10049444,
  "photos_count": 13,
  "videos_count": 222,
  "links_count": 367,
  "photo_url": "https://cdn1.telesco.pe/...",
  "verified": true
}
```

### Pricing

Pay per result: **one `post-scraped` event ($0.001) per delivered post**. Channel
metadata items and error items are **always free**.

### Use cases

- **Monitoring & alerting** — track news, crypto, and OSINT channels; feed posts into
  Slack/Discord/email alerts with numeric views for signal ranking.
- **LLM & agent pipelines** — clean text + metadata for summarization, classification,
  trend detection, and RAG ingestion (MCP-friendly flat schema).
- **Market & competitor research** — subscriber growth, posting cadence, engagement
  (views) across channels, exported to Sheets or a warehouse.
- **Archiving** — incremental history sync with `oldestPostDate` + post-id dedupe.

### FAQ

**Do I need a Telegram account or API key?** No. The actor reads Telegram's public
web preview. Nothing to register, nothing that can get banned.

**Which channels work?** Public channels with the web preview enabled (the vast
majority of public broadcast channels). Private channels, groups, and user profiles
are out of scope by design — you get a classified free error item instead.

**Are view counts exact?** Telegram publishes abbreviated counts (`1.72M`). The actor
normalizes them to integers (`1720000`), so they are approximate above 1,000.
Subscriber counts on the `channel` item are **exact**.

**Are member lists or phone numbers scraped?** No — this actor deliberately collects
no personal data: channel posts and channel-level metadata only.

**How fresh are media URLs?** Media ships as Telegram CDN URLs, which Telegram
time-limits — download promptly if you need the files themselves.

# Actor input Schema

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

Public Telegram channels to scrape — usernames (<code>durov</code>), @-handles (<code>@telegram</code>), or t.me URLs (<code>https://t.me/cointelegraph</code>). Inputs are trimmed, deduplicated, and capped at 50 channels per run.

## `postsLimit` (type: `integer`):

Maximum number of posts to fetch per channel, newest first (default 20, max 1000). Set 0 with 'Include channel info' on to fetch only channel metadata.

## `oldestPostDate` (type: `string`):

Optional ISO date (e.g. <code>2026-06-01</code>). Stop fetching once posts older than this date are reached.

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

Emit one free channel-metadata item per channel (title, description, exact subscriber count, photo, verified badge).

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

Proxy to use for outgoing requests.

## Actor input object example

```json
{
  "channels": [
    "telegram",
    "durov"
  ],
  "postsLimit": 20,
  "includeChannelInfo": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (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": [
        "telegram",
        "durov"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("leorochasantos/telegram-channel-posts").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": [
        "telegram",
        "durov",
    ] }

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/inWuf9fVHpJ3Jp8YD/builds/WXQ8gFzBzkdTgxexz/openapi.json
