# Telegram Scraper - Channel Messages, Search & Stats (`aolmo/telegram-scraper`) Actor

All-in-one scraper for public Telegram channels without an account: latest messages or keyword search inside each channel, with text, date, views, reactions, links, media, forwards and the channel title, description and subscribers. New-message alerts on scheduled runs. $0.001 per message.

- **URL**: https://apify.com/aolmo/telegram-scraper.md
- **Developed by:** [Antonio del Olmo Tena](https://apify.com/aolmo) (community)
- **Categories:** Social media, News
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 message 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

Scrape public Telegram channels without a Telegram account, phone number, API ID or bot token. Give the Actor a list of channels and it returns their latest messages; add keywords and it searches inside each channel with Telegram's own channel search. One row per message with the text, date, views, reactions, links, photos, video and document flags, forwards and link previews, plus the channel title, description and subscriber count. Schedule it and the Actor flags the messages that are new since the previous run: news and crypto monitoring, brand mentions, OSINT, competitor tracking and feeds for AI agents.

The Actor reads the public web preview of each channel (`t.me/s/<channel>`), the same page anyone can open in a browser. You pay $0.001 per message returned; channels without messages or without matches are free.

### What you get

One row per message:

- **Channel**: `channel`, `channelUrl`, `channelTitle`, `channelDescription`, `subscribers`, `channelPhoto`.
- **Message**: `id`, `url`, `date`, `text`, `views`, `viewsText`, `author` (signature on channels that sign posts), `forwardedFrom`, `edited`.
- **Engagement**: `reactions` (emoji and count) and `reactionsTotal`.
- **Media and links**: `photos`, `hasVideo`, `hasDocument`, `links`, `linkPreview` (URL, site, title and description).
- **Search**: `keyword` (the keyword searched, null for latest messages), `messagesFound`, `position`.
- **Monitoring**: `isNew`, true when the message is newer than the newest one of the previous run.

A channel with no messages for a keyword returns a single row with `messagesFound: 0` and is not charged.

### How to use it

1. Open the **Input** tab.
2. Add **Channels**, one per line: `durov`, `@telegram` or `https://t.me/telegram`. Public channels with a web preview only.
3. Optional: add **Keywords**. Each channel is then searched for every keyword instead of returning its latest messages.
4. Set **Max messages per channel** and, if you want, **Only messages from the last N days**.
5. Click **Start** and export the rows as JSON, CSV or Excel, or call the Actor from the API.
6. Schedule it (for example every 15 minutes) to receive only the new messages.

### Input

```json
{
  "channels": ["durov", "https://t.me/telegram"],
  "keywords": [],
  "maxMessages": 50,
  "maxAgeDays": 0
}
```

| Field | Description |
|-------|-------------|
| `channels` | Channel usernames, `@usernames` or t.me links. Public channels only. |
| `keywords` | Optional. With keywords, each channel is searched for every keyword. |
| `maxMessages` | Maximum messages per channel and keyword (1-2,000, default 50). Newest first. |
| `maxAgeDays` | Only messages from the last N days (0 = no limit). |

### Output example

```json
{
  "channel": "durov",
  "channelUrl": "https://t.me/durov",
  "channelTitle": "Pavel Durov",
  "subscribers": 11400000,
  "keyword": null,
  "messagesFound": 50,
  "position": 1,
  "id": 412,
  "url": "https://t.me/durov/412",
  "date": "2026-11-18T09:14:02+00:00",
  "text": "We are rolling out a new update today...",
  "views": 3200000,
  "reactions": [{ "emoji": "🔥", "count": 41200 }],
  "reactionsTotal": 98500,
  "photos": [],
  "hasVideo": false,
  "links": ["https://telegram.org/blog"],
  "forwardedFrom": null,
  "isNew": false
}
```

### Pricing

Pay per event, no subscription:

- **Message scraped**: $0.001 per message returned.
- **New message**: $0.001 per message newer than the newest one of the previous run (scheduled runs only).

1,000 messages cost $1. Channels that cannot be read, or that have no matches for a keyword, are free.

### Tips

- Use **Keywords** with a list of channels in your niche to build a mention feed for a brand, a ticker or a person.
- `maxAgeDays` keeps scheduled runs cheap: with `1`, only the last day of each channel is read.
- Need to discover channels first? The **Telegram Keyword Search** Actor finds public channels that talk about a keyword.

### Limitations

- Only public channels with a web preview work. Private channels, groups and channels that disabled the preview are not accessible without an account.
- Member lists, comments and phone numbers are not available: the Actor returns what the public channel page shows.
- Views are the public counters; very large numbers come rounded by Telegram (`viewsText` keeps the original text).

# Actor input Schema

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

One per line: channel username (durov), @username or link (https://t.me/telegram). Public channels only.

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

Leave empty for the latest messages. With keywords, each channel is searched for every keyword using Telegram's own channel search.

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

Newest first. Also caps what you pay per channel.

## `maxAgeDays` (type: `integer`):

0 = no age limit.

## `product` (type: `string`):

Internal. Leave as is.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "https://t.me/telegram"
  ],
  "keywords": [],
  "maxMessages": 50,
  "maxAgeDays": 0,
  "product": "telegram-scraper"
}
```

# Actor output Schema

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

Dataset items: url, changed, events, data, timestamp and error (when the target failed).

# 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": [
        "durov",
        "https://t.me/telegram"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("aolmo/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 = { "channels": [
        "durov",
        "https://t.me/telegram",
    ] }

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

```

## MCP server setup

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