# Telegram Channel Scraper: Messages, Posts & Views (`elquidata/telegram-channel-scraper`) Actor

Scrape messages and posts from public Telegram channels: text, date, views, reactions, media links and forwards. No login, phone number or bot token. Incremental mode returns only posts published since your last run, so scheduled runs never pay twice for the same message.

- **URL**: https://apify.com/elquidata/telegram-channel-scraper.md
- **Developed by:** [Elqui Data](https://apify.com/elquidata) (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.50 / 1,000 messages

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

Get the messages of any public Telegram channel as clean JSON, CSV or Excel: text, date, views, reactions, media links, forwards, replies and more. No Telegram account, phone number, API ID or bot token is needed.

The feature that sets it apart is **incremental mode**: the Actor remembers the last message it delivered for each channel and, on the next run, returns only what was published after it. Schedule it every hour or every day and you never pay twice for the same message.

### What you can do with it

- **Monitor channels**: feed new posts into Slack, a database, a spreadsheet or an AI agent as they appear.
- **Track markets and news**: follow crypto, finance or news channels and extract tickers (`$BTC`), hashtags and links.
- **Research and OSINT**: export the full public history of a channel with dates, views and reactions.
- **Measure content performance**: compare views and reactions across posts and channels.

### Features

- Works with usernames (`durov`), handles (`@durov`) and links (`https://t.me/durov`).
- Many channels per run, scraped in parallel.
- Incremental mode with independent, named positions for different pipelines.
- In-channel search and date filters, with relative dates such as `7 days`.
- Structured output: views and reaction counts as numbers, media grouped per message, links, hashtags, cashtags and mentions already extracted.
- Stops cleanly at the maximum charge you set for the run and resumes from that point next time.
- Channels that fail are reported in the run summary and are never charged.

### Input

| Field | What it does |
| --- | --- |
| `channels` | Public channels to scrape: usernames, handles or links. Required. |
| `maxMessagesPerChannel` | Maximum messages returned per channel in this run. Default 100. |
| `onlyNewMessages` | Incremental mode: return only messages newer than the last one delivered. |
| `stateName` | Name of the position used by incremental mode. Use one name per independent pipeline. |
| `searchQuery` | Return only messages matching this text (Telegram's in-channel search). |
| `dateFrom`, `dateTo` | Keep only messages posted in this period. Accepts dates or values such as `7 days`. UTC. |
| `includeHtml` | Add the original HTML formatting of each message. |
| `proxyConfiguration` | Proxy settings. The default works for almost every case. |

Example: the latest 200 posts of two channels.

```json
{
    "channels": ["telegram", "https://t.me/durov"],
    "maxMessagesPerChannel": 200
}
```

Example: a scheduled monitor that returns only new posts mentioning "listing".

```json
{
    "channels": ["binance_announcements"],
    "onlyNewMessages": true,
    "stateName": "listing-alerts",
    "searchQuery": "listing",
    "maxMessagesPerChannel": 500
}
```

### Output

One dataset item per message:

```json
{
    "channel": "telegram",
    "channelTitle": "Telegram News",
    "messageId": 441,
    "url": "https://t.me/telegram/441",
    "date": "2026-05-14T16:08:31+00:00",
    "text": "Bot-to-Bot Communication. Bots are now able to respond to other bots, not just users.\n\n...",
    "views": 1700000,
    "reactionsCount": 0,
    "reactions": [],
    "author": null,
    "isEdited": false,
    "forwardedFrom": null,
    "replyToMessageId": null,
    "replyToUrl": null,
    "links": ["https://t.me/telegram/440", "https://t.me/telegram/442"],
    "hashtags": [],
    "cashtags": [],
    "mentions": [],
    "media": [
        {
            "type": "video",
            "url": "https://cdn1.telesco.pe/file/....mp4",
            "thumbnailUrl": "https://cdn1.telesco.pe/file/...",
            "durationSeconds": 6,
            "postUrl": "https://t.me/telegram/441"
        }
    ],
    "linkPreview": null,
    "buttons": [],
    "isUnsupported": false,
    "scrapedAt": "2026-11-15T23:14:41.120000+00:00"
}
```

| Field | Notes |
| --- | --- |
| `views`, `reactionsCount`, `reactions[].count` | Numbers. Telegram rounds large values (1.7M), so they are approximate above 1,000. |
| `reactions` | Emoji and count. Custom emoji carry a `customEmojiId`; paid star reactions carry `isPaid`. |
| `author` | Post signature, when the channel shows who wrote the post. |
| `forwardedFrom` | Name, link and author of the original source of a forwarded post. |
| `media` | Photos, videos, round videos, voice notes, audio, documents, stickers, polls and locations. Albums appear as one message with several items. |
| `linkPreview` | Site name, title, description and image of the link card under a post. |
| `isUnsupported` | `true` when Telegram shows the post only inside its apps. The item still has its date, views and link. |

A record named `SUMMARY` in the run's key-value store lists every channel with its status, the number of messages delivered, its title and its subscriber count.

### Incremental mode in detail

1. **First run**: returns the latest `maxMessagesPerChannel` messages, newest first, and saves the newest message as the starting point.
2. **Later runs**: return only messages published after that point, **oldest first**, and move the point forward.
3. **Large backlogs**: if more messages arrived than the limit allows, the run delivers the oldest part and the next run continues from there. Nothing is skipped.
4. **Stopped runs**: the position is saved after every page, so a run that is aborted or reaches its maximum charge resumes without duplicates.

Positions are stored per channel in a named key-value store called `telegram-channel-scraper-state` in your account. Delete a key there to start a channel again from scratch, or change `stateName` to keep a separate position.

### Pricing

You pay per message stored in the dataset. Channels that cannot be scraped cost nothing, and Telegram's service notices ("Channel created", "Channel photo updated") are skipped and not charged. Set a maximum charge for a run and the Actor stops exactly there.

### Limits you should know about

- Only **public channels** with a web preview at `t.me/s/<name>` work. Private channels, groups, comments and member lists are out of reach, and this Actor does not try to access them.
- Telegram serves 20 messages per request. Expect roughly 1,500 messages per minute per channel.
- Media links point to Telegram's CDN and expire after a while. Download the files soon after the run if you need them.
- A small share of posts is shown only inside Telegram's apps. They are delivered with `isUnsupported: true` and without text.

### Use it from code or from an AI agent

The Actor works with the Apify API, the JavaScript and Python clients, scheduled tasks, webhooks, integrations such as Make, n8n and Zapier, and the Apify MCP server. Its input and output are stable and documented above, so an agent can call it without extra instructions.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("elquidata/telegram-channel-scraper").call(run_input={
    "channels": ["telegram"],
    "onlyNewMessages": True,
})
for message in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(message["date"], message["text"])
```

### Related tools

- [Telegram Keyword Monitor](https://apify.com/elquidata/telegram-keyword-monitor): get only the posts that mention your keywords, brands or tickers, and pay only for matches.
- [Telegram Channel Analytics](https://apify.com/elquidata/telegram-channel-info): subscribers, average views and engagement rate for thousands of channels, one row per channel.

### Questions and problems

Open an issue in the Issues tab with the channel name and the run ID. Every report is read and answered, and a daily automatic check against Telegram catches most breakages before users notice them.

This Actor reads only what Telegram publishes openly on the web. Make sure your use of the data follows the laws that apply to you and Telegram's terms.

# Actor input Schema

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

Public Telegram channels to scrape. Each entry can be a username (durov), a handle (@durov) or a link (https://t.me/durov). Private channels, groups and invite links have no public web preview and cannot be scraped.

## `maxMessagesPerChannel` (type: `integer`):

How many messages to return from each channel in this run. You are charged per message, so this is also your cost limit per channel.

## `onlyNewMessages` (type: `boolean`):

Remember the last message delivered for each channel and return only newer ones on the next run. The first run returns the latest messages and sets the starting point. Later runs return new messages oldest first, so nothing is skipped even when more arrived than the limit allows.

## `stateName` (type: `string`):

Runs that share a state name share the same position in each channel. Use a different name for each independent pipeline, for example 'alerts' and 'weekly-report'.

## `searchQuery` (type: `string`):

Return only messages that match this text, using Telegram's own in-channel search. Leave empty to get every message.

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

Skip messages posted before this moment. Pick a date or use a relative value such as '7 days'. Dates are read as UTC.

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

Skip messages posted after this moment. A plain date includes that whole day. Dates are read as UTC.

## `includeHtml` (type: `boolean`):

Add an 'html' field with the original formatting of each message (bold, links, custom emoji). The plain 'text' field is always included.

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

Telegram's public preview works well through datacenter proxies, which is the default. Change this only if you see repeated request errors.

## Actor input object example

```json
{
  "channels": [
    "telegram",
    "durov"
  ],
  "maxMessagesPerChannel": 50,
  "onlyNewMessages": false,
  "stateName": "default",
  "includeHtml": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `messages` (type: `string`):

All scraped messages: text, date, views, reactions, media, links and more.

## `summary` (type: `string`):

Status, message count, title and subscribers of every channel in the run, plus whether the spending limit was reached.

# 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"
    ],
    "maxMessagesPerChannel": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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