# Telegram Channel Scraper & API - Public Posts, Views & Links (`rocketyard/telegram-channel-scraper`) Actor

Telegram channel API: returns the public posts of Telegram channels (post text, date, views, reactions, links, hashtags, media type, polls and more) over REST. Stop at a date or a number of posts per channel before billing. JSON, CSV or Excel. $1.00 per 1,000 posts, no subscription.

- **URL**: https://apify.com/rocketyard/telegram-channel-scraper.md
- **Developed by:** [Rocketyard](https://apify.com/rocketyard) (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

from $1.00 / 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 & API - Public Posts, Views & Links

**Telegram Channel Scraper & API** is a REST API on the Apify platform: one request returns the latest public posts of any Telegram channel, as JSON, CSV or Excel. You can also run it from a form in the Apify Console, without code.

### What does Telegram Channel Scraper & API do?

Telegram Channel Scraper & API returns the public posts of Telegram channels: one clean record per post, with typed values (numbers, booleans, ISO dates) ready for spreadsheets, databases and AI pipelines.

- Every public post with its date, text, views, reactions, links, hashtags, media type and polls, as typed values
- Exact subscriber counts from the channel's info page, not only the rounded number on the preview
- Forwarded posts name the public channel they came from; posts say when they were edited and which post they reply to
- Pages back 20 posts at a time, and stops at a date with Posts since: on a schedule you pay only for new posts
- No login, no phone number, no API ID or bot token: plain HTTP requests to the public web preview
- A channel that cannot be read gets a free error item with the reason; the others carry on
- Pay only per post: no monthly rental, no start or per-channel fee

### Use cases

- **Monitor news, crypto and company channels for new posts, views and reactions**
- **Collect channel posts with links and hashtags for research, media monitoring and AI pipelines**
- **Track how posts perform: views, reactions and forwards over time**
- **Archive the public history of a channel as structured data**

### Why this Telegram post scraper?

- Several competitors have unreliable runs (<90% success in 30 days)
- Cheaper than typical alternatives ($1.00 vs $2.00 per 1,000 results)

### How it compares

| Telegram post scraper | Users (last 30 days) | Successful runs (last 30 days) | Price per 1,000 results |
| --- | --- | --- | --- |
| Telegram Scraper: Channels, Messages, Comments & Profiles | 318 | 99.5% | $1.00 |
| Telegram Scraper | 153 | 100.0% | $5.00 |
| Telegram Channel Search Scraper (topic, subscribers, no login) | 105 | 98.3% | $3.00 |
| **This Actor** | new | every release is tested on live pages first | **$1.00** |

Apify Store data from 2026-11-20, free-plan prices. Prices and stats change; check each listing before you compare.

### Telegram channel API

Every Apify Actor is also a REST endpoint, so Telegram Channel Scraper & API works as a Telegram channel API, a Telegram posts API or a Telegram scraper API, without a server of your own. One `POST` starts a run, waits for it and returns the results:

```text
POST https://api.apify.com/v2/acts/rocketyard~telegram-channel-scraper/run-sync-get-dataset-items
```

Send your [Apify API token](https://console.apify.com/settings/integrations) in the `Authorization` header and the [input](#input-example) as the JSON body. Add `?format=csv` or `?format=xlsx` to get CSV or Excel instead of JSON. The request waits up to 300 seconds; for a longer run, start it with `POST /v2/acts/rocketyard~telegram-channel-scraper/runs` and read the dataset when it finishes.

### How it works

Telegram publishes a web preview of every public channel at `https://t.me/s/<channel>`: the latest 20 posts, and older ones 20 at a time. The Actor reads those pages over plain HTTP, without a browser, login, phone number or API key, honours Telegram's robots.txt and keeps requests at least half a second apart. It turns each post into a typed record: the date in ISO 8601, views and reactions as numbers, the text with its links and hashtags, the media type, polls, and whether the post was edited or forwarded. The exact subscriber count comes from the channel's info page, and the source of a forwarded post from the post's embed. A channel that cannot be read gets an error item that says why, and is not charged.

### How to use it

1. Click **Try for free**.
2. Add channel links to **Channel URLs** (for example `https://t.me/telegram`), or usernames to **Channel usernames**.
3. Set **Max posts per channel**, and optionally **Posts since** to stop at a date.
4. Click **Start**, then download results as JSON, CSV or Excel, or read them through the API.

### Input

| Field | JSON key | What it does |
|---|---|---|
| Channel URLs | `startUrls` | Public channel links such as https://t.me/telegram or https://t.me/s/telegram (a post link reads its channel). Leave empty if you use Channel usernames. |
| Channel usernames | `channels` | Usernames of public channels, such as "telegram" or "@binance_announcements". |
| Max posts per channel | `maxPostsPerChannel` | Newest posts to return from each channel. The Actor pages back 20 posts at a time until it has this many. |
| Posts since | `since` | Only posts published since this date, such as "2026-10-01", or within this age, such as "7 days". Paging stops at the first older post. On a schedule, this returns only new posts. |
| Max results | `maxItems` | Stop after this many posts in total, over all channels. This also caps the cost of the run. |
| Max concurrency | `maxConcurrency` | Channels read in parallel. Requests to Telegram stay at least half a second apart either way. |
| Proxy configuration | `proxyConfiguration` | Optional Apify Proxy for ordinary routing. It is not a way around a block: a blocked channel returns an error item. |

### Input example

```json
{
  "startUrls": [
    {
      "url": "https://t.me/telegram"
    }
  ],
  "channels": [
    "@binance_announcements"
  ],
  "maxPostsPerChannel": 100,
  "since": "30 days"
}
```

### Output example

A real record from the latest test run (t.me) on 2026-11-20. Fields the page didn't publish are left out here; the Actor returns them as `null`.

```json
{
  "url": "https://t.me/binance_announcements/9154",
  "type": "SocialMediaPosting",
  "channel": "binance_announcements",
  "channelTitle": "Binance Announcements",
  "channelSubscribers": 3157480,
  "postId": 9154,
  "date": "2026-11-20T08:02:13.000Z",
  "text": "Binance Earn: Enjoy Up to 5% APR with USDC and USDT Flexible Products (2026-11-22)\n\nBinance Earn is excited to renew the campaign for the USDC and USDT Simple Earn Flexible Products! During the Promotion Period, eligible users who subscribe to USDC and USDT Flexible Products may enjoy up to 5% AP…",
  "views": 9610,
  "reactions": [
    {
      "emoji": "❤",
      "customEmojiId": null,
      "count": 18
    },
    {
      "emoji": "😢",
      "customEmojiId": null,
      "count": 17
    },
    {
      "emoji": "👏",
      "customEmojiId": null,
      "count": 4
    },
    {
      "emoji": "👍",
      "customEmojiId": null,
      "count": 3
    },
    {
      "emoji": "🐳",
      "customEmojiId": null,
      "count": 3
    },
    {
      "emoji": "💯",
      "customEmojiId": null,
      "count": 1
    }
  ],
  "reactionCount": 46,
  "links": [
    "https://www.binance.com/en/support/announcement/detail/720dd77bcb9c41acafc8cc1c15505b5d?utm_source=EnglishTelegram&utm_medium=GlobalCommunity&utm_campaign=AnnouncementBot"
  ],
  "mediaType": "photo",
  "mediaCount": 1,
  "forwarded": false,
  "edited": false,
  "scrapedAt": "2026-11-20T10:39:23.864Z"
}
```

#### Output fields

| Field | Description |
|---|---|
| `url` | Link to the post (https://t.me/<channel>/<post ID>) |
| `type` | Always `SocialMediaPosting` |
| `channel` | Channel username, without the @ |
| `channelTitle` | Channel name |
| `channelSubscribers` | Subscribers as a number: exact from the channel's info page, or the preview's rounded count when the info page has none |
| `postId` | Post number within the channel |
| `date` | Published (ISO 8601, UTC) |
| `text` | Post text with line breaks; empty for a post with media only |
| `views` | Views as a number, from the count Telegram displays (rounded for large counts) |
| `reactions` | Reactions shown on the post: `emoji` (⭐ for paid reactions), `customEmojiId` for custom emoji, `count` |
| `reactionCount` | Sum of the reaction counts shown (0 when the post shows none) |
| `links` | Links in the post text and its link preview |
| `hashtags` | Hashtags Telegram linked in the post |
| `mediaType` | `photo`, `video`, `audio`, `document`, `poll`, `sticker`, `location`, `other` or `none` |
| `mediaCount` | Photos, videos or files attached (an album has several) |
| `poll` | Polls only: `question`, `type`, `voters` and `options` with their `text` and `percent` |
| `forwarded` | `true` when the post was forwarded from another chat |
| `forwardedFrom` | The public channel a forwarded post came from: `channel`, `title`, `url` of the original post. Empty when it came from a person's account or the source is hidden |
| `replyToPostId` | The post of the same channel this post replies to |
| `edited` | `true` when Telegram marks the post as edited |
| `scrapedAt` | ISO timestamp of the extraction |

### Error items

When an input produces no data, the dataset gets one **error item** for it, so nothing is skipped silently. Error items are **free**: only result records are charged.

```json
{
  "url": "https://t.me/s/no_such_channel_example",
  "input": "https://t.me/s/no_such_channel_example",
  "error": {
    "type": "https://rocketyard.dev/errors#channel-not-found",
    "title": "Channel not found",
    "detail": "No public Telegram channel at @no_such_channel_example: it does not exist, is private, or is a person's or a bot's account.",
    "instance": "https://t.me/s/no_such_channel_example",
    "code": "CHANNEL_NOT_FOUND"
  }
}
```

The `error` object follows [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) (Problem Details). Its `type` links to the [explanation of the code](https://rocketyard.dev/errors), and `status` is the site's HTTP status when there was one. Filter on `error.code` to separate failures from data; it has its own column in CSV and Excel exports.

| Code | Meaning | Retry? |
|---|---|---|
| [`ROBOTS_DISALLOWED`](https://rocketyard.dev/errors#robots-disallowed) | The site's robots.txt does not allow automated access to this URL (or to the page it redirects to), so it was not fetched. | no |
| [`ROBOTS_UNREACHABLE`](https://rocketyard.dev/errors#robots-unreachable) | The site's robots.txt could not be loaded because of a server or network error. Under RFC 9309, the page is then not fetched. | yes |
| [`PRIVATE_ADDRESS`](https://rocketyard.dev/errors#private-address) | The URL, or a redirect from it, points to a private or local network address. Only public websites are fetched. | no |
| [`BLOCKED`](https://rocketyard.dev/errors#blocked) | The site refused access (HTTP 401, 403 or 429) or answered with a bot-check or consent page instead of the content. | sometimes |
| [`HTTP_ERROR`](https://rocketyard.dev/errors#http-error) | The site answered with another HTTP error: a server error (5xx) that persisted after retries, or an unexpected 4xx status. | sometimes |
| [`TIMEOUT`](https://rocketyard.dev/errors#timeout) | The site did not answer in time, even after retries. | yes |
| [`NETWORK_ERROR`](https://rocketyard.dev/errors#network-error) | The connection failed (DNS, TLS or a reset connection), even after retries. | yes |
| [`WRONG_CONTENT_TYPE`](https://rocketyard.dev/errors#wrong-content-type) | The URL returned something the Actor doesn't read, such as a PDF or image instead of an HTML page, or a web page where an API response was expected. | no |
| [`TOO_LARGE`](https://rocketyard.dev/errors#too-large) | The response exceeded the size limit (10 MiB for web pages, 48 MiB for API responses). | no |
| [`PARSE_ERROR`](https://rocketyard.dev/errors#parse-error) | The response could not be read (malformed HTML or JSON). | sometimes |
| [`EMPTY`](https://rocketyard.dev/errors#empty) | The source has nothing to return right now: a list with no open items, a store or collection with no products, a search with no results, or a web page whose HTML has no readable text (often a page built only by JavaScript in the browser). | no |
| [`NO_MATCHES`](https://rocketyard.dev/errors#no-matches) | The source has items, but none of them matched your filters. | no |
| [`CHANNEL_NOT_FOUND`](https://rocketyard.dev/errors#channel-not-found) | No public channel exists at this handle, ID or URL. On Telegram, this includes groups, private channels and personal or bot accounts, which have no public channel preview. | no |

### Limits

- Public channels only. Groups, comments, member and subscriber lists, user profiles, private channels and invite links are never read; a name that is not a public channel returns a free `CHANNEL_NOT_FOUND` item.
- Views and reaction counts are as Telegram displays them, rounded for large numbers (1.68M). The subscriber count is exact when the channel's info page shows it.
- The preview hides where a forward came from. The Actor reads the post's embed to name the source channel; a forward from a person's account is marked `forwarded` and never named.
- Media files are not downloaded: each post says its media type and how many files it has.
- Telegram serves 20 posts per page and the Actor waits half a second between requests, so reading far back takes time: about 2,000 posts a minute.
- When Telegram refuses a request or answers with a bot check, that channel returns a free `BLOCKED` error item; run it again later. The Actor never works around a block.

### Pricing

Pay per result: **$1.00 per 1,000 posts**, plus a tiny per-run start fee. Channels that cannot be read produce an error item, which is not charged, and posts older than **Posts since** are not charged. There is no monthly rental, and you can cap spend per run with **Max results** or **Maximum cost per run**.

### Integrations and API

Run it from the [Apify API](https://docs.apify.com/api/v2), the JavaScript/Python clients, Make, Zapier, n8n, LangChain or any MCP-compatible AI agent, and send results to Google Sheets, webhooks, S3 and more. Schedule it to track changes over time.

### FAQ

**Which channels does it work on?** Any public Telegram channel whose web preview opens at `https://t.me/s/<channel>` in a browser: news, company, crypto and creator channels. Private channels, groups and bots have no such preview.

**Does it need a Telegram account or API key?** No. It reads the public web preview any browser opens at `https://t.me/s/<channel>`, with no login, phone number, API ID or bot token.

**How exact are the numbers?** Views and reaction counts are what Telegram displays, rounded for large numbers (1.68M views). The subscriber count is exact when the channel's info page shows it (for example 10,044,174); otherwise it is the preview's rounded count.

**Can it read older posts?** Yes. It pages back 20 posts at a time from the newest, until it has **Max posts per channel** posts or reaches a post older than **Posts since**.

**Does it scrape comments, groups or members?** No. It reads public channel posts only. Comments, group chats, member lists and user profiles are data about people, which the Actor does not collect.

**How do I get only new posts?** Schedule it with **Posts since** set to an age such as `1 day`: each run returns only the posts of the last day, and you pay only for those.

**How much does it cost?** You pay per result: $1.00 per 1,000 posts, plus a start fee of $0.00005 per run, with no subscription. Cap any run with **Maximum cost per run**.

**How do I call it from the API?** One request starts a run and returns its results, using your [Apify API token](https://console.apify.com/settings/integrations):

```bash
curl -X POST "https://api.apify.com/v2/acts/rocketyard~telegram-channel-scraper/run-sync-get-dataset-items" -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" -d '{"startUrls":[{"url":"https://t.me/telegram"}],"channels":["@binance_announcements"],"maxPostsPerChannel":100,"since":"30 days"}'
```

**How do I use it with AI agents?** Connect Apify's MCP server at `https://mcp.apify.com?tools=rocketyard/telegram-channel-scraper`, and the agent can call this Actor as a tool.

**Is it legal to scrape Telegram data?** The Actor reads only the web preview Telegram publishes for anyone at t.me/s/<channel>, honours Telegram's robots.txt, sends no cookies, never logs in and doesn't work around a block. It returns no comments, member lists or data about people: post signatures and forwards from personal accounts are left out. You are responsible for how you use the data under Telegram's terms and the law (for example copyright and GDPR).

**What happens when an input fails?** If a channel can't be read, the dataset gets one [error item](#error-items) for it with a code and the reason. Error items are free, and the other channels still run.

**I need a field that is not supported.** Open an issue on the Actor's Issues tab. Requests are reviewed regularly and drive new features.

### You might also like

- [YouTube Channel Scraper - Subscribers, Views & Links](https://apify.com/rocketyard/youtube-channel-scraper): returns the public profile of YouTube channels with their latest uploads
- [YouTube Search API & Scraper - Videos, Shorts & Channels](https://apify.com/rocketyard/youtube-search-scraper): returns the results of YouTube searches
- [App Store Reviews API & Scraper - Ratings, Text & Versions](https://apify.com/rocketyard/app-store-reviews-scraper): returns the public reviews of any App Store app, with star ratings, text, app versions and dates
- [Article Scraper - Any Website (Schema.org)](https://apify.com/rocketyard/article-schema-scraper): article data from any website with schema.org markup
- [Google News API & Scraper - Headlines by Keyword & Country](https://apify.com/rocketyard/google-news-scraper): returns the headlines of any Google News search or topic

### Made by Rocketyard

[Rocketyard](https://rocketyard.dev) builds pay-per-result scrapers for public web data, and every release is tested on live pages before it ships. Guides for this Actor: [overview](https://rocketyard.dev/telegram-channel-scraper), [REST API](https://rocketyard.dev/telegram-channel-scraper#api), [MCP for AI agents](https://rocketyard.dev/telegram-channel-scraper#mcp) and [n8n, Make and Zapier](https://rocketyard.dev/telegram-channel-scraper#automation).

# Actor input Schema

## `startUrls` (type: `array`):

Public channel links such as https://t.me/telegram or https://t.me/s/telegram (a post link reads its channel). Leave empty if you use Channel usernames.

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

Usernames of public channels, such as "telegram" or "@binance_announcements".

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

Newest posts to return from each channel. The Actor pages back 20 posts at a time until it has this many.

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

Only posts published since this date, such as "2026-10-01", or within this age, such as "7 days". Paging stops at the first older post. On a schedule, this returns only new posts.

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

Stop after this many posts in total, over all channels. This also caps the cost of the run.

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

Channels read in parallel. Requests to Telegram stay at least half a second apart either way.

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

Optional Apify Proxy for ordinary routing. It is not a way around a block: a blocked channel returns an error item.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://t.me/s/telegram"
    }
  ],
  "maxPostsPerChannel": 20,
  "maxItems": 10000,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

One record per Telegram post, plus a free error item for each input that yielded no data, as JSON, CSV or Excel.

## `runSummary` (type: `string`):

Channels read, pages read, posts stored, channels skipped or refused, and how long the run took.

# 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 = {
    "startUrls": [
        {
            "url": "https://t.me/s/telegram"
        }
    ],
    "maxPostsPerChannel": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("rocketyard/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 = {
    "startUrls": [{ "url": "https://t.me/s/telegram" }],
    "maxPostsPerChannel": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("rocketyard/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 '{
  "startUrls": [
    {
      "url": "https://t.me/s/telegram"
    }
  ],
  "maxPostsPerChannel": 20
}' |
apify call rocketyard/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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