# Telegram Channel Scraper: Posts, Media, New Posts Only (`cyrus_1/telegram-public-channel-scraper`) Actor

Scrape public Telegram channels from their web preview: posts, views, reactions and links, with photos and videos saved to storage. Switch on new-posts-only and each run returns just what was added since the last one.

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

## Pricing

from $0.80 / 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

Scrape posts, views, reactions, links and media from public Telegram channels and get them as clean JSON, with an option to return only posts new since your last run, for researchers, journalists and developers. It costs $0.80 per 1,000 posts and $1 per 1,000 saved media files; channel status rows and channels with no public preview are free.

Give it channel names or t.me links. It reads the public web preview (`t.me/s/<channel>`). No login, no Telegram API key, no phone number, no proxy.

### Telegram Channel Scraper: Posts, Media, New Posts Only

- **One row per post:** text, date, link, views, reactions, links in the text, link preview, forwarded-from and media.
- **One status row per channel:** title, username, description, verified flag, subscribers and counters, and whether a public preview exists.
- **New posts only:** schedule the actor and each run returns just what appeared since the last one.

### Quick start

Paste this input as it is. The default channel is `telegram`.

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

### Example output

One post row from a real run on the `telegram` channel (media links shortened):

```json
{
  "type": "post",
  "channel": "telegram",
  "id": 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\nAI enthusiasts can utilize this to create custom workflows with autonomous agents.\n\nMay Features\n1 • 2 • 3 • 4 • 5 • More",
  "viewsRaw": "1.71M",
  "views": 1710000,
  "reactions": [],
  "links": [
    "https://t.me/telegram/440",
    "https://t.me/telegram/442",
    "https://t.me/telegram/443"
  ],
  "linkPreview": null,
  "forwardedFrom": null,
  "media": [
    {
      "type": "video",
      "url": "https://cdn1.telesco.pe/file/c01503a63e.mp4?token=…",
      "thumbnailUrl": "https://cdn1.telesco.pe/file/Q7l1u8427O…",
      "duration": "0:06"
    }
  ]
}
```

`views` is an integer rounded from Telegram's abbreviated `viewsRaw`. `reactions` lists the type (`emoji`, `custom` or `paid`), the emoji character when Telegram gives one, and the count. The channel status row has `hasPreview`, `title`, `username`, `description`, `verified`, `subscribers`, `postsDelivered`, `gap`, `stoppedOnChargeLimit` and `error`. A channel with no public preview (private, bot, missing, previews disabled) gives a status row with `hasPreview: false`, no posts and no charge.

### Use cases

- Monitor public Telegram channels for news, announcements or price alerts.
- Archive the recent posts of a public channel to a spreadsheet or database.
- Track views and reactions on a channel's posts over time.
- Collect links shared in public channels for research.
- Build a feed of new posts from channels you follow, on a schedule.
- Save photos and videos from public posts before they disappear.

### Input

| Field | Default | What it does |
|---|---|---|
| `channels` | `telegram` | Channel names or t.me links, for example `durov` or `https://t.me/durov` |
| `maxPostsPerChannel` | 20 | Cap per channel per run |
| `onlyNewPosts` ("Only posts since last run") | false | Deliver only posts newer than the last run's last delivered post |
| `cursorStoreName` | `tg-cursors` | Named key-value store that holds the "last post" memory. It lives in your own account and is kept indefinitely |
| `downloadMedia` | false | Save photos and videos to the run's key-value store |

### How much does it cost?

- **$0.80 per 1,000 posts** (`post`, charged after each post is written to the dataset).
- **$1 per 1,000 saved media files** (`media-file`, only with `downloadMedia` on).
- Free: channel status rows and channels with no posts.
- Apify adds a very small run-start charge, shown on the Pricing tab.

**Worked example with the free $5 monthly credit.** Apify's free plan includes $5 of credit each month. That reads about 6,250 posts. Watching 20 channels once a day with `onlyNewPosts` on, at about 5 new posts per channel, is 100 posts a day: $0.08 a day, about $2.40 for 30 days.

To cap spending, set a maximum cost per run in the run options. The actor stops cleanly when it is reached. With `onlyNewPosts` on, the next run continues exactly where it stopped, with nothing skipped or charged twice.

### Limits

