# Telegram Search & Channel Scraper — Keywords, Posts, No Login (`sherwood/telegram-keyword-search-scraper`) Actor

Public Telegram posts by keyword across all of Telegram, or the full history of public channels. Text, date, views, reactions, media, channel stats. Same input and output fields as the leading Telegram keyword scraper. No account, no API key. $0.25 per 1,000 messages.

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

## Pricing

from $0.36 / 1,000 telegram messages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Search & Channel Scraper — Keywords, Posts, No Login

Returns public Telegram posts (text, date, views, reactions, photo or video link, channel name, numeric ID and subscriber count) found by **keyword across all of Telegram**, or the **message history of public channels**, at **$0.60 per 1,000 messages on the free plan, from $0.36 on paid plans**, plus **$0.01 per keyword searched across Telegram**. No start fee, and nothing is charged for errors or empty searches. No Telegram account, phone number, bot token or API key.

Every post returned for a keyword contains every word of that keyword: Telegram's own search also returns loose matches, and the Actor drops them (measured: 125 loose hits dropped on 3 keywords). Results are the newest posts first, merged across all the channels found.

**Drop-in for `lofomachines/telegram-keyword-search-scraper`**: same input names (`mode`, `keywords`, `channels`, `maxResultsPerKeyword`, `channelMaxMessages`, `afterDate`, `beforeDate`, `channelAfterDate`, `countryCode`, `languageCode`) and the same output fields (`id`, `date`, `text`, `sender`, `view_count`, `reactions`, `media_url`, `source_id`, `source_name`, `channel_info`, ...). On the posts both Actors returned in our test, date, text, `source_id`, `sender`, views and channel name were identical.

### What you can ask

