# Telegram Channel Scraper - Posts, Profiles, Members & Search (`lentic_clockss/telegram-channel-scraper`) Actor

Extract public Telegram channel posts, channel profiles and single posts as structured rows. Members, keyword search and comments need an account session. Pay per delivered row plus a start fee.

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

## Pricing

from $0.70 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

**Export posts, channel profiles and single posts from public Telegram channels as structured rows, with view counts, reactions and links.**

- Newest-first posts from any public channel, with text, links, views, forwards and reactions.
- Channel profiles with title, description, subscriber count and media counters.
- Single posts by link, such as `https://t.me/durov/553`.
- Group members, keyword search across public channels and comments under a post, when an account session is available.
- Pay only for the rows you receive: one row is one billed result, plus a small start fee.

### What does Telegram Channel Scraper do?

Telegram Channel Scraper collects public data from `t.me`. It reads public channels and groups only. It does not read private chats, private groups or invite-only channels, it does not download media files and it does not send messages.

- **Channel posts (`posts`)**: the newest posts of each channel in `channels`, newest first.
- **Channel profile (`profile`)**: one row per channel with title, description, subscribers and counters.
- **Single posts (`post`)**: one row per link in `postUrls`.
- **Group members (`members`)**: members of a public group. Needs an account session.
- **Keyword search (`search`)**: posts that match each keyword in `searchQueries`, across public channels. Needs an account session.
- **Comments (`comments`)**: comments under each post in `postUrls`. Needs an account session.

The three modes marked "needs an account session" can be temporarily unavailable. When that happens the run fails at once with the error `AUTH_SESSION_UNAVAILABLE` and no row is charged. The `posts`, `profile` and `post` modes work from the public pages and do not depend on a session.

Telegram shows rounded counters on public pages, such as `455K` views. The Actor keeps the number it can read in `views` and the text Telegram showed in `viewsDisplay`, and sets `viewsApprox` to `true` when the number was expanded from a rounded value. Turn on `exactCounts` to replace rounded view counts with exact numbers for posts. This uses an account session.

### What data can you extract from Telegram?

Every row has a `rowType` and an `id`. Fields the source does not show stay `null`. These are the most useful fields; the dataset schema lists all of them.

#### Post rows (`channel_post`)

| Field | Description | Example |
| --- | --- | --- |
| `channel` | Channel username | `durov` |
| `postId` | Post number inside the channel | `553` |
| `url` | Link to the post | `https://t.me/durov/553` |
| `publishedAt` | Publication time | `2026-03-14T09:30:00+00:00` |
| `text` | Post text | `Example post text` |
| `links` | Links found in the post | `["https://example.com"]` |
| `views` | View count | `455000` |
| `viewsDisplay` | View count as Telegram showed it | `455K` |
| `viewsApprox` | `true` when `views` was expanded from a rounded value | `true` |
| `forwards` | Forward count | `1200` |
| `repliesCount` | Number of replies, when comments are enabled | `300` |
| `reactions` | List of reactions with `emoji` and `count` | `[{"emoji":"👍","count":5200}]` |
| `mediaType` | Kind of attached media | `photo` |
| `mediaCount` | Number of attached media items | `1` |
| `forwardedFrom` | Original source of a forwarded post: `{name, url}` | `{"name": "Telegram", "url": "https://t.me/telegram"}` |

#### Profile rows (`channel_profile`)

| Field | Description | Example |
| --- | --- | --- |
| `username` | Channel username | `durov` |
| `title` | Channel title | `Example Channel` |
| `about` | Channel description | `Example description` |
| `subscribers` | Subscriber count | `7000000` |
| `subscribersDisplay` | Subscriber count as Telegram showed it | `7M` |
| `verified` | Verified badge | `true` |
| `photosCount` | Number of photos | `250` |
| `videosCount` | Number of videos | `80` |
| `linksCount` | Number of shared links | `120` |
| `linkedChatId` | Linked discussion group, when there is one | `null` |

#### Member rows (`participant`)

| Field | Description | Example |
| --- | --- | --- |
| `channel` | Group username | `examplegroup` |
| `userId` | Numeric user ID | `1000001` |
| `username` | Public username, when set | `example_user` |
| `firstName` | First name | `Jane` |
| `isBot` | Whether the member is a bot | `false` |
| `lastSeen` | Last-seen status shown by Telegram | `recently` |
| `role` | Role in the group | `member` |

#### Search rows (`search_hit`) and comment rows (`comment`)