- **Preview depth.** Telegram's preview reaches back only a limited number of recent posts per channel, often around 100 to 200. This is not a full-history archive.
- **Media.** Only photos and videos with a download link in the preview can be saved. Documents and voice messages are listed as metadata only. Videos too large for the preview have no file. Saved files go into the run's key-value store, which Apify deletes after 7 days: download what you need before then.
- **Views and reactions** are abbreviated by Telegram (`1.2K`), so the integer value is approximate. Many channels show no reactions at all. Custom-emoji reactions have no character, only an id.
- **Gaps.** If `maxPostsPerChannel` is reached (or the preview ends) before the previous run's last post is found, posts in between may be missing. The status row then shows `gap: true`.
- Posts edited after delivery are not delivered again.
- Public channels only. No comments, member lists or user profiles. Private invite links, groups, bots and users are not supported.
- Requests are sequential with short delays and retries on rate limiting. Heavy use may still be limited by Telegram.

### FAQ

**Do I need a Telegram API key or phone number?**
No. It reads the public web preview at t.me/s/<channel>, the page anyone can open in a browser, so there is no login, API key, phone number or proxy. Private channels, bots, missing channels and channels with previews disabled return a status row with hasPreview false, free of charge.

**How far back can it go?**
Only as far as Telegram's public preview reaches, often around 100 to 200 recent posts per channel. This is not a full-history archive. Set maxPostsPerChannel to cap each run; the default is 20. For channels that post often, schedule runs with only new posts switched on so you keep what you collect.

**How does the new-posts-only mode work?**
Turn on onlyNewPosts and schedule the actor. It remembers the last delivered post of each channel in a named key-value store in your own account, and later runs return only newer posts. If a run stops at your maximum cost, the next run continues exactly where it stopped, with nothing skipped or charged twice.

**How accurate are views and reactions?**
Telegram abbreviates them in the preview, such as 1.2K, so the integer in views is approximate; viewsRaw keeps the text exactly as shown. Many channels show no reactions at all. Custom-emoji reactions have no character, only an id, while standard and paid reactions give the emoji or type with a count.

**Can it download photos and videos?**
Yes, switch on downloadMedia and photos and videos with a download link in the preview are saved to the run's key-value store, at $0.001 each. Documents and voice messages are listed as metadata only, and videos too large for the preview have no file. Apify deletes that store after 7 days, so download what you need.

**What about Telegram's terms of service?**
Telegram's terms of service apply to how you use this data, and you are responsible for your use. The actor reads only public preview pages: no comments, member lists or user profiles. Posts can contain personal data, so use them lawfully, and check the terms and your local rules before building a product on the data.

**Can I schedule it or call it from my own tools?**
Yes. Schedule it in Apify Schedules with onlyNewPosts on, so each run delivers only posts since the last one, or call it through the Apify API. n8n, Make and Zapier have Apify integrations, and AI agents can run it through Apify's MCP server. Rows land in the default dataset as JSON, CSV or Excel.

### Use from code or an AI agent

The actor runs under limited permissions. Python example:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("cyrus_1/telegram-public-channel-scraper").call(
    run_input={"channels": ["telegram", "durov"], "maxPostsPerChannel": 20, "onlyNewPosts": True}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row.get("type") == "post":
        print(row["channel"], row["date"], row["views"], row["url"])
```

The same input works with the JavaScript client, the REST API, n8n, Make and Zapier. AI agents can find and run the actor through Apify's MCP server (the `search-actors`, `fetch-actor-details` and `call-actor` tools).

### More from this publisher

- [Bluesky Posts and Profiles Scraper](https://apify.com/cyrus_1/bluesky-posts-profiles) reads public Bluesky accounts, feeds and profiles the same way.
- [Substack Posts and Comments Scraper](https://apify.com/cyrus_1/substack-posts-and-comments) reads public newsletters, with a new-posts-only mode.
- [RSS and Atom Feed Reader (new items only)](https://apify.com/cyrus_1/rss-atom-feed-reader) watches any RSS, Atom or JSON feed for new items.

# Actor input Schema

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

Public channel names or t.me links, for example durov or https://t.me/durov. Private invite links, groups, bots and users are not supported.

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

Cap on posts delivered per channel per run. Telegram previews only reach back a limited number of recent posts.

## `onlyNewPosts` (type: `boolean`):

Use the saved cursor for each channel and deliver only posts newer than the last one delivered.

## `cursorStoreName` (type: `string`):

Name of the key-value store that remembers the last delivered post per channel (used with 'Only posts since last run').

## `downloadMedia` (type: `boolean`):

Save photos and videos to the run's key-value store (kept 7 days). Documents are listed as metadata only. Charged per file.

## Actor input object example

```json
{
  "channels": [
    "telegram"
  ],
  "maxPostsPerChannel": 20,
  "onlyNewPosts": false,
  "cursorStoreName": "tg-cursors",
  "downloadMedia": false
}
```

# Actor output Schema

## `results` (type: `string`):

One row per post (text, date, views, reactions, links, media) and one status row per channel (subscribers, whether a public preview exists, gap flag). Open as a table, JSON, CSV or Excel.

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

```

## MCP server setup

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