# Telegram Channel Scraper: Posts, Messages & Keyword Search (`mastertools/telegram-scraper`) Actor

Scrape posts from public Telegram channels with no login, phone number or API key: text, date, exact views, reactions, photos and videos, forwards, links and hashtags. Search by keyword, jump to any date, get only new posts. Flat rows for spreadsheets and AI agents.

- **URL**: https://apify.com/mastertools/telegram-scraper.md
- **Developed by:** [Master Tools](https://apify.com/mastertools) (community)
- **Categories:** Social media, News, AI
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 posts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

**Every post of any public Telegram channel in one clean row: text, date, views, reactions, media and links.**

Scrape posts and messages from public Telegram channels with no login, no phone number, no API key and no bot token. Add channels, press Start and get one flat row per post: full text, exact date, views, every reaction with its count, photos and videos, forwards, link previews, hashtags and the channel's exact subscriber count. Search channels by keyword, jump to any date in their history or follow them with "only new posts". Twenty channels with hundreds of posts each arrive in under a minute.

### What you get

- **Many channels in one run** — a username, `@name`, a `t.me` link or a link to one post. Channels are read in parallel, so thousands of posts come back in about a minute.
- **The numbers marketers ask for** — views, every reaction with its count, the total, Telegram Stars and the channel's exact subscriber count in every row. Compare channels and posts right away.
- **Keyword search inside channels** — brand names, tickers, topics or an exact phrase in quotes. Telegram's own search finds the newest matches, then the scraper reads further back and checks every post itself, so each row really contains your words.
- **Any period, fast** — "posted after" and "posted before" take a date or a period like `7 days`. The scraper jumps straight to the date, so a quarter from three years ago is as quick as yesterday.
- **Only new posts, with no bookkeeping** — switch on "only new posts" and schedule the run: each run picks up exactly where the previous one stopped, channel by channel.
- **All the media** — every photo of an album, video files with cover and length, GIFs, voice messages, documents with file names, polls with their answers and link previews with title and image.
- **Context with every post** — forwarded from which channel (with a link), reply to which post, author signature, edited mark, hashtags, cashtags like `$BTC`, mentions, all links and the post's buttons.
- **Every line answered** — a private chat, a group, a deleted post or a misspelled name comes back as a short row with the reason, and the run log says why a channel gave fewer posts than you asked.
- **Light and quick** — plain HTTP requests instead of a browser: the example input finishes in seconds.

### How to use

1. Press **Start** — the example channels work as is.
2. Put your own channels in place of the example. Add keywords or dates if you need them.
3. Download the results as JSON, CSV, Excel or HTML, send them to Google Sheets, or take them through the API.

### Input

| Field | What it does | Example |
|---|---|---|
| `channels` | Public channels, one per line: username, `@username`, `https://t.me/username`, `https://t.me/s/username`. A post link gives exactly that post with fresh views and reactions. | `durov`, `https://t.me/telegram` |
| `searchQueries` | Keywords. Each line is a separate search; all words of a line must be in the post. Put a phrase in quotes for an exact match. | `wallet`, `"stars giveaway"` |
| `maxPostsPerChannel` | Posts per channel, newest first (with keywords — per keyword). | `100` |
| `postedAfter` | Only posts newer than a date or a period. | `2026-11-01`, `7 days` |
| `postedBefore` | Only posts older than a date. Together with `postedAfter` it is a date range. | `2024-01-01` |
| `onlyNew` | Each run returns only posts published since the previous run of the same channels and keywords. | `true` |
| `proxyConfiguration` | Not needed — channel pages are public. Use Apify Proxy only to see a channel as people in another country see it. | `{"useApifyProxy": true}` |

```json
{
  "channels": ["durov", "telegram", "https://t.me/cointelegraph"],
  "searchQueries": ["bitcoin", "\"spot ETF\""],
  "maxPostsPerChannel": 50,
  "postedAfter": "30 days"
}
```

### Output

One row per post. Example (the media link is shortened, a few empty fields are left out):

```json
{
  "channel": "cointelegraph",
  "channelTitle": "Cointelegraph",
  "channelSubscribers": 325595,
  "postId": 73128,
  "url": "https://t.me/cointelegraph/73128",
  "date": "2026-11-09T05:51:39.000Z",
  "text": "🔥 BIG: US M2 money supply rose $113 billion in August to a record $23.41 trillion.\n\nNews | Markets | YouTube",
  "views": 7090,
  "reactionsTotal": 71,
  "reactions": [
    { "emoji": "🔥", "customEmojiId": null, "count": 26 },
    { "emoji": "❤", "customEmojiId": null, "count": 18 },
    { "emoji": "🤡", "customEmojiId": null, "count": 13 }
  ],
  "paidStars": null,
  "mediaType": "photo",
  "mediaCount": 1,
  "mediaUrls": ["https://cdn5.telesco.pe/file/kklkxj6-nu7CMUo5oH20VeSM….jpg"],
  "imageUrl": "https://cdn5.telesco.pe/file/kklkxj6-nu7CMUo5oH20VeSM….jpg",
  "videoDuration": null,
  "fileName": null,
  "linkPreviewUrl": null,
  "linkPreviewTitle": null,
  "pollQuestion": null,
  "pollOptions": [],
  "links": ["http://www.ct.com/", "https://ct.com/category/markets", "https://www.youtube.com/@cointelegraph"],
  "hashtags": [],
  "cashtags": [],
  "mentions": [],
  "isForwarded": false,
  "forwardedFrom": null,
  "forwardedFromUrl": null,
  "replyToPostId": null,
  "author": null,
  "isEdited": false,
  "buttons": [],
  "searchQuery": null,
  "scrapedAt": "2026-11-09T18:32:14.536Z"
}
```

- `views` — as Telegram counts them, as a whole number (`1.67M` becomes `1670000`). `channelSubscribers` is the exact count.
- `reactions` — each reaction with its count; custom emoji come with `customEmojiId`. `paidStars` — Telegram Stars sent as paid reactions.
- `mediaType` — `text`, `photo`, `video`, `album`, `gif`, `round_video`, `voice`, `audio`, `document`, `sticker`, `poll` or `location`. `mediaUrls` holds every file of an album; `imageUrl` — the photo or the video cover, ready for a table with thumbnails.
- `searchQuery` — the keyword that found the post.

A line that gives no posts comes back like this:

```json
{
  "channel": "examplechat",
  "input": "https://t.me/examplechat",
  "url": null,
  "error": "This is a group chat, not a channel. Telegram shows messages without login only for public channels."
}
```

The **Posts** view in the Output tab shows the main fields; the **Media** view shows posts with their pictures.

### Monitor channels and keywords

Switch on `onlyNew`, add your channels and keywords and set a schedule — every hour or every day. Each run brings only the posts published since the previous run, so a webhook, Google Sheets, Slack or your CRM gets each new post once. Typical jobs: brand and product mentions, crypto and market signals, news tracking, competitor channels, OSINT and research.

### Use it with AI agents

Add the Actor as a tool in Claude, ChatGPT, Cursor, n8n or any MCP client through the Apify MCP server (`mcp.apify.com`). One field is enough — `channels` — and the answer comes back as compact JSON in seconds.

#### Instant API for agents (Standby)

The Actor also runs as an always-ready web API: no run to start, no dataset to read — one request, one JSON answer.

```
GET https://mastertools--telegram-scraper.apify.actor/?channel=durov&maxPosts=10
Authorization: Bearer <YOUR_APIFY_TOKEN>
```

Repeat `channel=` for several channels, add `search=` for keywords, `postedAfter=7 days` or `postedBefore=2026-01-01`, or pass a post link as `url=`. You can also POST the same JSON as the Actor input. Empty fields are left out of the answer to save tokens.

### Integrations

Google Sheets, Make, Zapier, n8n, Slack, Airbyte, webhooks and the Apify API — the results are flat rows, so they go straight into a table, a database or a BI tool.

### FAQ

**Do I need a Telegram account, phone number or API key?** No. Add channels and press Start.

**Which channels can I scrape?** Any public channel: if `https://t.me/s/<username>` opens in a browser without signing in, the scraper reads it.

**How far back can I go?** The whole public history of the channel. Set `maxPostsPerChannel` high, or use `postedAfter` and `postedBefore` to take one period.

**How do I search for a keyword?** Add it to `searchQueries` together with the channels to search in. Each line is one search; `"exact phrase"` in quotes matches the phrase as is. `searchQuery` in each row shows which keyword found the post.

**How fresh is the data?** Every run reads Telegram live: views and reactions are the numbers at that moment. Paste post links to refresh the numbers of posts you already have.

**Can I get only new posts every day?** Yes. Switch on `onlyNew` and schedule the Actor: each run continues from the newest post the previous run saw.

**What about photos and videos?** Every row has direct links to the files: all photos of an album, videos with cover and length, GIFs, voice messages and documents.

**Why did a channel give fewer posts than I asked?** The run log tells you for each channel: the history ended, the date range ended, no more new posts since the last run, or no more posts with your keywords.

### Need data at scale?

Daily monitoring of thousands of channels and keywords, full channel archives, a pipeline into your CRM, data warehouse or BI tool, or a custom scraper for another messenger or social network — we build it for you.

# Actor input Schema

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

Public channels, one per line: a username (durov), @durov or a link (https://t.me/durov, https://t.me/s/durov). A post link like https://t.me/durov/553 gives exactly that post with its fresh views and reactions.

## `searchQueries` (type: `array`):

Optional. Only posts that mention these words — brand names, tickers, topics. Each line is a separate search; all words of a line must be in the post. Put a phrase in quotes for an exact match.

## `maxPostsPerChannel` (type: `integer`):

How many posts to take from each channel, newest first (with keywords — per keyword).

## `postedAfter` (type: `string`):

Optional. Only posts newer than this: a date like 2026-11-01 or a period like 7 days.

## `postedBefore` (type: `string`):

Optional. Only posts older than this date — the scraper jumps straight to it, so old periods are fast too.

## `onlyNew` (type: `boolean`):

For schedules and monitoring: each run returns only posts published after the previous run of the same channels and keywords.

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

Not needed: Telegram channel pages are public. Use Apify Proxy only to see a channel from another country.

## Actor input object example

```json
{
  "channels": [
    "durov",
    "telegram"
  ],
  "searchQueries": [],
  "maxPostsPerChannel": 10,
  "onlyNew": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All rows of this run in the default dataset.

# 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",
        "telegram"
    ],
    "searchQueries": [],
    "maxPostsPerChannel": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mastertools/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",
        "telegram",
    ],
    "searchQueries": [],
    "maxPostsPerChannel": 10,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("mastertools/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",
    "telegram"
  ],
  "searchQueries": [],
  "maxPostsPerChannel": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call mastertools/telegram-scraper --silent --output-dataset

```

## MCP server setup

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