# Telegram Channel Scraper (public preview, no login) (`signalclear/telegram-channel-scraper`) Actor

Messages from public Telegram channels via the t.me web preview: text, date, views, media, links, forwards and replies, plus optional channel info. No login, no API key. Bounded retries on fresh sessions; failed channels are never charged.

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

## Pricing

from $0.50 / 1,000 results

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 (public preview, no login)

Get messages from **public Telegram channels** as clean JSON: text with line breaks, date, view count, media, links, link previews, forwards and replies. Paste channel names or t.me links. **No login, no Telegram account, no API key**: the scraper reads the public web preview that Telegram serves at `t.me/s/<channel>`.

**Cheap, bounded, and you only pay for channels that succeed.** Each channel gets a capped number of attempts (3 by default, at most 5), each on a fresh proxy session that resumes where the last one stopped. A channel that still fails, or that has no public preview (invite links, private channels, groups, users, preview turned off), is listed in the `FAILED_CHANNELS` record and none of its rows are saved or charged. Channels that can never have a preview fail at once, without retries. Every request has a timeout and every channel has a message cap, so a run never hangs until the platform timeout.

### What you can use it for

- **News and announcement monitoring:** schedule a run with *Only messages newer than* = `1 day` and get each day's posts.
- **Media and brand monitoring:** collect what public channels post about a product, project or topic.
- **Research and archiving:** a flat, predictable row per message for spreadsheets, BI tools, LLMs and AI agents.
- **Channel benchmarking:** add the channel info row for subscriber counts, and compare view counts across posts.

### How to use it

1. Add one or more **channels**. Any of these work:
   - `telegram` or `@telegram`
   - `https://t.me/telegram`
   - `https://t.me/s/telegram`
   - `https://t.me/telegram/441` (the channel is taken from the link)
2. Set the **maximum messages per channel** (newest first).
3. Optionally set **Only messages newer than**: `2026-10-01`, `2026-10-01T12:00:00Z`, or a relative age such as `7 days` or `12 hours`.
4. Turn on **Add a channel info row** for title, description, exact subscriber count and photo.
5. Click **Start**.

#### Example input

```json
{
  "channels": ["telegram", "https://t.me/durov"],
  "maxMessagesPerChannel": 100,
  "newerThan": "30 days",
  "includeChannelInfo": true,
  "includeHtml": false
}
```

### Output

One row per message (`type: "message"`):

```json
{
  "type": "message",
  "channel": "telegram",
  "messageId": 445,
  "url": "https://t.me/telegram/445",
  "text": "For all the features from this update, like statistics and custom limits for polls, streaming text for bots, silent scheduled messages and more – check out the full blog:\nhttps://telegram.org/blog/ai-bot-revolution-11-new-features",
  "date": "2026-05-14T16:09:50+00:00",
  "views": 3060000,
  "edited": false,
  "forwardedFrom": null,
  "forwardedFromUrl": null,
  "replyToMessageId": null,
  "mediaTypes": [],
  "mediaUrls": [],
  "links": ["https://telegram.org/blog/ai-bot-revolution-11-new-features"],
  "linkPreview": {
    "url": "https://telegram.org/blog/ai-bot-revolution-11-new-features",
    "siteName": "Telegram",
    "title": "Guest AI Bots, Bot-to-Bot Chats, Chat Automation, ...",
    "description": "Telegram adds over 10 new features, ...",
    "imageUrl": "https://cdn4.telesco.pe/file/..."
  },
  "hasInlineButtons": false,
  "input": "telegram",
  "scrapedAt": "2026-10-28T17:37:10+00:00"
}
```

| Field | Notes |
|---|---|
| `text` | Plain text; line breaks kept as `\n`, emoji kept as characters. `null` for media-only posts. |
| `html` | Only with *Include message HTML*: the message body as Telegram renders it. |
| `views` | Parsed from the preview's rounded figure: `1.61M` becomes `1610000`. |
| `mediaTypes` | Any of `photo`, `video`, `gif`, `roundVideo`, `document`, `voice`, `sticker`, `poll`, `location`. |
| `mediaUrls` | Photo and video URLs on Telegram's CDN. Videos too large for the preview give a thumbnail instead. |
| `links` | Every link in the message text plus the link-preview URL, in order, without duplicates. |
| `forwardedFrom` | Name of the source channel for forwarded posts; `forwardedFromUrl` links to it when public. |
| `replyToMessageId` | The id of the message this post replies to, in the same channel. |

With **Add a channel info row**, each channel also gets one row with `type: "channel"`:

```json
{
  "type": "channel",
  "channel": "telegram",
  "username": "telegram",
  "url": "https://t.me/telegram",
  "title": "Telegram News",
  "description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
  "subscribers": 9231510,
  "verified": true,
  "photoUrl": "https://cdn1.telesco.pe/file/...",
  "counters": { "photos": 16, "videos": 228, "links": 378 },
  "input": "telegram",
  "scrapedAt": "2026-10-28T17:37:10+00:00"
}
```

