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

Scrape posts from any public Telegram channel - message text, dates, view counts, media and forwards - exported as clean JSON, no login required.

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

## Pricing

from $1.00 / 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.

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

Extract every post from any public Telegram channel - message text, dates, view counts, media, forwards, and link previews. No login, no account, no API credentials required.

### What you get

For every post in the channel, one clean dataset row with:

- **Message text** as plain text, plus the canonical post URL (`https://t.me/channel/123`)
- **Publish date** in ISO 8601 format and the **view count** as a real number (e.g. `1230000`, not "1.23M")
- **Media flags and URLs** - `hasPhoto`, `hasVideo`, and direct `mediaUrls` for photo images and video thumbnails
- **Forward detection** - the name of the original channel when a post is forwarded
- **Link preview URL** and whether the post is a reply
- Scrape **multiple channels in one run** - each row is tagged with its channel
- Paginated output: each run writes a resume cursor so you can fetch a channel's entire history across multiple runs
- Export to JSON, CSV, Excel, or Google Sheets directly from the Apify console

### Use cases

- **OSINT and investigations** - archive and monitor public channels, track narratives, and preserve posts with timestamps and view counts
- **Crypto and trading alpha** - monitor announcement and signal channels and pipe new posts into your own alerting or backtesting stack
- **Brand monitoring** - track mentions, leaks, and sentiment in public communities around your product or industry
- **Research and journalism** - build datasets of channel activity over time for trend, propaganda, or misinformation analysis
- **Competitor watching** - follow competitors' announcement channels and measure engagement via view counts

### How to use

1. Enter one or more **Channels** - usernames (with or without @) or full t.me links
2. Set **Max Items** (default 100 across all channels; set 0 to fetch the full history)
3. Run the actor - posts appear in the **Dataset** tab, newest first, one post per row
4. To keep going where the run stopped: open the **Key-value store** tab, copy the `NEXT_PAGE_ID` value, and paste it into **Page ID** on your next run. If `NEXT_PAGE_ID` is `null`, you've fetched everything.

Note: a small number of channels disable their web preview - those are skipped with a warning in the log.

### Output format

Each dataset record:

```json
{
  "channel": "telegram",
  "messageId": 449,
  "url": "https://t.me/telegram/449",
  "text": "For all the features from this update, like links in poll options...",
  "date": "2026-06-18T14:36:10+00:00",
  "views": 1230000,
  "hasPhoto": false,
  "hasVideo": false,
  "mediaUrls": [],
  "forwardedFrom": "",
  "linkPreviewUrl": "https://telegram.org/blog/watch-apps-and-more",
  "isReply": false
}
```

# Actor input Schema

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

Public Telegram channel usernames (with or without @) or t.me channel URLs.

## `maxItems` (type: `integer`):

Maximum number of posts to return across all channels combined. Set 0 to fetch the full channel history.

## `pageId` (type: `string`):

Paste NEXT\_PAGE\_ID from the previous run's Key-value store to fetch the next page (posts older than this message ID).

## Actor input object example

```json
{
  "channels": [
    "telegram"
  ],
  "maxItems": 100
}
```

# Actor output Schema

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

One record per channel post: channel, messageId, url, text, date, views, hasPhoto, hasVideo, mediaUrls, forwardedFrom, linkPreviewUrl, isReply.

## `nextPageId` (type: `string`):

NEXT\_PAGE\_ID record in the default key-value store. Paste into Page ID on the next run to resume; null when the channel history is exhausted.

# 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"
    ]
};

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

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

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Tl3bBFZCI2cxNmoKB/builds/8U03qwYjacS33eYU1/openapi.json
