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

Posts, views, reactions, media and channel info from public Telegram channels, plus a mode that returns only new posts for monitoring. No Telegram login. $1 per 1,000 posts.

- **URL**: https://apify.com/night111/telegram-channel-scraper.md
- **Developed by:** [ng. night](https://apify.com/night111) (community)
- **Categories:** Social media, Marketing, News
- **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

Get the posts of public Telegram channels as JSON. You don't need a Telegram account, an API key or a phone number. The Actor reads the public web preview of a channel, the page you see at `t.me/s/channelname`.

There are two ways to use it:

- **Export.** Read one or many channels, newest posts first: text, date, views, reactions, photos, video links, documents, polls, forwards, replies, link previews, hashtags and links. Limit the run by number of posts, by start date or by a search word.
- **Watch.** Put the Actor on a schedule and turn on "Only new posts since the last run". Each run returns only the posts that appeared since the run before.

### Input

| Field | What it does |
|---|---|
| Channels | Names or links: `durov`, `@durov`, `https://t.me/durov`. Up to 2,000 per run. |
| Maximum posts per channel | Newest first. Default 50. `0` returns only the channel profile. Telegram sends 20 posts per page, so 1,000 posts take about 50 requests. |
| Search inside the channels | Only posts that contain this word or phrase. This is Telegram's own search, and it returns at most 22 matches per channel (see Limits). |
| Only posts from this date on | `2026-01-31` (UTC) or a relative value such as `3 days`. The Actor stops reading a channel at the first older post. |
| Only new posts since the last run | Watch mode, explained below. |
| Monitor name | Runs with the same name share what they have already seen. Use one name per watch list. |
| Add the channel profile | One extra row per channel with title, subscribers and description. On by default. |
| Proxy | Off by default. In my tests Telegram never limited requests from Apify's servers. Turn Apify Proxy on if you read very many channels and get `RATE_LIMITED` errors. |

Example input:

```json
{
  "channels": ["cointelegraph", "https://t.me/durov"],
  "maxPostsPerChannel": 100,
  "dateFrom": "7 days"
}
```

### Example output

A channel profile:

```json
{
  "type": "channel",
  "channel": "cointelegraph",
  "url": "https://t.me/cointelegraph",
  "title": "Cointelegraph",
  "verified": false,
  "subscribers": 330000,
  "photoCount": 21300,
  "videoCount": 1300,
  "fileCount": 4,
  "linkCount": 58700,
  "description": "The Future of Money\n\nUnbiased crypto, markets & Web3 news in real-time. Trusted since 2013. ...",
  "avatarUrl": "https://cdn4.telesco.pe/file/....jpg",
  "scrapedAt": "2026-11-13T06:51:41.357Z"
}
```

A post. The text, reactions and links are shortened here:

```json
{
  "type": "post",
  "channel": "cointelegraph",
  "channelTitle": "Cointelegraph",
  "postId": 73255,
  "url": "https://t.me/cointelegraph/73255",
  "date": "2026-11-13T06:18:34.000Z",
  "text": "🚨 NOW: The Crypto Fear & Greed Index falls to 20, deep in “Extreme Fear” and at its lowest level in four months, as $BTC dropped below $68K. ...",
  "views": 1680,
  "reactions": [
    { "emoji": "🔥", "count": 13 },
    { "emoji": "🤣", "count": 5 }
  ],
  "reactionsTotal": 25,
  "edited": false,
  "author": null,
  "forwardedFrom": null,
  "replyTo": null,
  "media": [
    { "type": "photo", "url": "https://cdn5.telesco.pe/file/....jpg" }
  ],
  "unsupportedMedia": false,
  "poll": null,
  "linkPreview": null,
  "links": ["https://ct.com/category/markets", "https://www.youtube.com/@cointelegraph"],
  "hashtags": [],
  "mentions": [],
  "scrapedAt": "2026-11-13T06:51:41.501Z"
}
```

The `poll` field of a post that holds a poll:

```json
"poll": {
  "question": "Do you like the new Telegram for iOS design in the January update?",
  "type": "Anonymous Poll",
  "options": [
    { "text": "I like the Telegram redesign and Liquid Glass in general", "percent": 28 },
    { "text": "I don't have an iOS device", "percent": 44 }
  ]
}
```

A row that failed looks like this and is not charged:

```json
{
  "type": "error",
  "channel": "botfather",
  "errorCode": "NO_PREVIEW",
  "error": "Telegram shows no public web preview for \"botfather\". It may be private, a group, a bot or a user, restricted by Telegram, deleted, or the name is misspelled. Check that https://t.me/s/botfather opens in a browser."
}
```

Error codes: `INVALID_CHANNEL`, `NO_PREVIEW`, `RATE_LIMITED`, `HTTP_ERROR`, `BAD_RESPONSE`, `NETWORK`, `INCOMPLETE` (a later page of the channel failed, the posts before it were delivered) and `UNEXPECTED`. The run also saves a `SUMMARY` record with the counts per channel, retries and failures. The run ends with an error only when nothing at all was delivered.

### Fields worth knowing

- `date` is UTC.
- Telegram rounds big numbers on the page. `330K` subscribers is saved as `330000`, and `1.68K` views as `1680`. The Actor cannot see the exact values.
- `reactions` lists the emoji and how many people used each. A paid star reaction has `"paid": true`. A custom emoji has no character, so `emoji` is `null` and `customEmojiId` identifies it.
- `forwardedFrom` has the `name` and `url` of the source when the post is a forward. `url` is `null` when the source has no public link.
- `replyTo` has `postId`, `url`, `author` and `text` of the post that was answered.
- `media` holds photos (`url`), videos (`url`, `thumbnailUrl`, `durationSeconds`) and documents (`title`, `details`, `postUrl`). A video `url` is `null` when the preview has no playable file. The Actor does not download files. The links point to Telegram's servers.
- `poll` has the question, the type and the options. `percent` is the rounded share of votes. The preview does not show vote counts.
- `unsupportedMedia` is `true` for a post that has no text, media, poll or link preview in the preview and shows "Please open Telegram to view this post" instead. Open its `url` in Telegram to see it. In a test with 2,771 posts this was 22 posts (under 1%).

### Watch channels on a schedule

1. Turn on "Only new posts since the last run", give the watch list a monitor name and create a schedule (Console, Schedules), for example every hour.
2. The first run returns the latest posts up to the maximum and remembers the newest post of every channel.
3. Every later run returns only newer posts. The channel profile is added only for channels that have new posts, so a quiet run costs the start fee and nothing else.
4. What the Actor remembers lives in a key-value store named `telegram-channel-scraper-state` in your account, one record per monitor name, channel and search word. Use a new monitor name to start from scratch.
5. If more posts than "Maximum posts per channel" came in since the last run, the oldest of them are skipped. Raise the maximum or run more often.
6. A channel that failed, or a run that stopped at your maximum cost, keeps its old position, so nothing is lost.

### Price

- $1 per 1,000 posts ($0.001 each).
- $1 per 1,000 channel profiles ($0.001 each).
- A start fee of $0.00004 per run.

Error rows are free. If you set a maximum cost per run, the Actor stops when it is reached.

Reading 10 channels once a day with about 20 new posts each costs about $0.21 a day. If you run every hour, each channel with new posts also adds its profile row on every run. Switch "Add the channel profile" off to avoid that.

### Limits

- Only public channels that have a web preview. A channel works when `https://t.me/s/channelname` opens in your browser. Private channels, groups, bots and users return `NO_PREVIEW`.
- A few channels open in your browser, but Telegram shows no preview to Apify's servers. `rtnews` was one in my tests. They return `NO_PREVIEW` and cost nothing.
- Search returns at most 22 matches per channel and word, and Telegram decides what matches. In a test with the word `bitcoin`, 13 of 22 posts had the word in the text and the others matched on their link preview. To get more, read the whole channel and filter it yourself.
- Posts come newest first. There is a start date but no end date.
- Telegram does not show vote counts of polls, and it rounds views, subscribers and the channel counters, so those numbers are not exact.
- Voice messages, stickers and round videos were not part of my tests. If the preview does not show them, you get `unsupportedMedia: true`.
- Speed in a test run: 29 channels with 100 posts each, 2,771 posts in 52 seconds. One whole channel with 426 posts took 8 seconds. Telegram did not rate-limit any request in the 29-channel run.
- If Telegram does answer with a limit, the Actor waits as long as Telegram asks (at most 30 seconds) and tries again up to 5 times.
- This Actor is not affiliated with Telegram. The posts are public, but names of authors and other personal data can fall under privacy law (GDPR and similar). Check your use case.

### Run it from code

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

### Questions

Open an issue in the Issues tab of this Actor with your input and the error code you got.

# Actor input Schema

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

Channel names or links, one per entry: durov, @durov, https://t.me/durov. A channel works when https://t.me/s/<name> opens in your browser. Private channels, groups, bots and users do not.

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

Newest posts come first. Telegram sends 20 posts per page, so 1,000 posts take about 50 requests. Use 0 to get only the channel profile.

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

Only return posts that contain this word or phrase. This is Telegram's own channel search, and Telegram returns at most 22 matches per channel and search.

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

An absolute date such as 2025-01-31 or a relative one such as 3 days. Older posts are skipped and the Actor stops reading that channel.

## `onlyNewSinceLastRun` (type: `boolean`):

Remembers the newest post of every channel and returns only posts that came after it. Use it with a schedule to watch channels. The first run returns the latest posts up to the maximum. The channel profile is only added when there are new posts, so a quiet run costs nothing but the start fee.

## `monitorName` (type: `string`):

Only used with "Only new posts since the last run". Runs with the same name share what they have already seen. Give each watch list its own name.

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

Adds one row per channel with title, subscribers, description and the number of photos, videos and links.

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

Telegram answers requests from Apify servers without a proxy. Turn Apify Proxy on if you read very many channels and see RATE_LIMITED errors.

## Actor input object example

```json
{
  "channels": [
    "telegram"
  ],
  "maxPostsPerChannel": 20,
  "onlyNewSinceLastRun": false,
  "monitorName": "default",
  "includeChannelInfo": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `posts` (type: `string`):

One row per post with text, views, reactions, media and links.

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

One row per channel with subscribers and description.

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

How many posts were delivered per channel and which channels failed.

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

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

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

```

## MCP server setup

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