# Telegram Public Channel Scraper (`skillsvaults/telegram-all-in-one-scraper`) Actor

Scrape public Telegram channel messages without login, API keys or a phone number. Extract post text, dates, views, media signals and URLs. Filter by keyword, date or media, scrape multiple channels and export clean structured data.

- **URL**: https://apify.com/skillsvaults/telegram-all-in-one-scraper.md
- **Developed by:** [skills vaults](https://apify.com/skillsvaults) (community)
- **Categories:** Social media, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 public telegram messages

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 All-in-One Scraper

Scrape **messages from public Telegram channels** — no API key, no login, no phone number. 🇫🇷🇬🇧

***

### ✨ Features / Fonctionnalités

| 🇫🇷 | 🇬🇧 |
|---|---|
| 📝 Texte des messages | Message text |
| 👁️ Vues | Views count |
| 🖼️ Médias (photos, vidéos) | Media (photos, videos) |
| 📅 Dates précises | Exact timestamps |
| 🔗 Lien direct vers chaque post | Direct link to each post |
| 📚 Pagination complète | Full history pagination |
| 📅 Filtre par dates | Date range filter |
| 📦 Sortie JSON/CSV/XLSX (Apify dataset) | JSON/CSV/XLSX output (Apify dataset) |
| 🧑🤝🧑 Multi-canaux en un run | Multiple channels in one run |

**Sans clé API, sans login, sans numéro de téléphone.** *No API key, no login, no phone number.*

***

### 🚀 Usage

#### Input

```json
{
  "channels": ["durov", "startupflow", "techcrunch"],
  "maxMessages": 1000,
  "maxTotalResults": 20000,
  "startDate": "2026-01-01",
  "endDate": "",
  "keywords": ["AI", "agent"],
  "maxPages": 500,
  "delay": 1.0
}
```

#### Output (dataset)

```json
{
  "channel": "durov",
  "date": "2026-06-01T15:40:13+00:00",
  "text": "💎 TON's native currency is becoming Gram...",
  "views": "11.4M",
  "author": null,
  "photo": "https://cdn4.telegram-cdn.org/file/...",
  "video": null,
  "url": "https://t.me/durov/522"
}
```

***

### 📦 Output limits / Limites de sortie

| Preset | Messages/channel | Total/run | Pages/channel | Usage |
|---|---:|---:|---:|---|
| **Preview** | 100 | 500 | 25 | Validate a target cheaply |
| **Standard (default)** | 1,000 | 20,000 | 500 | Monitoring and normal exports |
| **Large** | 50,000 | 100,000 | 3,000 | Historical backfills |

- Up to **20 public channels per run**.
- Every customer launch is an independent Apify run.
- The global result budget prevents accidental runaway runs.
- Actual output depends on public history availability, filters, runtime and Telegram responses.
- The Actor never claims that a configured maximum is guaranteed.

### 💰 Pricing / Tarification

Pricing will be configured and verified on Apify before Store publication.
Until then, this private MVP does **not claim or trigger pay-per-event charges**.

La tarification sera configurée et vérifiée sur Apify avant publication dans le Store.
En attendant, ce MVP privé **n’annonce et ne déclenche aucun frais PPE**.

***

### 🛠️ Développement local

```bash
pip install -r requirements.txt
python proto_scraper.py durov 2        # test rapide
python -m src.main                     # mode acteur (SDK Apify)
```

### 📁 Structure

```
telegram-scraper/
├── src/
│   ├── main.py           # Actor Apify (SDK)
│   └── scraper_core.py   # logique pure (fetch + parse)
├── .actor/
│   └── input_schema.json # schéma d'entrée
├── Dockerfile
├── requirements.txt
└── README.md
```

# Actor input Schema

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

List of public Telegram channels to scrape (with or without @).

## `maxMessages` (type: `integer`):

Maximum number of matching messages to return per channel.

## `maxTotalResults` (type: `integer`):

Global safety budget across all channels. The run stops when this many results have been saved.

## `startDate` (type: `string`):

Only messages from this date onwards (inclusive). Leave empty for all.

## `endDate` (type: `string`):

Only messages up to this date (inclusive). Leave empty for all.

## `keywords` (type: `array`):

Keep only messages containing any (or all) of these keywords. Case-insensitive.

## `matchAllKeywords` (type: `boolean`):

If enabled, a message must contain every keyword.

## `mediaOnly` (type: `boolean`):

Keep only messages containing a photo or video.

## `maxPages` (type: `integer`):

Max pagination pages (each page ~20 messages).

## `delay` (type: `number`):

Politeness delay between page fetches.

## Actor input object example

```json
{
  "channels": [
    "durov"
  ],
  "maxMessages": 1000,
  "maxTotalResults": 20000,
  "keywords": [],
  "matchAllKeywords": false,
  "mediaOnly": false,
  "maxPages": 500,
  "delay": 1
}
```

# Actor output Schema

## `telegramMessages` (type: `string`):

The complete dataset of unique public Telegram messages extracted during this run, including channel, date, text, views, media signals and post URL.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("skillsvaults/telegram-all-in-one-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("skillsvaults/telegram-all-in-one-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 '{}' |
apify call skillsvaults/telegram-all-in-one-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,skillsvaults/telegram-all-in-one-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/HEnvembyTPP0jUYyD/builds/OLLdN1g1X5e8GgiQt/openapi.json