| Field | Description | Example |
| --- | --- | --- |
| `query` | Keyword that matched (search rows) | `example keyword` |
| `channelTitle` | Title of the channel with the match (search rows) | `Example Channel` |
| `commentId` | Comment number (comment rows) | `42` |
| `authorName` | Display name of the commenter (comment rows) | `Jane Doe` |
| `authorUsername` | Username of the commenter (comment rows) | `example_user` |
| `replyToCommentId` | Comment this one replies to (comment rows) | `null` |

### How to scrape Telegram

1. Open [Telegram Channel Scraper](https://apify.com/lentic_clockss/telegram-channel-scraper) in Apify Console (a free Apify account is enough to try it).
2. Fill one target field, for example `channels`. Leave everything else as it is.
3. Set `maxResults` to a small number such as `3` for your first run.
4. Click **Start** and wait for the run to finish.
5. Download the results as JSON, CSV, Excel or another format, or read them through the API.

An empty input starts an example run for the channel `durov` in `posts` mode, limited to 3 rows, so you can see the output format before you spend anything. Fill one target field and the Actor picks the mode by itself: `postUrls` selects `post`, `searchQueries` selects `search` and `channels` selects `posts`. If you fill several target fields, `postUrls` wins over `searchQueries`, and `searchQueries` wins over `channels`.

#### Channel posts

Set `mode` to `posts` and list public channels in `channels`. You can write `durov`, `@durov`, `https://t.me/durov` or `t.me/s/durov`. Each channel has its own `maxResults` allowance.

#### Channel profile

Set `mode` to `profile` and list channels in `channels`. You get one `channel_profile` row per channel.

#### Single posts

Set `mode` to `post` and list links such as `https://t.me/durov/553` in `postUrls`.

#### Group members

Set `mode` to `members` and list public groups in `channels`. Needs an account session.

#### Keyword search

Set `mode` to `search` and list keywords in `searchQueries`. Each keyword is searched across public channels. Needs an account session.

#### Comments

Set `mode` to `comments` and list post links in `postUrls`. You get the comments under each post. Needs an account session.

### What to fill in

| Field | What to enter | Default |
| --- | --- | --- |
| `mode` | One of `posts`, `profile`, `post`, `members`, `search`, `comments` | `posts` |
| `channels` | Public channels or groups for `posts`, `profile` and `members` | `["durov"]` in the form, empty otherwise |
| `postUrls` | Post links for `post` and `comments` | Empty |
| `searchQueries` | Keywords for `search` | Empty |
| `exactCounts` | Replace rounded view counts with exact numbers; uses an account session for posts | `false` |
| `maxResults` | Rows per channel, link or keyword, 1 to 1000 | `70`; form example `3` |

Channel posts:

```json
{"mode": "posts", "channels": ["durov"], "maxResults": 5}
```

Channel profile:

```json
{"mode": "profile", "channels": ["durov", "@telegram"], "maxResults": 1}
```

Single posts:

```json
{"mode": "post", "postUrls": ["https://t.me/durov/553"], "maxResults": 1}
```

Group members:

```json
{"mode": "members", "channels": ["examplegroup"], "maxResults": 10}
```

Keyword search:

```json
{"mode": "search", "searchQueries": ["example keyword"], "maxResults": 10}
```

Comments:

```json
{"mode": "comments", "postUrls": ["https://t.me/durov/553"], "maxResults": 10}
```

- `maxResults` is the most rows for each channel, link or keyword. `maxItems` and `limit` are accepted as the same setting.
- Unknown fields never fail the run: close misspellings are corrected and other unknown fields are ignored with a note.
- Wrong input stops the run at once with a message like `INVALID_INPUT: <field> — <how to fix>`. No rows are charged.
- The `INPUT_REPORT` record in the run's key-value store shows how your input was read: fields filled, corrected or ignored.

### Output example

A post row:

```json
{
  "rowType": "channel_post",
  "id": "durov/553",
  "channel": "durov",
  "postId": 553,
  "url": "https://t.me/durov/553",
  "publishedAt": "2026-03-14T09:30:00+00:00",
  "text": "Example post text",
  "views": 455000,
  "viewsDisplay": "455K",
  "viewsApprox": true,
  "forwards": 1200,
  "reactions": [{"emoji": "👍", "count": 5200}],
  "mediaType": "photo",
  "mediaCount": 1
}
```

A profile row:

```json
{
  "rowType": "channel_profile",
  "id": "durov",
  "username": "durov",
  "url": "https://t.me/durov",
  "title": "Example Channel",
  "about": "Example description",
  "verified": true,
  "subscribers": 7000000,
  "subscribersDisplay": "7M",
  "subscribersApprox": true
}
```

You can export the dataset as JSON, CSV, Excel, XML, RSS or an HTML table.

### Why use this Telegram scraper?

- **Pay per row.** You pay for rows written to the dataset, not for pages tried. One row is one billed result.
- **Partial results are kept.** If the run is stopped or times out, rows collected so far are delivered and billed; nothing else is.
- **Clear errors.** A failed input names the field and the fix.
- **No made-up data.** A field the source does not show stays `null`.
- **Several inputs per run.** List many channels, links or keywords; each has its own `maxResults` allowance.
- **No setup.** You do not need proxies, cookies or a Telegram account for the public modes.

### How much does it cost to scrape Telegram?

The Actor uses pay-per-event pricing: **$0.005** per run start and **$0.001** per delivered row on the Free plan. Platform usage is included in these prices.

| Apify plan | Price per row | Price per 1,000 rows |
| --- | --- | --- |
| Free | $0.001 | $1.00 |
| Starter | $0.001 | $1.00 |
| Scale | $0.00087 | $0.87 |
| Business | $0.00073 | $0.73 |
| Platinum | $0.0006 | $0.60 |
| Diamond | $0.00047 | $0.47 |

- `maxResults` applies to each input. The default is 70; bigger numbers are collected in parts of 70, up to 1000 per input.
- Runs on the free Apify plan stop at 200 rows.
- The run never costs more than the **Maximum cost per run** you set in the run options (`maxTotalChargeUsd` in the API).
- A run that fails with `AUTH_SESSION_UNAVAILABLE` delivers no rows and has no row charge.
- The Apify Free plan includes **$5.00** in monthly usage credit (about **4,999 rows** at `$0.001` per row across Free-plan runs capped at 200 rows per run).

Example: 3 channels with `maxResults` set to 50 in `posts` mode deliver at most 150 rows → `150 × $0.001 + $0.005 = $0.155` on the Free plan.

### What happens when the run timeout is too short

Some requests take longer than the run timeout you chose. In that case the run does not fail. It ends early with the status message "Queued on the collection backend; this run will resume automatically when results are ready (about N s)." and shows as `ABORTED` for a while. When the results are ready the same run starts again by itself, reports "Resumed: delivering N rows.", writes the rows to the same dataset and finishes as `SUCCEEDED`. No row is delivered or charged twice, and you do not need to do anything.

- This can happen at most 3 times per run. To avoid it, keep the default timeout (`3600` s).
- The synchronous API endpoints (`run-sync`, `run-sync-get-dataset-items`) wait at most 300 seconds and can return an empty dataset while the run is paused. For larger jobs start the run asynchronously and read the dataset after the run reaches `SUCCEEDED`, or use a webhook on the "succeeded" event.

### Use with AI agents and the API

#### Apify MCP server (Claude, ChatGPT, Cursor, VS Code)

Add this Actor as a tool in any MCP client that supports remote servers:

```
https://mcp.apify.com?tools=lentic_clockss/telegram-channel-scraper
```

Sign in with Apify when the client asks (OAuth), or send the header `Authorization: Bearer <YOUR_APIFY_TOKEN>`. The tool starts a run and returns the run and dataset IDs; the agent then reads rows with `get-dataset-items`. Clients without remote MCP support can run `npx @apify/actors-mcp-server --tools lentic_clockss/telegram-channel-scraper` with the `APIFY_TOKEN` environment variable.

Example prompt: "Get the last five posts of the public Telegram channel durov with their view counts."

- **Agent execution note:** Set `maxResults` between `5` and `20` on exploratory tool calls to keep responses compact, and read `RUN_SUMMARY` and `INPUT_REPORT` from the default key-value store to inspect normalized inputs and delivered row counts. When a long run briefly reports `ABORTED` with the automatic-resume status message, wait for the same run ID to finish as `SUCCEEDED` instead of starting a duplicate run.

#### Apify API

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("lentic_clockss/telegram-channel-scraper").call(run_input={"channels": ["durov"], "maxResults": 10})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('lentic_clockss/telegram-channel-scraper').call({ channels: ['durov'], maxResults: 10 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

Or over HTTP: `POST https://api.apify.com/v2/acts/lentic_clockss~telegram-channel-scraper/runs` with the input as the JSON body and your token in the `Authorization: Bearer` header, then `GET https://api.apify.com/v2/datasets/<datasetId>/items?format=json`.

#### Integrations

Connect the results to Google Sheets, Make, Zapier, n8n, Slack, Airtable or your own webhook from the **Integrations** tab of the Actor, or schedule regular runs with Apify Schedules.

### FAQ

#### Is it legal to scrape Telegram?

The Actor collects public data from public channels and groups. You are responsible for following Telegram's terms and the data-protection laws that apply to you. Member lists and comments contain personal data, and processing personal data requires a lawful basis. This is an unofficial tool and is not affiliated with Telegram.

#### Why did my run end as ABORTED?

A run that reaches the platform timeout, or that you stop yourself, shows as ABORTED. Rows written before that point stay in the dataset and are billed; nothing else is. Keep the default timeout of 3600 seconds for large inputs.

#### How many results can I get?

Set `maxResults` from 1 to 1000 for each channel, link or keyword. Actual delivery depends on how many public posts, members or comments exist, the charge ceiling and the free-plan limit.

#### Why are some fields empty?

Telegram does not show every field for every row. A post without media has `mediaType` set to `null`, a channel without a linked discussion group has no `linkedChatId`, and a member may hide the last-seen time. The Actor leaves these fields empty instead of guessing.

#### Why do I see `AUTH_SESSION_UNAVAILABLE`?

The `members`, `search` and `comments` modes, and `exactCounts` for posts, need an account session. When none is available, the run fails at once and no row is charged. Try again later, or use the `posts`, `profile` and `post` modes, which do not need a session.

#### Why is `views` a rounded number?

Public pages show rounded counters such as `455K`. The Actor keeps the expanded number in `views`, the original text in `viewsDisplay` and sets `viewsApprox` to `true`. Turn on `exactCounts` to get exact view numbers.

#### Does it download photos and videos?

No. Rows carry `mediaType`, `mediaCount` and the post link in `url`. Media files are not downloaded.

#### Can I look up people by phone number or send messages?

No. The Actor does not look up phone numbers and has no messaging features.

### Limitations

- Only public channels and groups are supported. Private chats, private groups and invite-only channels are not.
- `members`, `search`, `comments` and `exactCounts` depend on an account session and can be temporarily unavailable.
- Media files are not downloaded; rows carry `mediaType`, `mediaCount` and the post link.
- Without `exactCounts`, counters from public pages can be rounded.
- Phone-number lookup and messaging are not supported.
- How far back a channel can be read depends on what Telegram shows for that channel.

### Related scrapers

More social media and video scrapers from the same publisher:

- [TikTok Scraper](https://apify.com/lentic_clockss/tiktok-scraper)
- [Reddit Scraper](https://apify.com/lentic_clockss/reddit-scraper)
- [YouTube Shorts Scraper](https://apify.com/lentic_clockss/youtube-shorts-scraper)
- [YouTube Scraper](https://apify.com/lentic_clockss/youtube-research-scraper)
- [Douban Scraper](https://apify.com/lentic_clockss/douban-scraper)
- [IMDb Scraper](https://apify.com/lentic_clockss/imdb-scraper)
- [Stealth Web Scraper](https://apify.com/lentic_clockss/stealth-web-scraper)
- [Email Validator](https://apify.com/lentic_clockss/email-risk-validator)

Browse all of our scrapers at [apify.com/lentic_clockss](https://apify.com/lentic_clockss).

### Support

Found a problem or need another field? Open an issue in the **Issues** tab of this Actor's page and include the run ID and the input you used.

# Actor input Schema

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

What to collect. Only public channels and groups are supported. The three modes marked 'needs account session' can be temporarily unavailable.

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

Public channels or groups for the posts, profile and members modes. Accepts a username (durov), @durov, https://t.me/durov or t.me/s/durov. Only public channels and groups are supported.

## `postUrls` (type: `array`):

Links to single posts for the post and comments modes, such as https://t.me/durov/553.

## `searchQueries` (type: `array`):

Keywords for the search mode. Each keyword is searched across public channels and has its own row allowance.

## `exactCounts` (type: `boolean`):

Replace rounded view counts (like 455K) with exact numbers. Uses an account session for posts.

## `maxResults` (type: `integer`):

Maximum rows per channel / link / keyword (each input has its own allowance).

## Actor input object example

```json
{
  "mode": "posts",
  "channels": [
    "durov"
  ],
  "exactCounts": false,
  "maxResults": 3
}
```

# Actor output Schema

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

Dataset rows for the selected mode: channel posts, channel profiles, group members, search hits and comments.

# 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 = {
    "mode": "posts",
    "channels": [
        "durov"
    ],
    "maxResults": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("lentic_clockss/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 = {
    "mode": "posts",
    "channels": ["durov"],
    "maxResults": 3,
}

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

```

## MCP server setup

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