# Telegram Channel Posts Scraper (`automatic/telegram-channel-posts-scraper`) Actor

Export public Telegram channel posts and channel information from anonymous web previews. Keyword search is not offered.

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

## Pricing

from $1.25 / 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 Posts Scraper

### What it does

Export Telegram channel posts and channel information from public web previews. Keyword search is not offered.

### Input

Run with `{}` to collect 10 recent posts from the official Telegram News channel. No account, login or Telegram API credentials are needed.

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

`channels` accepts usernames, @usernames and t.me channel URLs. `mode` is `posts` (default) or `channelInfo`. `maxPostsPerChannel` is 1–10,000, default 10. Optional `since` and `until` accept ISO timestamps with an explicit timezone, for example `2026-10-01T00:00:00Z`; both bounds are inclusive. Paging stops once posts are older than `since`.

### Output

Every row has `rowType`, `channel` and a `url` on t.me. Post rows include post ID, ISO date, text, displayed views, edited flag, forwarded-from name and link, reply link, media types, thumbnail URLs, link previews and structured reactions (emoji or emojiId, paid, integer count). Channel rows include title, description, displayed subscriber count, photo URL and verification flag. Missing fields are null or empty arrays; views and subscribers are integer estimates expanded from displayed K/M/B counts. Service messages are skipped. Media types include photos, videos, documents, audio, voice, polls, stickers, round videos and GIFs; link-preview thumbnails live on linkPreview. Albums and unsupported media may have incomplete metadata. Thumbnail URLs may expire. Only the web preview's visible history is available.

### Limits

Runs with saved rows succeed and name failed targets in the status. A nonexistent channel or disabled preview is a failed target. With no rows, failures fail the run; an empty history or an empty date range succeeds. If Telegram is slow or unavailable, the run may return partial results and says so in its status.

Only anonymous public t.me pages are read: no private chats/groups, member lists, deleted content or media downloads. The actor collects public post text as published; it does not enrich identities or contact information.

### Output example

```json
{"rowType": "post", "channel": "telegram", "postId": 460, "url": "https://t.me/telegram/460", "date": "2026-08-26T19:12:34+00:00", "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\n\nAugust Features\n1 • 2 • 3 • 4 • 5 • More", "views": 2160000, "edited": false, "forwardedFrom": null, "replyTo": null, "mediaTypes": [], "thumbnailUrls": [], "linkPreview": {"url": "https://telegram.org/blog/welcome-messages-buttons-TG-13", "title": "Welcome Messages, Buttons in Messages and Signed Gifts", "description": "Introducing Welcome Messages to greet new members of groups or channels, Buttons in Messages to make any text interactive, Inline Documents in Messages and much more.", "thumbnailUrls": ["https://cdn4.telesco.pe/file/R0fw2EwzTeE5Worf5xx9M0sL0tJ_eNXApN0jnlMPLjjNPGThrIobblWMBOS4omLICGgUlzVB2fdrUwhJn6qzMb06ozBiU2mNGoFyQ3DWB3qz7cc7B2cez13JYn8thp8RAjeWPvgwT39zoOwB4fPvXF63kIHRq3msanA0wDx3rxCDYsLACHzy_3debt5hJ_Cpgz-bWC-cvHk2F_Ktm9h1Tecs5gEeFIMm5mIz62xNba4pptaYsXIr-Dw8ux0OlaXFDxVCnzi_w2uUmV7EURnVplv5EZLfJ5M_8Be0wSWnDwtMI3zrH2tKY8kyJyTc_rAFHQDyGZGF7-CePB0md8RX5Q.jpg"]}, "reactions": []}
```

### Pricing

Delivered dataset rows are result units. See the Pricing tab for current charges. Default memory is 512 MB. Start charges, where configured, apply per GB of memory, rounded up; the default 512 MB run is one start unit.

### Tips

Use inclusive `since` and `until` bounds to collect a specific period. The available history is limited to what Telegram exposes in public web previews.

# Actor input Schema

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

Public channel usernames, @usernames, https://t.me/name or https://t.me/s/name URLs.

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

Collect posts or channel information.

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

Maximum posts to save for each channel.

## `since` (type: `string`):

Inclusive ISO timestamp with a UTC offset or Z; null or empty means absent.

## `until` (type: `string`):

Inclusive ISO timestamp with a UTC offset or Z; null or empty means absent.

## Actor input object example

```json
{
  "channels": [
    "telegram"
  ],
  "mode": "posts",
  "maxPostsPerChannel": 10
}
```

# 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"
    ],
    "maxPostsPerChannel": 10
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automatic/telegram-channel-posts-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/poQaNQo0TYvbLIpzV/builds/TaUK8Q3Ybn2rvneSQ/openapi.json
