# Telegram Channel Scraper — Messages & Views, No Login (`sumitr_mardy/telegram-channel-scraper`) Actor

Scrape public Telegram channels without an account or API key: messages with text, date, views, reactions, media and links, plus channel title and subscribers. Keyword search and date filter. One flat row per message, never null.

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

## Pricing

from $0.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 — Messages & Views, No Login

Give it public Telegram channels, get back their latest posts: text, date, views, reactions, photos, links and hashtags, plus the channel's title, subscriber count and verified badge. No Telegram account, phone number or API key. One flat row per message, every field always present, never `null`. Built for monitoring, research, pipelines and AI agents.

**$1 per 1,000 messages, down to $0.50 on higher Apify plans. Channels that fail or have no matching messages are free.**

### Why this one

- **No account, no ban risk.** It reads Telegram's own public web preview (`t.me/s/<channel>`), the page anyone can open in a browser. Nothing logs in, so there is no session to get banned.
- **Keyword search built in.** `searchKeyword` uses Telegram's in-channel search, so a brand or ticker mention across 50 channels is one run.
- **Engagement in every row.** Views, reactions (including Telegram Stars) and the channel's subscriber count sit next to each message, ready for ranking.
- **One row for every channel you send.** A private channel, a user, a typo or a channel with no matching posts still comes back as a row with a machine-readable `subStatus`, free.
- **Fast and light.** Measured on Apify: 100 messages from @telegram in 5 seconds at 256 MB, no proxy.

### Input

| Field | Default | What it does |
|---|---|---|
| `channels` | — | Public channels: `@name`, `name`, `t.me/name` or `t.me/s/name`. Duplicates are dropped. Required. |
| `maxMessagesPerChannel` | `100` | Newest messages per channel (max 10,000). |
| `searchKeyword` | — | Only messages containing this word or phrase. |
| `oldestDate` | — | Stop at messages older than this date (`YYYY-MM-DD`). |

```json
{
  "channels": ["@telegram", "https://t.me/durov"],
  "maxMessagesPerChannel": 50,
  "searchKeyword": "update"
}
```

### Output

One row per message, newest first within each channel. A real row (shortened):

```json
{
  "inputIndex": 0,
  "input": "@telegram",
  "status": "ok",
  "subStatus": "message",
  "error": "",
  "channelTitle": "Telegram News",
  "channelUsername": "telegram",
  "channelDescription": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
  "channelVerified": true,
  "channelSubscribers": 9230000,
  "channelAvatarUrl": "https://cdn1.telesco.pe/file/…jpg",
  "channel": "telegram",
  "messageId": 458,
  "url": "https://t.me/telegram/458",
  "date": "2026-08-26T19:12:04+00:00",
  "text": "Placeholders for App Updates. If a user with an outdated app encounters a new feature, they can now instantly tap to download the latest upd…",
  "views": 1180000,
  "author": "",
  "edited": false,
  "isForwarded": false, "forwardedFrom": "", "forwardedFromUrl": "",
  "replyToUrl": "",
  "mediaType": "photo",
  "photoUrls": ["https://cdn1.telesco.pe/file/…jpg"],
  "hasVideo": false,
  "linkPreviewUrl": "", "linkPreviewTitle": "",
  "links": ["https://t.me/telegram/455", "https://t.me/telegram/456"],
  "hashtags": [],
  "reactions": [],
  "reactionsTotal": 0,
  "paidStars": 0
}
```

Strings are `""` when absent, numbers `0`, arrays `[]`. No field is ever `null` or missing. `views` and `channelSubscribers` are Telegram's rounded figures (7M = 7,000,000).

#### Status

| `status` | `subStatus` | Charged |
|---|---|---|
| `ok` | `message` | yes, per message |
| `no_messages` | `no_messages`: the channel exists but nothing matched the keyword or date range; channel fields are filled | free |
| `failed` | `not_found`, `no_public_preview` (private channel, group, user or bot), `invalid_input` (invite links), `http_<code>`, `network_error`, `cost_limit_reached` | free |

### Pricing

| Event | Price | When |
|---|---|---|
| `message` | $0.0010 (free plan), $0.0008 Bronze, $0.0006 Silver, $0.0005 Gold | each message returned |

No other charges besides Apify's minimum start fee ($0.00005 per run). A run stops when your *maximum cost per run* is reached and says so in the status message.

### What it does not do

- **Public channels only.** Telegram shows a web preview only for public channels with preview enabled. Private channels, groups, chats and users need a logged-in account, which this actor deliberately does not use.
- **No comments or member lists**, and no media download: photos are URLs on Telegram's CDN.
- **Approximate big numbers.** Views and subscribers are rounded by Telegram itself (1.18M, 9.23M).
- **Custom emoji reactions** come back as Telegram's emoji id when the preview has no character for them.

### Use it from AI agents (MCP)

This Actor is a tool on the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp), so Claude, Cursor, VS Code or any MCP client can call it to read a Telegram channel. Load only this tool: a short tool list keeps the agent from picking the wrong one.

**Recommended: hosted server, OAuth sign-in (nothing secret on disk).**

```json
{
  "mcpServers": {
    "telegram-channels": {
      "url": "https://mcp.apify.com?tools=sumitr_mardy/telegram-channel-scraper"
    }
  }
}
```

**With an API token instead:**

```json
{
  "mcpServers": {
    "telegram-channels": {
      "url": "https://mcp.apify.com?tools=sumitr_mardy/telegram-channel-scraper",
      "headers": { "Authorization": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
```

**Local server (stdio):**

```json
{
  "mcpServers": {
    "telegram-channels": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server@latest", "--tools", "sumitr_mardy/telegram-channel-scraper"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

Get a token at [Apify Console → API & Integrations](https://console.apify.com/settings/integrations), and never commit it.

**Tips for agents:**

- *"What did this channel post this week?"*: set `oldestDate` and a high `maxMessagesPerChannel`.
- *"Is anyone talking about X on Telegram?"*: list the channels and set `searchKeyword`.
- Check `status`: `no_messages` means the channel exists but nothing matched, which is an answer.

### Use it from code

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("sumitr_mardy/telegram-channel-scraper").call(run_input={
    "channels": ["@telegram"],
    "maxMessagesPerChannel": 20,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["date"], row["views"], row["text"][:80])
```

```bash
curl -X POST "https://api.apify.com/v2/acts/sumitr_mardy~telegram-channel-scraper/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"channels": ["@telegram"], "maxMessagesPerChannel": 20}'
```

This actor is not affiliated with or endorsed by Telegram.

# Actor input Schema

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

Public channels, one per item: "@name", "name", "t.me/name" or "t.me/s/name". Private channels, groups, users, bots and invite links have no public web preview and come back as a failed row (free).

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

Newest messages to return per channel. Each page of the preview holds 20 messages.

## `searchKeyword` (type: `string`):

Only messages containing this word or phrase (Telegram's own in-channel search). Leave empty for all messages.

## `oldestDate` (type: `string`):

Stop at messages older than this date (YYYY-MM-DD, UTC). Leave empty to go back as far as maxMessagesPerChannel allows.

## Actor input object example

```json
{
  "channels": [
    "@telegram"
  ],
  "maxMessagesPerChannel": 100,
  "searchKeyword": "",
  "oldestDate": ""
}
```

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

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

```

## MCP server setup

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