# Telegram Channel Scraper - Posts, Views, Exact Date Filter (`dyalaalsharif/telegram-channel-scraper`) Actor

Export posts from public Telegram channels: text, date, views, reactions, photos, videos, links and forwards. Exact date filter and keyword filter. No login or API key. Pay only for posts delivered, never for empty channels.

- **URL**: https://apify.com/dyalaalsharif/telegram-channel-scraper.md
- **Developed by:** [Dyala Alsharif](https://apify.com/dyalaalsharif) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Telegram Channel Scraper — Posts, Views, Exact Date Filter

Export posts from **any public Telegram channel** into JSON, CSV, Excel or Google Sheets, or call it from the API, n8n, Make, Zapier or your AI agent. No Telegram account, phone number or API key is needed.

**You only pay for posts that are delivered.** Empty channels, wrong names, posts outside your dates and posts that do not match your keywords cost nothing.

### What you get

| Field | Example |
| --- | --- |
| `channel`, `channelTitle`, `channelSubscribers`, `channelVerified` | `telegram`, `Telegram News`, `9120000`, `true` |
| `postId`, `url` | `460`, `https://t.me/telegram/460` |
| `date` (UTC, ISO 8601) | `2026-08-26T19:12:34Z` |
| `text` | Full post text with line breaks |
| `views`, `viewsText` | `2550000`, `2.55M` |
| `reactions`, `reactionsTotal` | `[{"emoji":"👍","count":12}]`, `12` |
| `photos`, `videos`, `hasVideo`, `videoDuration` | Direct media links |
| `links`, `hashtags`, `mentions` | Everything linked inside the post |
| `linkPreview` | Site name, title and description of the previewed link |
| `isForwarded`, `forwardedFrom`, `forwardedFromUrl` | Where a forwarded post came from |
| `replyToUrl`, `author`, `isEdited`, `documentTitle`, `pollQuestion` | Extra post details |

### Why this scraper

- **Exact date filter.** Set "Posts from" and "Posts until". The scraper reads newest posts first and stops the moment it reaches older posts, so you are never charged for posts outside your range.
- **No silent failures.** If a channel cannot be read, you get a clear row that says why (wrong name, private channel, group, or preview turned off) and you are not charged.
- **Keyword filter.** Keep only posts that mention your brand, product or topic.
- **Many channels in one run.** Paste names, @handles or t.me links in any mix.
- **Numbers as numbers.** Views, subscribers and reactions come as real numbers (`2550000`), next to the original text (`2.55M`), ready for sorting and charts.
- **Low cost.** It reads Telegram's own public preview pages, so runs are fast and light.

### Use cases

- Monitor news, crypto, deals or competitor channels every day
- Track views and reactions to measure channel engagement
- Collect posts for research, sentiment analysis or AI training data
- Feed new posts into Slack, Google Sheets or your own app with a schedule
- Archive a channel's history

### Input

```json
{
    "channels": ["telegram", "@durov", "https://t.me/s/TelegramTips"],
    "maxPostsPerChannel": 200,
    "dateFrom": "2026-10-01",
    "dateTo": "2026-10-31",
    "keywords": ["update", "premium"]
}
```

- `channels` (required): public channel names or links.
- `maxPostsPerChannel`: newest posts first, default 100.
- `dateFrom`, `dateTo` (optional): days in UTC, both included.
- `keywords` (optional): a post is kept if it contains at least one of them.

### Output example

```json
{
    "channel": "telegram",
    "postId": 460,
    "url": "https://t.me/telegram/460",
    "date": "2026-08-26T19:12:34Z",
    "text": "For all the info from today's update...",
    "views": 2550000,
    "viewsText": "2.55M",
    "reactions": [{ "emoji": "👍", "count": 12, "countText": "12" }],
    "reactionsTotal": 12,
    "photos": [],
    "videos": [],
    "hasVideo": false,
    "links": ["https://telegram.org/blog"],
    "hashtags": [],
    "mentions": [],
    "isForwarded": false,
    "channelTitle": "Telegram News",
    "channelSubscribers": 9120000,
    "channelVerified": true,
    "scrapedAt": "2026-11-15T10:00:00Z"
}
```

### Pricing

**$1.00 per 1,000 posts delivered** ($0.001 per post), plus a tiny start fee per run. Platform usage is included.

Not charged: channels that return nothing, invalid names, posts outside your date range, posts that do not match your keywords, and failed requests.

### What it cannot do

- Private channels, groups, chats and invite links (`t.me/+...`) are not readable. Only public channels with a web preview work.
- It does not read comments, member lists or phone numbers.
- Channels that turned off their web preview, and posts Telegram hides from the preview, are not available.
- Custom emoji reactions are returned with their Telegram ID instead of a picture.

### Is it legal?

The scraper only reads posts that channel owners published publicly and that anyone can open in a browser without logging in. It does not log in, bypass any protection or collect private data. You are responsible for how you use the data, including copyright and privacy rules that apply to you.

This Actor is independent and is not affiliated with, endorsed by or sponsored by Telegram.

### Support

Found a channel that does not work, or need another field? Open an issue on the Issues tab and include the channel name.

# Actor input Schema

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

Public channel names or links. All of these work: telegram, @telegram, https://t.me/telegram. Private channels, groups and invite links (t.me/+...) cannot be read.

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

Newest posts come first. The scraper stops at this number for each channel.

## `dateFrom` (type: `string`):

Only posts published on or after this day (UTC). The scraper stops as soon as it reaches older posts, so you are not charged for them.

## `dateTo` (type: `string`):

Only posts published on or before this day (UTC). Newer posts are skipped and not charged.

## `keywords` (type: `array`):

Keep only posts that contain at least one of these words or phrases (not case sensitive). Posts that do not match are not charged.

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

The default Apify proxy works well for Telegram. You normally do not need to change this.

## Actor input object example

```json
{
  "channels": [
    "telegram"
  ],
  "maxPostsPerChannel": 20,
  "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"
    ],
    "maxPostsPerChannel": 20,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dyalaalsharif/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"],
    "maxPostsPerChannel": 20,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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