# Telegram Channel Scraper — posts, views, media, links (`scraper0917/telegram-channel-scraper`) Actor

Export posts from any public Telegram channel: text, date, views, photos, videos, links, forwards, replies, polls, plus channel subscribers and counters. No login. Incremental runs via sinceDate so scheduled monitoring only pays for new posts.

- **URL**: https://apify.com/scraper0917/telegram-channel-scraper.md
- **Developed by:** [Ezden Notghi](https://apify.com/scraper0917) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 results

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?

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

Export posts from any **public** Telegram channel as clean JSON/CSV/Excel: text, date, views, photos, videos, documents, links, forwards, replies, polls, reactions — plus **exact** subscriber counts and channel counters. Look up **profiles** of users, bots, groups and channels (name, verified badge, bio, exact subscriber/member count, photo). No login, no phone number, no API keys: it reads only what Telegram publishes to any browser at `t.me/<name>` and `t.me/s/<channel>`.

Built for monitoring: run it on a schedule with `sinceDate` set to your last run and you pay only for **new** posts.

### What you get

**One `channel` item per channel**

```json
{ "type": "channel", "username": "durov", "title": "Du Rove's Channel", "subscribers": 2960000,
  "photos": 412, "videos": 118, "links": 90, "description": "…", "photoUrl": "https://…" }
```

**One `profile` item per entry in `profiles`** (users, bots, groups, channels)

```json
{ "type": "profile", "username": "BotFather", "kind": "bot", "title": "BotFather", "verified": true,
  "description": "BotFather is the one bot to rule them all…", "handle": "@BotFather", "photoUrl": "https://…" }
```

**One `post` item per post (newest first)**

```json
{ "type": "post", "channel": "durov", "id": 546, "url": "https://t.me/durov/546",
  "date": "2026-09-03T14:02:11+00:00", "text": "…", "views": 1840000,
  "photos": ["https://cdn4.telesco.pe/…jpg"], "videos": [], "documents": [],
  "links": ["https://…"], "forwardedFrom": null, "replyTo": null, "poll": null,
  "linkPreview": { "url": "…", "title": "…" }, "reactions": [{ "emoji": "🔥", "count": 12400 }],
  "channelTitle": "Du Rove's Channel", "channelSubscribers": 2960000 }
```

Polls include question, options with percentages, and voter count. Forwards include the source name and link. Replies include the quoted author and text.

### Input

| Field | Meaning |
|---|---|
| `channels` | Usernames or links in any form: `telegram`, `@durov`, `https://t.me/durov`, `https://t.me/s/durov` |
| `profiles` | Any public entity — users, bots, groups, channels — returns a `profile` item each (works where there are no posts) |
| `maxPostsPerChannel` | Stop after N posts per channel, newest first. `0` = no limit (walks back to `sinceDate` or the first post) |
| `sinceDate` | Only posts on/after this ISO date. **Set this to your last run time for incremental monitoring** |
| `lastNDays` | Shortcut: only posts from the last N days (ignored when `sinceDate` is set) |
| `untilDate` | Only posts before this ISO date |
| `includeChannelInfo` | Copy channel title + subscriber count onto every post (flat CSV-friendly) |
| `extractLinks` | Return every URL in the post text as `links` |
| `proxyConfiguration` | Optional. Telegram's preview is normally reachable without proxies |

### What it cannot do (honestly)

- **Posts** exist only for public channels. Private channels have no preview; groups and users have no post feed. Put those under `profiles` to get their public card, or you'll receive a `profile` item with a `note` (or a `type: "error"` item for names that don't exist) so your pipeline can see it.
- Comments/discussion threads live in linked groups and are not included.
- Reactions and view counts are what Telegram's web preview displays; Telegram rounds large numbers (e.g. `1.8M`). We convert them to integers.
- Very old channels: walking back thousands of posts works, but each 20 posts is one request — use `sinceDate` or `maxPostsPerChannel` to keep runs fast and cheap.

### Pricing

Pay per result. A `channel` item and each `post` count as one result each; `error` items are free of charge in spirit — they're rare and tiny, but note the platform counts every dataset item.

### Typical uses

- Monitor competitor, news, crypto, or community channels into Google Sheets, Slack, or a database (Apify integrations, Zapier, Make).
- Archive a channel's full history with media URLs.
- Feed an AI agent or MCP client with fresh Telegram posts — this Actor works with the Apify MCP server.

### Support

Open an issue on the Actor's Issues tab. Telegram changes its preview markup occasionally; when it does, the fix ships within days and runs are retried automatically.

# Actor input Schema

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

Public channel usernames or links, e.g. `telegram`, `@durov`, `https://t.me/durov`, `https://t.me/s/durov`. Private channels and groups cannot be scraped (no login is ever used).

## `profiles` (type: `array`):

Usernames or links of ANY public Telegram entity — users, bots, groups or channels — e.g. `@BotFather`, `https://t.me/durov`. Returns one `profile` item each: name, verified badge, bio/description, exact subscriber or member count, photo. Works on things that have no post preview (users, bots, groups).

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

Stop after this many posts per channel (newest first). Use 0 for no limit — the scraper then walks back to `sinceDate` or the channel's first post.

## `lastNDays` (type: `integer`):

Shortcut for `sinceDate`: only posts from the last N days. Ignored when `sinceDate` is set.

## `sinceDate` (type: `string`):

Only return posts published on or after this date (ISO 8601, e.g. `2026-08-01` or `2026-08-01T12:00:00Z`). Leave empty for no lower bound. Ideal for scheduled runs: set it to your last run time and you only pay for new posts.

## `untilDate` (type: `string`):

Only return posts published before this date (ISO 8601). Leave empty for no upper bound.

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

Attach channel title, description, subscriber count and counters to every post row (useful for flat CSV exports). Channel info is always emitted once as a separate `type: "channel"` item.

## `extractLinks` (type: `boolean`):

Return every URL found in the post text as a `links` array.

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

Proxies are optional; Telegram's public preview is usually reachable without them. Use Apify Proxy if you hit rate limits on very large runs.

## Actor input object example

```json
{
  "channels": [
    "telegram",
    "durov"
  ],
  "profiles": [
    "BotFather"
  ],
  "maxPostsPerChannel": 100,
  "includeChannelInfo": true,
  "extractLinks": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (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"
    ],
    "profiles": [
        "BotFather"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraper0917/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": [
        "telegram",
        "durov",
    ],
    "profiles": ["BotFather"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scraper0917/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": [
    "telegram",
    "durov"
  ],
  "profiles": [
    "BotFather"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scraper0917/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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