# Telegram Ultimate Scraper (`khnaami/actor-telegram-scraper`) Actor

Extract public Telegram channel messages, view counts, detailed reaction breakdowns, media downloads, and discover niche channels by keyword with zero login or bot required.

- **URL**: https://apify.com/khnaami/actor-telegram-scraper.md
- **Developed by:** [khalid naami](https://apify.com/khnaami) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Ultimate Scraper & Channel Finder (Channels, Posts, Media, Views & Reactions)

Comprehensive, login-free Telegram data extraction and channel discovery engine on Apify. Extract **Public Channels** (subscriber counts, descriptions, verified badges), **Posts & Messages** (full text, timestamps, views count, reactions breakdown, forwards count), **Media Files** (photos, videos), and **Channel Finder by Keyword** without needing a Telegram login or phone number.

***

### ⚡ Key Features

- 📢 **Zero Login Required**: Scrapes public Telegram channels and post histories via public web gateways without requiring a Telegram phone number or account session.
- 💬 **Complete Post & Message Data**: Extract full message content (with formatted line breaks and links), message ID, publication timestamp, views count, and forward counts.
- ❤️ **Reactions Breakdown**: Extracts all emoji reactions and their individual counts (`👍`, `🔥`, `❤️`, `🎉`, etc.).
- 🖼️ **Media Attachments**: Direct CDN links to high-resolution photos, video files, audio clips, and documents.
- 👥 **Channel Intelligence**: Extract subscriber counts, channel bios, avatar URLs, and official verified badges.
- 🔍 **Automated Channel Finder**: Search and discover public Telegram channels by keyword, niche, or topic (e.g., *crypto trading signals*, *artificial intelligence*, *dropshipping deals*).
- 📧 **Direct Lead Generation**: Automatically extracts business contact emails, phone numbers, and external websites found in channel bios or messages.
- 🛡️ **Dual-Engine Architecture**: Blazing fast HTTP requests via `got-scraping` paired with an intelligent Playwright browser fallback.

***

### 📥 Input Configuration

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `mode` | String | `AUTO_DETECT` | Extraction mode: `AUTO_DETECT`, `CHANNELS`, `POSTS`, `CHANNEL_FINDER`. |
| `targetUrls` | Array | `[...]` | Public Telegram channel links (e.g., `https://t.me/s/durov`, `https://t.me/telegram`). |
| `searchKeywords` | Array | `[]` | Keywords to discover public Telegram channels across the web. |
| `maxPosts` | Integer | `50` | Maximum messages to extract per channel. |
| `maxItems` | Integer | `30` | Maximum channels or discovery items to process. |
| `proxyConfiguration` | Object | `{ useApifyProxy: true }` | Apify Residential proxy configuration (recommended). |

***

### 📤 Output Data Format

#### 1. Telegram Channel Record

```json
{
  "type": "CHANNEL",
  "id": "durov",
  "url": "https://t.me/durov",
  "previewUrl": "https://t.me/s/durov",
  "channelName": "Pavel Durov",
  "channelUsername": "@durov",
  "channelDescription": "Thoughts from the founder of Telegram.",
  "subscribersCount": "2.8M subscribers",
  "subscribersCountRaw": 2800000,
  "avatarUrl": "https://cdn4.cdn-telegram.org/...",
  "isVerified": true,
  "scrapedAt": "2026-10-09T13:10:00.000Z"
}
```

#### 2. Telegram Post Record with Reactions

```json
{
  "type": "POST",
  "id": "durov_342",
  "messageId": 342,
  "url": "https://t.me/durov/342",
  "channelUsername": "@durov",
  "text": "Telegram reached 950 million active users this month. We are on track to pass 1 billion soon.",
  "viewsCount": "1.4M",
  "viewsCountRaw": 1400000,
  "reactions": [
    { "emoji": "🔥", "count": 18200 },
    { "emoji": "👍", "count": 24500 },
    { "emoji": "🎉", "count": 12100 }
  ],
  "mediaType": "photo",
  "photoUrl": "https://cdn4.cdn-telegram.org/...",
  "date": "2026-10-08T15:20:00+00:00",
  "scrapedAt": "2026-10-09T13:10:00.000Z"
}
```

***

### 💼 Business & Lead Generation Use Cases

- **Crypto & Web3 Community Monitoring**: Monitor public announcements, trading signals, and token updates in real time.
- **Niche Channel Prospecting**: Discover high-engagement channels in your sector for sponsorship, partnerships, or PR.
- **Competitor Tracking**: Track follower growth, posting frequency, and average post view counts across competitor channels.

***

### 📄 License

Apache-2.0

# Actor input Schema

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

Select Telegram data extraction mode, or use AUTO_DETECT.

## `targetUrls` (type: `array`):

List of public Telegram channel links (e.g., https://t.me/s/durov or https://t.me/telegram).

## `searchKeywords` (type: `array`):

Keywords to discover public Telegram channels across the web.

## `maxPosts` (type: `integer`):

Maximum number of messages to extract per channel.

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

Maximum number of channels or discovery items to process.

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

Select Apify Proxy (RESIDENTIAL recommended for fast unthrottled access).

## Actor input object example

```json
{
  "mode": "AUTO_DETECT",
  "targetUrls": [
    "https://t.me/s/durov",
    "https://t.me/s/telegram"
  ],
  "searchKeywords": [
    "artificial intelligence community",
    "crypto trading signals"
  ],
  "maxPosts": 50,
  "maxItems": 30,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Scraped Telegram records (Channels, Posts, Media, Reactions, Leads)

## `overview` (type: `string`):

High-level summary report and execution metrics stored in Key-Value store

# 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 = {
    "targetUrls": [
        "https://t.me/s/durov",
        "https://t.me/s/telegram"
    ],
    "searchKeywords": [
        "artificial intelligence community",
        "crypto trading signals"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("khnaami/actor-telegram-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 = {
    "targetUrls": [
        "https://t.me/s/durov",
        "https://t.me/s/telegram",
    ],
    "searchKeywords": [
        "artificial intelligence community",
        "crypto trading signals",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("khnaami/actor-telegram-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 '{
  "targetUrls": [
    "https://t.me/s/durov",
    "https://t.me/s/telegram"
  ],
  "searchKeywords": [
    "artificial intelligence community",
    "crypto trading signals"
  ]
}' |
apify call khnaami/actor-telegram-scraper --silent --output-dataset

```

## MCP server setup

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