| Input | Returns |
|---|---|
| `{"keywords": ["bitcoin ETF"]}` | the newest public posts that mention "bitcoin ETF", from every channel found |
| `{"channels": ["durov", "@telegram", "https://t.me/s/cointelegraph"]}` | the latest messages of each channel, newest first, as deep as you want (600 messages tested on one channel) |
| `{"channels": ["cointelegraph"], "keywords": ["ETF"]}` | posts of those channels that mention the keyword (Telegram's in-channel search) |
| `{"mode": "keyword", "keywords": ["Bundestag"], "afterDate": "30 days"}` | keyword search limited to the last 30 days |

Nothing is required. `mode` is optional: with channels the Actor reads those channels, without channels it searches all of Telegram. The empty input runs alone in about 10 seconds (`bitcoin ETF`, 50 messages).

`keywords` and `channels` are lists; they also accept a plain string split on commas and line breaks. Aliases merged into them: `keyword`, `queries`, `query`, `searchTerms`; `channel`, `channelUrls`, `channelUsernames`, `usernames`, `startUrls`, `urls`, `url`. A channel can be written `durov`, `@durov`, `t.me/durov` or `https://t.me/s/durov/123`.

### Input

| Field | Default | What it does |
|---|---|---|
| `keywords` | `["bitcoin ETF"]` | Words or phrases. Without channels: searched across Telegram. With channels: searched inside them. |
| `channels` | — | Public channel usernames or links. |
| `mode` | inferred | `keyword` or `channel`, kept for compatibility. |
| `maxResultsPerKeyword` | 50 | Keyword search across Telegram: posts kept per keyword. |
| `channelMaxMessages` | 50 | Channel mode: messages per channel (per channel and keyword when both are given). |
| `maxChannelsPerKeyword` | 20 | Keyword search: how many channels found for the keyword are searched. |
| `afterDate` / `beforeDate` | — | `2026-01-31`, or relative for `afterDate`: `7 days`, `2 weeks`, `1 month`, `1 year`. |
| `channelAfterDate` | — | Same as `afterDate`, for channel mode (falls back to `afterDate`). |
| `exactPhrase` | `false` | Keep only posts with the keyword as an exact phrase (default: every word, any order; a plural also matches its singular). |
| `matchAllWords` | `true` | Set to `false` to keep Telegram's loose matches too. |
| `countryCode` / `languageCode` | `us` / `en` | Region and language of the search that finds channels (`fr`/`fr`, `de`/`de`, `ru`/`ru`...). |

### Output

One item per message. Real item from a run:

```json
{
  "id": 16427,
  "type": "Regular",
  "date": "2026-11-12T18:19:02+00:00",
  "text": "📉 BITCOIN HOLDS NEAR $73K AFTER HOT CPI — BUT THE MARKET IS STILL UNDER PRESSURE\n\nBitcoin absorbed a hotter-than-expected U.S. inflation report ... U.S. spot Bitcoin ETFs still recorded approximately $95 million in net outflows ...",
  "sender": "1272903686",
  "silent": false,
  "pinned": false,
  "view_count": 68,
  "reactions": {"🔥": 1},
  "media_url": "https://cdn4.telesco.pe/file/W9QhzNx1S_jlSBYib15QhO6hsKfeYCq...",
  "source_id": 1272903686,
  "source_name": "Bitcoin ™️ | BTC | News",
  "source_type": "Channel",
  "channel_info": {"subscribers": 12400, "photos": 6770, "videos": 2190, "files": 1, "links": 3520,
                   "description": "Bitcoin news for serious holders. Markets, ETFs, institutions & on-chain."},
  "processed_at": "2026-11-12T20:35:52.806788+00:00",
  "source_url": "https://t.me/s/bitcoinnews?q=bitcoin%20ETF",
  "post_url": "https://t.me/bitcoinnews/16427",
  "channel_username": "bitcoinnews",
  "keyword": "bitcoin ETF",
  "media_type": "photo",
  "forwarded_from": null,
  "status": "ok",
  "error": null
}
```

Fields added to the leader's set: `post_url`, `channel_username`, `keyword`, `media_type`, `forwarded_from`, `status`, `error`.

A keyword or channel that produced nothing gets one item with `status` `notfound` (channel does not exist, is private or has no public preview), `empty` (nothing in the date range, or no channel found) or `error` (with the reason in `error`), so a workflow always sees what happened. These items are never charged.

### Pricing

Pay per event, no start fee:

| Event | Price |
|---|---|
| `message` — one post saved | per 1,000: $0.60 Free, $0.50 Bronze, $0.40 Silver, $0.36 Gold, Platinum and Diamond |
| `keyword-search` — one keyword searched across Telegram that returned at least one post | $0.01 |

100 posts for one keyword cost $0.06 on the Bronze plan (the leading Telegram keyword Actor charges $0.25 for the same). Channel mode has no keyword charge, even when keywords are searched inside the channels. Set `maxTotalChargeUsd` on the run to cap the cost.

### Use it from code, n8n or an AI agent

```bash
curl -X POST "https://api.apify.com/v2/acts/sherwood~telegram-keyword-search-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["bitcoin ETF"], "maxResultsPerKeyword": 100, "afterDate": "7 days"}'
```

- **n8n**: the official Apify node, action "Run an Actor and get dataset", Actor `sherwood/telegram-keyword-search-scraper`, input as above.
- **AI agents (Apify MCP server)**: call the Actor with `keywords` or `channels`; nothing else is needed.
- **Find the channels first**: [`sherwood/telegram-channel-search`](https://apify.com/sherwood/telegram-channel-search) lists the public channels of a topic with exact subscriber counts; pass their `username` values here as `channels`.
- **Scheduling**: save an input as a task and add an Apify schedule, with `afterDate: "1 day"` for a daily watch.

### Limits

- Public channels only, read from Telegram's public web preview (`t.me/s/<channel>`). Private channels, groups, chats and comments are not available.
- Keyword search across Telegram finds channels through Google (`site:t.me`), so it only reaches channels Google has indexed, and results change from one run to the next. On 5 keywords, it searched 55 channels where the leading Actor read 11, and found 7 of those 11.
- Large counts are rounded by Telegram: `view_count` 4.09M means 4,090,000; subscriber counts too.
- `silent` and `pinned` are always `false`: the public preview does not expose them. They are kept for compatibility.
- Custom emoji reactions come as `custom:<id>`, paid Telegram Stars reactions as `⭐`.
- Old posts: channel history goes back as far as Telegram's preview does (600 messages in one run tested); keyword search inside a channel reads newest first and goes deeper only when needed.

# Actor input Schema

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

Words or phrases to find in public Telegram posts. Without channels, each keyword is searched across all of Telegram (channels found through Google, then searched inside). With channels, the keywords are searched inside those channels only. A post is kept only if it contains every word of the keyword.

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

Public channel usernames or links: durov, @durov, t.me/durov, https://t.me/s/durov all work. Without keywords, returns the channel's latest messages, newest first.

## `mode` (type: `string`):

Optional. Inferred when empty: channel when channels are given, keyword otherwise. Kept for drop-in compatibility with lofomachines/telegram-keyword-search-scraper inputs.

## `maxResultsPerKeyword` (type: `integer`):

Keyword search across Telegram: messages kept per keyword, newest first.

## `channelMaxMessages` (type: `integer`):

Channel mode: messages per channel (per channel and keyword when both are given).

## `maxChannelsPerKeyword` (type: `integer`):

Keyword search across Telegram: how many channels found for the keyword are searched.

## `afterDate` (type: `string`):

Only posts on or after this date: 2026-01-31, or relative: 7 days, 2 weeks, 1 month, 1 year.

## `beforeDate` (type: `string`):

Only posts before this date (2026-01-31).

## `channelAfterDate` (type: `string`):

Same as Published after, for channel mode (leader-compatible name). Falls back to Published after.

## `exactPhrase` (type: `boolean`):

Keep only posts that contain the keyword as an exact phrase (default: every word, in any order).

## `matchAllWords` (type: `boolean`):

Telegram's search also returns loose matches. On by default: a post is kept only if its text contains the keyword's words.

## `countryCode` (type: `string`):

ISO country code for the Google search that finds channels (us, gb, fr, de…).

## `languageCode` (type: `string`):

ISO language code for the Google search that finds channels (en, fr, ru…).

## Actor input object example

```json
{
  "keywords": [
    "bitcoin ETF"
  ],
  "maxResultsPerKeyword": 50,
  "channelMaxMessages": 50,
  "maxChannelsPerKeyword": 20,
  "exactPhrase": false,
  "matchAllWords": true,
  "countryCode": "us",
  "languageCode": "en"
}
```

# Actor output Schema

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

One item per public Telegram message (status ok), plus one item per keyword or channel that produced nothing (status notfound, empty or error).

# 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 = {
    "keywords": [
        "bitcoin ETF"
    ],
    "maxResultsPerKeyword": 50,
    "channelMaxMessages": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("sherwood/telegram-keyword-search-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 = {
    "keywords": ["bitcoin ETF"],
    "maxResultsPerKeyword": 50,
    "channelMaxMessages": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("sherwood/telegram-keyword-search-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 '{
  "keywords": [
    "bitcoin ETF"
  ],
  "maxResultsPerKeyword": 50,
  "channelMaxMessages": 50
}' |
apify call sherwood/telegram-keyword-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sherwood/telegram-keyword-search-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/7KROwBeA0s90UoZcY/builds/oquPzh8059kGGF3hX/openapi.json