Channels that failed are listed in the key-value store record `FAILED_CHANNELS` as `{channel, input, error, attempts}`, for example `channel not found: no public channel uses this username` or `invite link: the channel or group is private and has no public preview`.

### Pricing

You pay per result: one result per dataset row (each message, plus one row per channel when channel info is on). Channels that fail are never pushed to the dataset, so they cost nothing, and a run where every channel fails exits with an error and charges nothing. Use *Maximum total items* to cap a run's cost. See the Pricing tab for current rates.

### Limitations

- **Public channels only.** The web preview exists only for public channels whose owner has not disabled it. Private channels, invite links, groups, bots and user accounts have no preview and are reported in `FAILED_CHANNELS`.
- **No comments or reactions.** Discussion-group comments are not part of the preview.
- **About 20 messages per page.** Deep history takes one request per 20 messages, and the scraper paces its requests to stay polite, so very large runs take time.
- **Media URLs are temporary.** Telegram's CDN links expire; download the files soon after the run if you need them.
- **Rounded numbers.** View counts in the preview are rounded (`1.61M`). The channel info row uses the exact subscriber count from the channel page.
- **Albums** (several photos in one post) appear as one message with several `mediaUrls`.
- Telegram can change the preview layout without notice. When that happens, affected channels land in `FAILED_CHANNELS` (not charged) and a fix follows.

### Tips

- **Proxy:** the default Apify proxy (datacenter) is usually enough. Switch to residential only if the log shows many retries. *Proxy country* sets the exit country.
- **Monitoring:** run on a schedule with *Only messages newer than* and deduplicate on `channel` + `messageId`.
- **Large lists:** keep *Channels in parallel* at 2-4.

### Legal and data

This Actor reads the public web preview that Telegram publishes for public channels, which anyone can open in a browser without logging in. Messages are attributed to the channel that published them, by its channel name; the Actor does not collect user profiles, phone numbers, member lists or any data about individual readers. Channel posts can still mention people, so you are responsible for using the data in line with Telegram's terms and with the privacy law that applies to you (for example GDPR).

### FAQ

**Why did my channel fail with "owner has disabled the web preview"?** Some public channels turn the preview off. They can only be read inside Telegram.

**Can I scrape a private channel or group?** No. Without a login there is no public view of them, and this Actor does not log in.

**Something broke?** Open an issue on the Issues tab with your run ID.

# Actor input Schema

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

One public channel per line: a username (telegram), @username, or a t.me link (https://t.me/telegram, https://t.me/s/telegram, https://t.me/telegram/123). Invite links (t.me/+...) and private channels have no public preview and fail at once without being charged.

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

Stop after this many messages for each channel, newest first. The preview returns about 20 messages per page.

## `newerThan` (type: `string`):

Optional. A date (2026-10-01), a date and time in UTC (2026-10-01T12:00:00Z), or a relative age such as "7 days" or "12 hours". Older messages are skipped and paging stops once they are reached.

## `includeChannelInfo` (type: `boolean`):

Adds one row with type "channel" per channel: title, description, exact subscriber count, verified flag, photo URL and media counters. Costs one extra request per channel and counts as one dataset item.

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

Adds the message body as HTML (formatting, links, emoji images) next to the plain text.

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

Optional cap on dataset items for the whole run, across all channels. Leave empty for no cap beyond the per-channel maximum.

## `maxConcurrency` (type: `integer`):

Channels fetched at the same time. Higher is faster but more likely to be rate-limited.

## `maxAttempts` (type: `integer`):

Each attempt uses a fresh proxy session and resumes where the last one stopped. Channels that still fail are listed in FAILED_CHANNELS and are not charged. Channels without a public preview are never retried.

## `requestTimeoutSecs` (type: `integer`):

How long to wait for a single HTTP response before the attempt counts as failed and is retried on a fresh session.

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

The Telegram web preview works from datacenter IPs, so the default Apify proxy is usually enough. Switch to residential only if you see many retries.

## `proxyCountry` (type: `string`):

Optional two-letter country code (US, DE, GB...) for the Apify proxy exit. Overrides the country in the proxy setting. The preview is not known to be geo-restricted, so leave empty unless a channel behaves differently by country.

## Actor input object example

```json
{
  "channels": [
    "telegram",
    "https://t.me/durov"
  ],
  "maxMessagesPerChannel": 100,
  "includeChannelInfo": false,
  "includeHtml": false,
  "maxConcurrency": 3,
  "maxAttempts": 3,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset results in the "Messages" view.

## `channels` (type: `string`):

Dataset results in the "Channel info" view.

## `failed` (type: `string`):

JSON list of channels that failed after every retry, with the error for each. Empty when everything succeeded. Failed inputs are never charged.

# 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",
        "https://t.me/durov"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

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

```

## MCP server setup

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