# Telegram Channel Scraper | Messages, Media & Metadata (`muzafferkadir/telegram-channel-scraper`) Actor

Scrape public Telegram channels — messages, views, media URLs, forwards, replies, link previews and channel metadata. No login or API key. MCP-ready.

- **URL**: https://apify.com/muzafferkadir/telegram-channel-scraper.md
- **Developed by:** [Muzaffer Kadir YILMAZ](https://apify.com/muzafferkadir) (community)
- **Categories:** Social media, Automation, Lead generation
- **Features:** Limited permissions
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.99 / 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.

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

Scrapes public Telegram channels and extracts structured message, media, link, and channel metadata.

### Features

- Scrape public channel messages without a Telegram account
- Limit results by channel, post count, and date range
- Collect message text, dates, views, authors, links, and media URLs
- Extract link previews, polls, forwards, replies, and channel metadata
- Return clean JSON records ready for monitoring, research, and archiving

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `channels` | array | - | Channel usernames, handles, or `t.me` links |
| `maxPosts` | number | `100` | Maximum messages per channel |
| `oldestPostDate` | string | - | Keep messages on or after this ISO date |
| `newestPostDate` | string | - | Keep messages on or before this ISO date |
| `skipServiceMessages` | boolean | `true` | Exclude service messages |

### Example

```json
{
  "channels": ["telegram", "https://t.me/durov"],
  "maxPosts": 100,
  "oldestPostDate": "2026-01-01",
  "skipServiceMessages": true
}
```

### Output

Each dataset item contains one message:

- Message ID, channel, message URL, type, text, and publish date
- Views as displayed and parsed view count
- Author signature, outbound links, and media URLs
- Link preview, poll, forward, and reply data
- Channel title, description, subscriber count, and avatar
- Scrape timestamp

### Pricing

This Actor is billed through the Apify platform: you pay for the platform compute a run uses (roughly proportional to the number of channels and messages collected), plus any per-result charge shown on the Actor's Store page. Scraping a channel of a few hundred messages costs a fraction of a compute unit.

### Disclaimer

This is an **unofficial** Actor. It is not affiliated with, endorsed by, or sponsored by Telegram. All product names, logos, and trademarks are the property of their respective owners and are used here for identification purposes only.

The Actor collects only publicly available information. It does not log in, create accounts, bypass paywalls, or access anything that is not visible to an ordinary visitor.

Output may include information relating to identifiable people. You are the data controller for anything you collect with this Actor and are responsible for having a lawful basis to process it under applicable data-protection law (such as GDPR or KVKK), and for complying with the source website's terms.

# Actor input Schema

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

Telegram channels to scrape. Accepts bare usernames (telegram), @handles (@telegram) or full links (https://t.me/telegram).

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

Maximum number of messages to collect per channel, counting from the most recent. Pagination walks backwards until this count or the date floor is reached.

## `oldestPostDate` (type: `string`):

Only keep messages published on or after this date (ISO 8601, e.g. 2026-01-31). Leave empty for no lower bound.

## `newestPostDate` (type: `string`):

Only keep messages published on or before this date (ISO 8601). Leave empty to start from the latest message.

## `skipServiceMessages` (type: `boolean`):

Drop service/system messages (pinned, joins, channel photo changes) that carry no real content.

## Actor input object example

```json
{
  "channels": [
    "telegram",
    "https://t.me/durov"
  ],
  "maxPosts": 100,
  "skipServiceMessages": true
}
```

# Actor output Schema

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

All records produced by the selected mode.

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

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

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

```

## MCP server setup

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