# Telegram Channel Scraper — with view counts (`entrogix_works/telegram-channel-scraper`) Actor

Scrape public Telegram channels and get posts with view counts parsed into numbers, plus a reach summary. Unofficial; not affiliated with Telegram.

- **URL**: https://apify.com/entrogix\_works/telegram-channel-scraper.md
- **Developed by:** [Entrogix Works](https://apify.com/entrogix_works) (community)
- **Categories:** Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 post scrapeds

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Telegram Channel Scraper — with view counts

Read public Telegram channels and get every post **with its view count as an actual number** — plus a summary of how much reach the channel really gets.

### Why view counts matter

Most social platforms only show you likes. Likes measure the small fraction of readers who felt strongly enough to act; they tell you almost nothing about how many people actually saw a post.

**Telegram publishes view counts, and very few platforms do.** That lets you separate two questions that are usually tangled together: *how far did this reach*, and *did the people it reached care*.

The catch is that Telegram renders those counts as `4.07M` or `1.2K`. You cannot sort, filter or average a string. This Actor parses them into integers so the data is usable — while keeping the original text, because the rounding is real and you should be able to see it.

### What you get per post

| Field | Example |
|---|---|
| `postId`, `url` | `durov/516`, `https://t.me/durov/516` |
| `text`, `hasText` | plain-text body, and whether the post had any text at all |
| **`views`** | `4070000` — parsed from `4.07M` |
| `viewsText` | `4.07M` — the original, so the rounding is visible |
| `postedAt` | ISO 8601 timestamp |
| **`postType`** | `original` / `forwarded` / `reply` |
| `author`, `forwardedFrom` | when the channel shows them |

`hasText` exists because image-only and video-only posts are common on Telegram. Without it, an empty `text` looks like a scraping failure rather than what the channel actually published.

### Summary (key-value store, `VIEWS_SUMMARY`)

- `medianViews`, `p25Views`, `p75Views` — the channel's normal reach, not just its best day
- **`topPost`** — the single most-viewed post, with an excerpt and link
- **`forwardedShare`** — how much of the channel is forwarded from elsewhere. A high value means the channel curates rather than creates.
- `textShare` — how much of it is text versus media
- `byType` — counts of original / forwarded / reply

`forwardedShare` is often the fastest way to judge a channel: one that forwards 80% of its posts is an aggregator, and its audience belongs to somebody else.

### Input

```json
{
  "channels": ["durov", "@telegram"],
  "maxItemsPerChannel": 100
}
```

The `@` is optional. Posts are fetched about 20 at a time, walking backwards through the channel's history until the limit is reached or the channel runs out.

### Scope and limits

- **Public channels only.** This Actor reads the public preview page that Telegram serves to anonymous visitors. It does not log in, and private channels, groups and direct messages are not accessible — those will be reported as an error rather than silently returning nothing.
- View counts are rounded by Telegram itself. `4.07M` means somewhere between 4,070,000 and 4,079,999. `viewsText` is included so you can see exactly what was reported.
- Some posts have no view count (very recent ones, occasionally). Those are returned with `views: null` rather than `0`, so they do not drag your averages down.

### Pricing

Pay per result — charged only for posts actually delivered to your dataset. Duplicates are removed before charging.

### Disclaimer

**This is an unofficial tool and is not affiliated with, endorsed by, or sponsored by Telegram.** "Telegram" is a trademark of its respective owner and is used here only to describe what this Actor reads. You are responsible for ensuring your use of the collected data complies with applicable law and with Telegram's terms.

# Actor input Schema

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

Public channel usernames, with or without @ (e.g. durov). Private channels are not accessible and will be reported as an error.

## `maxItemsPerChannel` (type: `integer`):

Posts are fetched about 20 at a time, walking backwards through the channel history.

## `minIntervalMs` (type: `integer`):

Politeness delay between page requests.

## `useProxy` (type: `boolean`):

Off by default — this target was measured to work 5/5 without a proxy. Turn on only if you hit blocks.

## `proxyType` (type: `string`):

Used only when Use Apify Proxy is on. DATACENTER is far cheaper than RESIDENTIAL and was measured to work here.

## Actor input object example

```json
{
  "channels": [
    "durov"
  ],
  "maxItemsPerChannel": 50,
  "minIntervalMs": 2000,
  "useProxy": false,
  "proxyType": "DATACENTER"
}
```

# Actor output Schema

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

Every row this run produced, as JSON.

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

Totals and medians for this run, so you can judge the rows without reading them all.

# 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": [
        "durov"
    ]
};

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

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

```

## MCP server setup

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