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

Telegram scraper for public channel posts: text, links, views, reactions, media and polls, with date and search filters. Scrape Telegram channel profiles too, one summary row per channel. No login needed.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/store.md#pay-per-usage

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

Telegram Channel Scraper collects the posts of public Telegram channels (https://t.me) and returns one clean row per post, ready for JSON, CSV or Excel. A second mode returns one row per channel with its title, description and counters. No Telegram account, no login and no API key are needed.

Use this Telegram scraper with one channel name to get the newest public channel posts, including their dates, text, links, views and other columns. Add a date bound or search text to narrow the results.

### What is Telegram Channel Scraper?

To scrape Telegram channel posts, the Actor reads the public web preview `t.me/s/<channel>`. It starts with the newest post and walks back in time, removing duplicates. It never reads a private channel and never signs in.

#### What data can I extract with it?

In posts mode, each row identifies the channel and post, with the publication date, edited flag, text and HTML. It also contains links, hashtags, `@mentions`, views, reactions, media details, video duration and link previews. Polls include their question and options, never their voters. Forwarding, reply, search and scrape-time details complete the row.

In channels mode, each row contains the channel name, title, description, URL, subscribers, photo, video, file and link counters. It also includes the verified flag, avatar, and newest post number and date. The Actor copies these values as Telegram shows them. It writes no summary or text of its own.

#### How can I use the results?

Follow a news or brand channel without signing in. Build a dated archive for research. Check how frequently a topic, hashtag or link appears. Compare channel size and activity across the channels you read.

### How to use it

1. Open this Apify Telegram scraper in Apify Console.
2. Add your public channels and pick `posts` or `channels` mode.
3. Set `maxPostsPerChannel` and `maxItems`, then start the run.

### Modes

| Mode | What it returns | Billed event |
|---|---|---|
| `posts` (default) | The posts of each channel, newest first. Date bounds and a search text are available | `post` |
| `channels` | One row per channel: description, counters and the newest post seen. Date bounds and `maxPostsPerChannel` have no effect, and the run says so in `inputWarnings` (a `maxPostsPerChannel` left at its default of 100 raises no warning) | `channel` |

### Input

| Field | Meaning | Default |
|---|---|---|
| `channels` | 1 to 100 public channels. Accepted forms: `telegram`, `@telegram`, `https://t.me/telegram`, `https://t.me/s/telegram` and a post link such as `https://t.me/telegram/123`. A username has 4 to 32 characters (letters, digits, underscore) and starts with a letter. It is stored in lowercase and a duplicate is read once. Required for a normal run: an empty list ends the run with a `BAD_INPUT` row | `["telegram"]` in the form |
| `mode` | `posts` or `channels` | `posts` |
| `maxPostsPerChannel` | Posts read per channel, newest first, from 1 to 5000. Posts mode only | 100 |
| `postedAfter` | Only posts from this date on, `YYYY-MM-DD`, UTC, inclusive. Posts mode only. Not together with `lastNDays` | empty |
| `lastNDays` | Only posts of the last N days, from 1 to 3650. Posts mode only. Not together with `postedAfter` | empty |
| `searchQuery` | Keep the posts that match this text (2 to 100 characters), as the search of the channel preview does. Posts mode only | empty |
| `maxItems` | Hard cap on the rows returned and billed, from 1 to 100000, all channels together | 1000 |

The Console form pre-fills `channels` with `telegram` and `maxPostsPerChannel` with 20. Starting the form as it opens therefore reads 20 posts per channel. If your input leaves `maxPostsPerChannel` out, the Actor reads 100 posts per channel by default.

The default memory is 512 MB. The acceptance run of 2026-11-18 peaked at 223 MB for 859 posts.

`maxPostsPerChannel` stays at 100 by default even when you set `postedAfter` or `lastNDays`. A date bound only stops the walk earlier. It does not raise the per-channel cap.

Invalid input produces one `BAD_INPUT` row in the `errors` dataset listing every problem, and no post. In particular, an empty list ends the run with a `BAD_INPUT` row.

The Actor refuses private invitation links (`t.me/+...`), invalid usernames, both date bounds together, and a search text in `channels` mode before any request. These cases return `BAD_INPUT`, not `NOT_FOUND`.

Read the newest 20 posts from one channel:

```json
{
  "channels": [
    "telegram"
  ],
  "maxPostsPerChannel": 20
}
```

Read the last 7 days of two channels, with per-channel and total caps:

```json
{
  "channels": [
    "telegram",
    "@example_channel"
  ],
  "lastNDays": 7,
  "maxPostsPerChannel": 200,
  "maxItems": 500
}
```

Return one row for each of two channels:

```json
{
  "channels": [
    "telegram",
    "https://t.me/s/example_channel"
  ],
  "mode": "channels"
}
```

### Output

Rows go to the run's default dataset. Problems go to a separate `errors` dataset and are never billed. The `OUTPUT` record sums up the run.

#### Post row

| Field | Type | Meaning |
|---|---|---|
| `channel` | string | Channel username, lowercase |
| `channelTitle` | string or null | Title of the channel |
| `channelSubscribers`, `channelSubscribersText` | number or null, string or null | Subscribers as a number and as Telegram shows it, for example `9.1M` |
| `postNumber`, `postKey` | integer, string | Number of the post in the channel and `<channel>/<number>` |
| `url` | string | Link of the post |
| `postedAt` | string | Date and time of the post, UTC |
| `isEdited` | boolean | The post was edited |
| `text`, `textHtml` | string or null | Text as plain text and as HTML (see Personal data) |
| `links`, `hashtags`, `mentions` | array | Web links, hashtags and `@mentions` written in the text |
| `views`, `viewsText` | number or null, string or null | Views as a number and as Telegram shows it |
| `reactions` | array | One entry per emoji with `emoji`, `customEmojiId`, `paid`, `count` and `countText`, empty without reaction |
| `mediaType` | string | `photo`, `album`, `video`, `roundVideo`, `voice`, `document`, `sticker`, `poll`, `location`, `unsupported` or `none` |
| `mediaCount`, `mediaUrls` | integer, array | Number of media and their temporary URLs |
| `videoDurationSec` | number or null | Duration of a video |
| `linkPreview` | object or null | `url`, `siteName`, `title` and `description` of the preview card |
| `poll` | object or null | `question` and `options` of a poll, never the voters |
| `forwardedFromChannel` | string or null | Channel a post was forwarded from, only when it comes from a channel |
| `replyToPostNumber` | integer or null | Post of the same channel this one replies to |
| `searchQuery` | string or null | The search text that found the post |
| `scrapedAt` | string | Time the row was built |

#### Channel row

| Field | Type | Meaning |
|---|---|---|
| `channel`, `title`, `description`, `url` | string or null | Username, title, description and link of the channel |
| `subscribers`, `subscribersText` | number or null, string or null | Subscribers as a number and as Telegram shows it |
| `photos`, `videos`, `files`, `links` | number or null | Counters shown on the channel page. `files` is null when Telegram shows none |
| `isVerified` | boolean | Verified badge |
| `avatarUrl` | string or null | Temporary URL of the channel picture |
| `lastPostNumber`, `lastPostAt` | number or null, string or null | Newest post seen on the page |
| `scrapedAt` | string | Time the row was built |

Here is a shortened post row:

```json
{
  "channel": "telegram",
  "channelTitle": "Telegram News",
  "channelSubscribers": 9100000,
  "channelSubscribersText": "9.1M",
  "postNumber": 460,
  "postKey": "telegram/460",
  "url": "https://t.me/telegram/460",
  "postedAt": "2026-08-26T19:12:34.000Z",
  "isEdited": false,
  "text": "For all the info from today's update and a look back at 13 years of Telegram features - check out our blog:\nhttps://telegram.org/blog/welcome-messages-buttons-TG-13\nAugust Features\n1 • 2 • 3 • 4 • 5 •",
  "textHtml": "For all the info from today's update and a look back at ",
  "links": [
    "https://telegram.org/blog/welcome-messages-buttons-TG-13",
    "https://t.me/telegram/455"
  ],
  "hashtags": [],
  "mentions": [],
  "views": 2610000,
  "viewsText": "2.61M",
  "reactions": [],
  "mediaType": "none",
  "mediaCount": 0,
  "mediaUrls": [],
  "videoDurationSec": null,
  "linkPreview": {
    "url": "https://telegram.org/blog/welcome-messages-buttons-TG-13",
    "siteName": "Telegram",
    "title": "Welcome Messages, Buttons in Messages and Signed Gifts",
    "description": "Introducing Welcome Messages"
  },
  "poll": null,
  "forwardedFromChannel": null,
  "replyToPostNumber": null,
  "searchQuery": null,
  "scrapedAt": "2026-11-18T10:00:00.000Z"
}
```

Here is a shortened channel row:

```json
{
  "channel": "telegram",
  "title": "Telegram News",
  "description": "The official Telegram on Telegram. Much recursion. Very Telegram. Wow.",
  "url": "https://t.me/telegram",
  "subscribers": 9100000,
  "subscribersText": "9.1M",
  "photos": 16,
  "videos": 228,
  "files": null,
  "links": 378,
  "isVerified": true,
  "avatarUrl": "https://cdn1.telesco.pe/file/fixture-1.jpg",
  "lastPostNumber": 460,
  "lastPostAt": "2026-08-26T19:12:34.000Z",
  "scrapedAt": "2026-11-18T10:00:00.000Z"
}
```

The examples are built from stored pages. Their texts and lists are cut, while a real run returns full text and every link.

### Limits

- Shortened counts are approximate. `viewsText` and `channelSubscribersText` keep the text as shown.
- Media and avatar URLs are temporary.
- Some media are not served by the preview. Their `mediaType` is `unsupported` or `none`, with no media URL.
- Private channels are not read.
- A channel whose preview is turned off, a group, a person and a bot are not supported. Each ends with one `NOT_FOUND` row in the `errors` dataset, never billed. The run continues with the next channel.
- No follower list is available, and none can be requested.
- A search returns the posts Telegram serves for that query. It follows the next pages when Telegram offers them.
- Service messages are not posts. They produce no row or billing, and are counted in `OUTPUT`.
- The Actor makes at most one request per second and at most 3,000 requests per run. Both are ceilings, not fixed rates.
- Each page contains 20 posts.
- A walk is cut after 300 pages of one channel.
- If the platform restarts a run after a migration or reboot, the dataset is the reference. A channel never returns more than `maxPostsPerChannel` rows in all. Adapter counters, including `pagesRead` in `channelCoverage`, skipped posts, service messages and `channelsNotFound`, cover the current execution only. Core counters for requests and pages add up from the saved state. A channel that finished before the restart has `endedBy` set to `beforeResume`. Its `NOT_FOUND` rows remain in the `errors` dataset.
- When a run stops on `maxItems` or the charge limit, `rows` counts the rows really returned. In `channelCoverage`, a channel that was still open shows `runStopped`. A channel already ended keeps its reason.

The acceptance run of 2026-11-18 returned 859 posts and gave the only measurement: about 0.35 seconds per post. Using that measurement, the estimates are about 6 minutes for 1,000 posts and about 30 minutes for 5,000 posts. These durations were not measured separately.

The default timeout is 1 hour. Above about 9,000 posts, raise the timeout of the run.

### Billing

Each delivered post row produces one `post` event. Each delivered channel row produces one `channel` event. Error rows are never billed. The Pricing tab of the Actor shows the current prices.

### Run summary and early stops

`stoppedBy` in `OUTPUT` keeps only the first reason the run stopped:

- `null`: all the requested work was done.
- `maxItems`: the cap was reached.
- `chargeLimit`: the maximum charge set for the run was reached.
- `deadline`: the run reached its internal time limit.
- `circuitOpen`: too many blocked responses occurred in a row.
- `pageBudget`: the request budget of the run was spent.
- `badInput`: the source refused the request itself as invalid. This differs from the input check.
- `fetchFailed`: a walk ended on a page that could not be fetched, even after its attempts.

`channelCoverage` has one entry per channel, with `channel`, `rows`, `pagesRead` and `endedBy`. The possible `endedBy` values are:

- `lastPage`: the whole channel was read.
- `dateBound`: the date bound was reached.
- `perChannelCap`: `maxPostsPerChannel` was reached.
- `cap`: the walk reached 300 pages.
- `runStopped`: the run ended before this channel.
- `beforeResume`: the channel finished before the platform restarted the run.
- `notFound`: the channel does not exist or is not a public channel. Its page answered "not found", its preview did not stay on `t.me/s/<channel>`, or the page held no channel. The channel gets a `NOT_FOUND` row and is listed in `channelsNotFound`.
- `error`: a page of the channel was refused, rate-limited or could not be read. The walk of that channel ended on an error, with its row in the `errors` dataset.

`channelsNotFound` lists only the channels that ended `notFound`. A channel that ends `error` is never listed there and gets no `NOT_FOUND` row. Its error row has the kind of the failed page: `TARGET_BLOCKED` for a refused page, `RATE_LIMITED` for a rate-limited page, or `FETCH_FAILED` for a page that could not be fetched. `OUTPUT` also counts requests, pages, rows returned and billed, duplicates skipped and errors by kind.

Every error is a row of the `errors` dataset with a `kind`. The 8 kinds are `BAD_INPUT`, `TARGET_BLOCKED`, `RATE_LIMITED`, `FETCH_FAILED`, `UPSTREAM_ERROR`, `SCHEMA_CHANGED`, `LISTING_INVALID` and `NOT_FOUND`.

A channel that does not exist or is not a public channel produces a `NOT_FOUND` row with the channel as `itemId`.

### Personal data and GDPR

Names inside a post come out as published. Phones and e-mail addresses are masked in texts, channel descriptions, link previews and polls.

Admin signatures and the names of senders, quoted authors and the person a post was forwarded from are never read or returned. The channel's own name and title are returned. No follower list is available.

Under EU data protection rules, you remain responsible for how you process the results. Keep only the columns you need.

### Legal and responsible use

The data comes from Telegram (https://t.me). The Telegram terms of service (https://telegram.org/tos) may restrict automated access or the reuse of content. The Actor reads only public pages, without signing in. Before you rely on the output, in particular for commercial use, check that your use is allowed by those terms and by the laws that apply to you. You remain responsible for how you use the results.

### Frequently asked questions

#### Why did I get fewer posts than I asked for?

The walk can stop at `maxPostsPerChannel`, the total `maxItems` cap, a date bound, or 300 pages for one channel. Service messages do not produce post rows. A channel whose preview is turned off, a group, a person or a bot produces one `NOT_FOUND` error row, and the run continues with the next channel.

#### Why does my date filter stop at 100 posts?

`maxPostsPerChannel` stays at 100 by default even when you set `postedAfter` or `lastNDays`. The date bound only stops the walk earlier. Raise `maxPostsPerChannel` if you want a higher per-channel cap.

#### Do I need a Telegram account?

No. Telegram scraping with this Actor needs no Telegram account, login or API key. It reads public channel previews without signing in.

#### Can I use this Actor through MCP?

Yes. Any Apify Actor can be called from an MCP client through the Apify MCP server. See the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp) for the setup.

#### Why use this Actor instead of a Telegram scraper found on GitHub?

An Apify Actor is a serverless cloud program that runs on the Apify platform. Start it by hand in Apify Console, through the Apify API or the CLI, or on a schedule.

The rows go to the run's dataset, ready for JSON, CSV or Excel. This Actor reads public channel posts only, whichever way you start the run.

#### How do I start this Telegram scraper from Python?

The official Apify API client for Python can start the Actor and list its dataset items. You can also send a POST to the Actor's runs endpoint through the Apify API, then read the dataset items endpoint as JSON. This Actor reads public channel posts only.

### Your feedback

We're always working on improving the performance of our Actors. So if you've got any technical feedback for Telegram Channel Scraper or simply found a bug, please create an issue on the Actor's [Issues tab](https://apify.com/mrbridge/telegram-channel-scraper/issues).

An honest review helps the next users decide. You can also bookmark this Actor, and use the Issues tab for bugs or other problems.

More tools, scrapers, MCP servers and data studies from the same team: [mr-bridge.com](https://mr-bridge.com).

# Changelog

This Actor's version history is a separate document: https://apify.com/mrbridge/telegram-channel-scraper/changelog.md

# Actor input Schema

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

Needed for a normal run. Public channels to read, 1 to 100: a username (telegram), @telegram, or a link such as https://t.me/telegram, https://t.me/s/telegram or a post link https://t.me/telegram/123. Private invitation links (t.me/+...) are refused.

## `mode` (type: `string`):

posts returns the posts of each channel, channels returns one description row per channel.

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

Posts read per channel, newest first, from 1 to 5000. Posts mode only. Stays at 100 by default even with Posted after or Last N days: raise it to go further back in time.

## `postedAfter` (type: `string`):

Only posts from this date (YYYY-MM-DD, UTC) on. Posts mode only. Not together with Last N days.

## `lastNDays` (type: `integer`):

Only posts of the last N days, from 1 to 3650. Posts mode only. Not together with Posted after.

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

Keep the posts that match this text (2 to 100 characters), as the search of the channel preview does. Posts mode only.

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

Hard cap on the rows returned and billed, from 1 to 100000. The run stops once that many rows are delivered.

## `capturePlan` (type: `string`):

Maintainer only. Name of a closed diagnostic capture campaign. Requires Internal capture mode. The allowlist lives in the code: any other value is rejected without issuing a request.

## `internalCaptureMode` (type: `boolean`):

Maintainer only. When true, captures raw responses to the default key-value store of the run for building test fixtures. Not for normal use.

## Actor input object example

```json
{
  "channels": [
    "telegram"
  ],
  "mode": "posts",
  "maxPostsPerChannel": 20,
  "maxItems": 1000,
  "internalCaptureMode": false
}
```

# Actor output Schema

## `rows` (type: `string`):

Direct link to all dataset items produced by the run.

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

Direct link to the OUTPUT record: requests made, rows returned and billed, errors by kind and the reason of an early stop.

# 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("mrbridge/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("mrbridge/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 mrbridge/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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