# Telegram Channel Scraper - Keyword Search & New Posts (`imakul/telegram-channel-scraper`) Actor

Reads posts from public Telegram channels without login or API keys. Search keywords inside the channels you choose, or collect only posts that are new since your last run.

- **URL**: https://apify.com/imakul/telegram-channel-scraper.md
- **Developed by:** [Imakul Denny](https://apify.com/imakul) (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 $0.75 / 1,000 posts

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

Read posts from public Telegram channels without a Telegram account, API keys or a login. Search for keywords inside the channels you choose, or schedule it to collect only posts that are new since your last run.

### What it does

- **Read channels:** give it usernames or links and get posts newest first.
- **Search inside channels:** uses Telegram's own channel search, so results are not limited to pages indexed by a search engine. You choose which channels are searched.
- **Collect only new posts:** remembers the last post delivered for each channel and keyword. If a run stops early, the next run continues from the same place without skipping or repeating posts.
- **Filter by date:** use a date such as `2026-10-01` or a period such as `7 days`.

### Input example

```json
{
  "channels": ["durov", "https://t.me/telegram"],
  "keywords": ["update"],
  "maxPostsPerChannel": 50,
  "onlyNewPosts": true
}
```

### Output example

```json
{
  "postId": 552,
  "url": "https://t.me/durov/552",
  "channel": "durov",
  "channelTitle": "Pavel Durov",
  "channelSubscribers": 10100000,
  "channelVerified": true,
  "date": "2026-10-11T14:52:40+00:00",
  "edited": false,
  "author": "Pavel Durov",
  "text": "Post text with line breaks kept",
  "links": ["https://example.com"],
  "hashtags": ["#example"],
  "mentions": ["@example"],
  "viewsText": "2.01M",
  "views": 2010000,
  "reactions": [{ "emoji": null, "emojiId": "5265077361648368841", "paid": false, "count": 54700, "countText": "54.7K" }],
  "media": [{ "type": "photo", "url": "https://cdn4.telesco.pe/file/..." }],
  "forwarded": false,
  "forwardedFrom": null,
  "replyTo": null,
  "linkPreview": null,
  "matchedKeyword": "update",
  "scrapedAt": "2026-11-05T17:30:04+00:00"
}
```

### Good to know

- **Public channels only.** Private channels, groups and invite links cannot be read. Some public channels turn off their web preview; these are listed in the run status and in the `RUN_REPORT` record, and nothing is charged for them.
- **Keyword search matches related word forms.** Searching `listing` can return posts that only say `list`. Turn on **Only exact keyword matches** to keep exact matches. Posts removed by this filter are not charged.
- **One keyword per result.** A post that matches two keywords is delivered once, with the first matching keyword.
- **Counts are rounded by Telegram.** Views, reactions and subscribers above 999 are approximate. `viewsText` shows the original value.
- **Media links expire.** Download any files you need soon after the run.
- **Some videos have no file link.** Telegram's web preview does not offer a file for every video, so `url` can be `null`. The thumbnail and duration are still returned.
- **Some media cannot be shown on the web preview.** These posts have `unsupportedMedia: true`, and their content is not available here.
- **Channel history can have gaps.** Channel owners can delete posts, and only posts Telegram shows on the web preview are returned.
- **Polls show percentages.** Each option has its text and percentage, not vote counts.
- **Not included:** comments are not available on the web preview.

### Monitoring on a schedule

Turn on **Only new posts** and create an Apify schedule. The first run delivers the newest posts up to your limit, and later runs deliver only newer posts, oldest first. Use a different **Memory name** for each separate monitoring task.

### Responsible use

Use this tool for public content only, and follow Telegram's terms and the laws that apply to you, including privacy law where posts contain personal data.

# Actor input Schema

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

Public channels to read. Use a username (durov), @durov, or a link (https://t.me/durov). Private invite links cannot be read.

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

Optional. Search these words inside each channel using Telegram's own channel search. Telegram also matches related word forms, so 'listing' can return posts that only say 'list'. Leave empty to read all posts.

## `exactKeywordMatch` (type: `boolean`):

Keep only posts whose text contains the keyword exactly (ignoring case). Posts removed by this filter are not delivered or charged.

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

Stop reading a channel after delivering this many posts. If you set keywords, the limit applies to each keyword in each channel. With 'Only new posts', anything above the limit is delivered on the next run.

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

Optional. A date such as 2026-10-01, or a period such as 7 days or 2 weeks. Older posts are not read.

## `onlyNewPosts` (type: `boolean`):

Remember the last post delivered for each channel and keyword, and deliver only newer posts on later runs. Useful for scheduled monitoring. The first run delivers the newest posts up to your limit.

## `stateName` (type: `string`):

Name of the key-value store in your account that holds the remembered positions. Use a different name for each separate monitoring task.

## `maxConcurrency` (type: `integer`):

How many channels to read in parallel.

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

Usually not needed. Connecting directly was much faster than a datacenter proxy in our tests. Turn this on only if you see repeated failures.

## Actor input object example

```json
{
  "channels": [
    "durov"
  ],
  "exactKeywordMatch": false,
  "maxPostsPerChannel": 20,
  "onlyNewPosts": false,
  "stateName": "telegram-channel-positions",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `posts` (type: `string`):

No description

## `report` (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 = {
    "channels": [
        "durov"
    ],
    "maxPostsPerChannel": 20
};

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

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

```

## MCP server setup

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