# Telegram Scraper — Channel Messages & Media (`cryptosignals/telegram-channel-scraper`) Actor

Extract messages and media from public Telegram channels. Get message text, author, timestamp, views, forwards, and media URLs. Ideal for OSINT, crypto monitoring, and content research. PPE pricing — pay only for results.

- **URL**: https://apify.com/cryptosignals/telegram-channel-scraper.md
- **Developed by:** [Web Data Labs](https://apify.com/cryptosignals) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 14 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 result 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/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

Scrape public Telegram channels — messages, media metadata, view counts, and forwarding stats. No Telegram API key or account login required. Works with any public channel via its `t.me` URL.

Useful for **media monitoring**, **crypto/finance signal tracking**, **news aggregation**, and **audience research**.

### What data do you get?

Each message record includes:

| Field | Type | Description |
|-------|------|-------------|
| `message_id` | integer | Unique message ID within the channel |
| `channel` | string | Channel username |
| `date` | string | ISO 8601 timestamp |
| `text` | string | Full message text |
| `views` | integer | View count |
| `forwards` | integer | Number of times forwarded |
| `url` | string | Direct link to the message |
| `has_photo` | boolean | Whether the message contains a photo (when `includeMedia` is on) |
| `has_video` | boolean | Whether the message contains a video |
| `has_document` | boolean | Whether the message has an attached document |
| `photo_url` | string | Direct URL to the photo (when available) |

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `channelUsername` | string | Yes | `telegram` | Channel username without `@`. Also accepts full `t.me` URLs. |
| `maxMessages` | integer | No | `5` | Maximum messages to scrape (1–10,000) |
| `dateFrom` | string | No | — | Only include messages after this date (ISO format, e.g. `2026-01-01`) |
| `dateTo` | string | No | — | Only include messages before this date |
| `includeMedia` | boolean | No | `false` | Extract media metadata (photo/video/document flags and URLs) |

### Example input

```json
{
    "channelUsername": "durov",
    "maxMessages": 50,
    "includeMedia": true
}
```

### Example output

```json
{
    "message_id": 1247,
    "channel": "durov",
    "date": "2026-03-28T10:15:00+00:00",
    "text": "Today we launched the new privacy features that let you control exactly who can see your online status...",
    "views": 182400,
    "forwards": 3210,
    "url": "https://t.me/durov/1247",
    "has_photo": true,
    "photo_url": "https://cdn4.telegram-cdn.org/file/abc123.jpg"
}
```

### Using the Apify API

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("cryptosignals/telegram-channel-scraper").call(run_input={
    "channelUsername": "durov",
    "maxMessages": 100,
    "includeMedia": True,
})

for msg in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"[{msg['date']}] {msg['text'][:80]}... ({msg['views']} views)")
```

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('cryptosignals/telegram-channel-scraper').call({
    channelUsername: 'durov',
    maxMessages: 100,
    includeMedia: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(msg => console.log(`${msg.date}: ${msg.text.slice(0, 80)}...`));
```

### Tips

- **Public channels only** — private channels and groups are not accessible without authentication
- **Channel username formats** — you can use `durov`, `@durov`, or `https://t.me/durov` — all work
- **Date filtering** — combine `dateFrom` and `dateTo` to scrape a specific time range without pulling the entire history
- **Media URLs** — photo URLs from Telegram CDN may expire. Download them promptly if you need to archive media.

### Proxies and rate limits

Telegram's web preview endpoint (`t.me/s/`) applies per-IP rate limits after sustained scraping, returning 429 errors or temporary bans. Residential proxies rotate through real ISP addresses and stay under per-IP thresholds.

[ThorData](https://thordata.partnerstack.com/partner/0a0x4nzh) offers 200M+ residential IPs across 190+ countries — reliable for scraping Telegram channels at scale without hitting rate limits.

Set proxy configuration in your input:

```json
{
    "proxyConfiguration": {
        "useApifyProxy": true
    }
}
```

### Related scrapers

- [Reddit Scraper](https://apify.com/cryptosignals/reddit-scraper) — Posts, comments and community data
- [Bluesky Scraper](https://apify.com/cryptosignals/bluesky-scraper) — Social posts and profiles
- [Substack Scraper](https://apify.com/cryptosignals/substack-scraper) — Newsletter content and authors
- [Hacker News Scraper](https://apify.com/cryptosignals/hackernews-scraper) — Tech stories and discussions

***

Built by [cryptosignals](https://apify.com/cryptosignals)

***

*Found this actor useful? [Leave a review](https://apify.com/cryptosignals/telegram-channel-scraper#reviews) - it helps a lot. Something broken? Report it on the [Issues tab](https://apify.com/cryptosignals/telegram-channel-scraper/issues).*

# Actor input Schema

## `channelUsername` (type: `string`):

Telegram channel username without @

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

Maximum number of messages to scrape

## `dateFrom` (type: `string`):

Only include messages after this date (ISO format)

## `dateTo` (type: `string`):

Only include messages before this date (ISO format)

## `includeMedia` (type: `boolean`):

Extract media metadata

## Actor input object example

```json
{
  "channelUsername": "durov",
  "maxMessages": 5,
  "dateFrom": "",
  "dateTo": "",
  "includeMedia": false
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {
    "channelUsername": "durov",
    "maxMessages": 5,
    "dateFrom": "",
    "dateTo": "",
    "includeMedia": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("cryptosignals/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 = {
    "channelUsername": "durov",
    "maxMessages": 5,
    "dateFrom": "",
    "dateTo": "",
    "includeMedia": False,
}

# Run the Actor and wait for it to finish
run = client.actor("cryptosignals/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 '{
  "channelUsername": "durov",
  "maxMessages": 5,
  "dateFrom": "",
  "dateTo": "",
  "includeMedia": false
}' |
apify call cryptosignals/telegram-channel-scraper --silent --output-dataset

```

## MCP server setup

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