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

Scrape public Telegram channel posts — text, photos, videos, reactions, polls, link previews, and more. No login or API key needed.

- **URL**: https://apify.com/boundary/telegram-channel-scraper.md
- **Developed by:** [Boundary](https://apify.com/boundary) (community)
- **Categories:** Social media, News
- **Stats:** 17 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.00 / 1,000 posts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

Scrape posts from any public Telegram channel — text, photos, videos, reactions, polls, link previews, and more. No login or API key needed.

### Features

- Extracts **full post data**: text (plain + HTML), photos, videos, reactions, views, polls, link previews, inline buttons
- Scrapes **channel metadata**: title, description, subscriber count, avatar, verified status
- Accepts **flexible input**: full URLs, short URLs, @handles, or just the username
- Handles **pagination** automatically — scrape hundreds or thousands of posts
- **No authentication required** — works via Telegram's public web preview
- Supports **multiple channels** in a single run
- Lightweight — uses HTTP requests only, no browser needed

### How much does it cost?

With Telegram Channel Scraper, you can scrape **1,000 posts for about $0.50** in Apify platform credits. One page fetch returns 20 posts, so even large channels are efficient.

Running on the free plan? You can scrape several hundred posts per month at no cost.

### Input

| Field | Description | Default |
|-------|-------------|---------|
| **Channels** | Paste channel URLs from your browser (e.g. `https://t.me/bitcoin`). You can also use the @handle from the channel's profile page. | Required |
| **Post Limit** | Maximum posts per channel (0 = unlimited) | 100 |
| **Not Older Than** | Stop scraping when posts are older than this date (YYYY-MM-DD) | No limit |

### Output example

Each post is saved as a JSON object:

```json
{
  "channelName": "bitcoin",
  "channelTitle": "Bitcoin",
  "channelDescription": "This is the top Telegram channel for #Bitcoin news...",
  "channelImageUrl": "https://cdn5.telesco.pe/file/...",
  "subscriberCount": 211000,
  "isVerified": false,
  "messageId": 18823,
  "messageUrl": "https://t.me/bitcoin/18823",
  "date": "2026-03-12T15:11:31+00:00",
  "isEdited": false,
  "text": "JUST IN: Michael Saylor's Strategy bought over 1,001 bitcoin...",
  "textHtml": "JUST IN: <b>Michael Saylor's Strategy</b> bought over...",
  "views": 6030,
  "reactions": [
    { "emoji": "❤", "count": 31, "isPaid": false },
    { "emoji": "⚡", "count": 25, "isPaid": false }
  ],
  "isGroupedMedia": false,
  "photoUrls": ["https://cdn1.telesco.pe/file/..."],
  "videoUrls": [],
  "videoDurations": [],
  "videoThumbnailUrls": [],
  "linkPreview": null,
  "inlineButtons": null,
  "poll": null,
  "forwardedFrom": null,
  "author": null,
  "scrapedAt": "2026-03-14T01:38:18.104Z"
}
```

### All output fields

| Field | Type | Description |
|-------|------|-------------|
| `channelName` | string | Channel username |
| `channelTitle` | string | Channel display name |
| `channelDescription` | string | Channel bio |
| `channelImageUrl` | string | Channel avatar URL |
| `subscriberCount` | number | Subscriber count |
| `isVerified` | boolean | Whether channel has verified badge |
| `messageId` | number | Telegram message ID |
| `messageUrl` | string | Direct link to the post |
| `date` | string | Post date (ISO 8601) |
| `isEdited` | boolean | Whether the post was edited |
| `text` | string | Plain text content |
| `textHtml` | string | HTML-formatted content (preserves links, bold, etc.) |
| `views` | number | View count |
| `reactions` | array | Emoji reactions with counts |
| `isGroupedMedia` | boolean | Whether post is a media album |
| `photoUrls` | array | Photo CDN URLs |
| `videoUrls` | array | Video CDN URLs (may expire) |
| `videoDurations` | array | Video durations |
| `videoThumbnailUrls` | array | Video thumbnail URLs |
| `linkPreview` | object | Link preview (url, title, description, image) |
| `poll` | object | Poll (question, options with percentages, voter count) |
| `inlineButtons` | array | Bot buttons (rows of {text, url}) |
| `forwardedFrom` | object | Forwarded source (name, url) |
| `replyToMessageId` | number | ID of the message being replied to |
| `author` | string | Post author signature |
| `scrapedAt` | string | When the data was scraped (ISO 8601) |

### Tips

- **Video URLs expire** — photo URLs are permanent, but video CDN URLs have a token that expires after a few hours. Download videos promptly after scraping.
- **Private channels can't be scraped** — this actor uses Telegram's public web preview, so only public channels work. Private channels will be skipped with a clear error message.
- **Use "Not Older Than" to save costs** — for recurring scrapes, set a date cutoff so you only fetch new posts.
- **Post limit is per channel** — if you scrape 3 channels with a limit of 100, you'll get up to 300 posts total.

# Actor input Schema

## `channelUrls` (type: `array`):

Paste channel URLs from your browser (e.g. https://t.me/WallStreetBetsLive). You can also use the @handle shown on the channel's profile page. Note: the @handle may differ from the display name — for example, the channel 'WallStreetBets' has the handle @WallStreetBetsLive.

## `postLimit` (type: `integer`):

Maximum number of posts to scrape per channel, starting from the latest. Set to 0 for unlimited — this will scrape the entire channel history, which may take a long time and cost more for large channels.

## `notOlderThan` (type: `string`):

Stop scraping when posts are older than this date (YYYY-MM-DD). Scrapes from the latest post backwards until this date is reached. Leave empty for no date cutoff.

## Actor input object example

```json
{
  "channelUrls": [
    "https://t.me/telegram"
  ],
  "postLimit": 100
}
```

# 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 = {
    "channelUrls": [
        "https://t.me/telegram"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("boundary/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 = { "channelUrls": ["https://t.me/telegram"] }

# Run the Actor and wait for it to finish
run = client.actor("boundary/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 '{
  "channelUrls": [
    "https://t.me/telegram"
  ]
}' |
apify call boundary/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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