# Telegram Keyword Search: Messages Across All Channels (`automation-lab/telegram-keyword-message-search`) Actor

Search public Telegram messages by keyword or #hashtag across channels you don't know yet. Get text, views, reactions, media, links, date and exact channel subscribers. Brand, crypto and OSINT monitoring. No login or API key.

- **URL**: https://apify.com/automation-lab/telegram-keyword-message-search.md
- **Developed by:** [Automation Lab](https://apify.com/automation-lab) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 matching 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 Keyword Search: Messages Across All Channels

Find public Telegram messages that mention your **keywords or #hashtags**, even in channels you have never heard of. The **Telegram Keyword Message Search Scraper** finds channels that talk about each keyword, runs Telegram's own search inside every one of them, and returns one clean row per matching message: text, date, views, reactions, media, links and the channel's exact subscriber count.

No Telegram account, phone number, API key or login is needed.

- 🔎 Search many keywords, phrases or hashtags in one run
- 🧭 Discovers channels for you, or searches only the channels you list
- 📅 Date range, minimum views, media-only and exact-match filters
- 📈 Views, reactions, forwards and exact channel subscribers on every row
- 🔁 Stable `messageKey` per message, made for scheduled monitoring and deduplication
- 💸 You pay per matching message, not per page or per channel visited

### What does Telegram Keyword Message Search Scraper do?

For every keyword you enter, the Actor:

1. **Finds channels that mention it.** It searches the public web index of `t.me` posts (DuckDuckGo) and the public channel directories TGStat and TGKit. Channels whose posts mention the keyword come first; the largest topic channels follow.
2. **Searches inside each channel** with Telegram's public channel search (`t.me/s/<channel>?q=<keyword>`), newest messages first, paging back as far as your limits and date range ask.
3. **Filters and saves** each matching message once, with the keyword that found it and details about its channel.

You can also list channels to always search, or switch discovery off to monitor only a fixed list of channels.

### Who is it for?

**Brand and PR teams** track mentions of a brand, product or executive across Telegram channels and get alerted to new ones on a schedule.

**Crypto and finance analysts** follow tickers, token names, airdrops and #hashtags across signal, news and community channels, with views and reactions as a reach signal.

**OSINT, trust-and-safety and research teams** collect public posts about a topic, event or person from channels they do not know in advance, with links back to every source.

**Marketers and growth teams** find the channels where a topic is discussed and measure how big those audiences are.

### Why use this Telegram keyword search?

- **Discovery built in.** Most Telegram scrapers need channel names up front. This one finds them for you.
- **Message-level results.** Every row is a real message with its URL, not just a list of channels.
- **Exact subscriber counts** for every channel, not rounded "7K" labels.
- **Monitoring-ready.** Each row has a stable `messageKey` (`channel/messageId`), so repeat runs are easy to deduplicate.
- **Lightweight.** Plain HTTP requests, no browser, so runs are quick and cheap.
- **Companion to our [Telegram Scraper](https://apify.com/automation-lab/telegram-scraper)**: once you find interesting channels here, pull their full history there.

### What data can you extract?

| Field | Description |
| --- | --- |
| `matchedKeyword` | The keyword or hashtag that found the message |
| `messageKey` | Stable `channel/messageId` key for deduplication |
| `url`, `messageId` | Public link and number of the message |
| `date` | Publication time (ISO 8601) |
| `text` | Visible message text |
| `views`, `reactions`, `totalReactions` | Reach and engagement |
| `isForwarded`, `forwardedFrom`, `forwardedFromName` | Forward source, when the message is a forward |
| `mediaType`, `mediaCount`, `photoUrls`, `videoUrls`, `videoThumbnailUrl`, `videoDuration`, `audioUrl`, `documentName`, `documentSize`, `poll` | Attached media |
| `links`, `hashtags`, `mentions`, `linkPreview` | Links and entities in the message |
| `channelUsername`, `channelTitle`, `channelUrl` | Channel that posted it |
| `channelSubscribers`, `channelVerified`, `channelDescription` | Channel audience and profile |
| `discoveredVia` | `duckduckgo`, `tgstat`, `tgkit` or `input` |
| `scrapedAt` | When the row was collected |

### How much does it cost to search Telegram messages?

The Actor uses pay-per-event pricing: a small fee when a run starts, then a fee **per matching message saved**. Channels searched without a match cost you nothing.

| Event | Free plan | Bronze | Silver | Gold, Platinum, Diamond |
| --- | ---: | ---: | ---: | ---: |
| Actor start (once per run) | $0.003 | $0.003 | $0.003 | $0.003 |
| Matching message | $0.00225 | $0.00225 | $0.002025 | $0.0018 |

That is **$2.25 per 1,000 messages** on Free and Bronze, and $1.80 per 1,000 on Gold and above. A typical brand-monitoring run (3 keywords, 100 messages) costs about $0.23. The start fee covers channel discovery, so a run that finds no matching message costs only $0.003. Set **Maximum messages** to cap the cost of any run, and use the run's maximum cost setting for a hard limit.

### How to search Telegram messages by keyword

1. Open the Actor and enter one or more **Keywords or hashtags**, for example `nvidia`, `bitcoin halving` or `#airdrop`.
2. Set **Maximum messages** and, optionally, **Posted on or after** (for example `7 days`).
3. Click **Start**. Rows appear in the dataset as channels are searched.
4. Download the results as JSON, CSV, Excel or HTML, or connect them to your tools.

To monitor mentions, save the input as a task and add a **schedule** (for example daily with **Posted on or after** set to `1 day`), then deduplicate on `messageKey`.

### Input

| Field | What it does |
| --- | --- |
| **Keywords or hashtags** (`keywords`) | Words, phrases or #hashtags. Each is searched separately. Required. |
| **Maximum messages** (`maxItems`) | Total messages to save across all keywords. Default 100. |
| **Posted on or after** / **Posted before** (`afterDate`, `beforeDate`) | Date range. Absolute dates or relative values such as `7 days`. |
| **Find channels that mention the keywords** (`discoverChannels`) | On by default. Turn off to search only your listed channels. |
| **Channels to always search** (`channels`) | Usernames or `t.me` links searched for every keyword. |
| **Channels to discover per keyword** (`maxChannelsPerKeyword`) | Default 20, up to 100. |
| **Maximum messages per channel** (`maxResultsPerChannel`) | Default 20. |
| **Discovery language** / **Discovery country** (`language`, `country`) | Bias which channels are found, for example `es` and `mx`. |
| **Discover channels active in** (`discoveryTimeRange`) | Any time, past day, week, month or year. |
| **Exact keyword match** (`strictMatch`) | On by default: keep only messages that contain every word of the keyword as a whole word (`tesla` matches "Tesla's" but not "teslatravel"; `ai` does not match "said"). Links, @handles, emails and a channel's own multi-word name in its sign-off do not count. A post that only shares a link counts when the link preview's site name, title or description has the keyword; a preview of another Telegram channel does not. |
| **Minimum views** (`minViews`), **Only messages with media** (`onlyWithMedia`) | Extra filters. |

Example input:

```json
{
    "keywords": ["nvidia", "#airdrop", "bitcoin halving"],
    "maxItems": 200,
    "afterDate": "30 days",
    "maxChannelsPerKeyword": 20,
    "channels": ["WatcherGuru"]
}
```

### Output example

```json
{
    "matchedKeyword": "nvidia",
    "messageKey": "nvidia/2892",
    "messageId": 2892,
    "url": "https://t.me/NVIDIA/2892",
    "date": "2026-11-20T02:57:19+00:00",
    "text": "Reducing Rollout Bottlenecks in Reinforcement Learning with NVIDIA Dynamo https://developer.nvidia.com/...",
    "views": 138,
    "isForwarded": false,
    "mediaType": "text",
    "links": ["https://developer.nvidia.com/blog/reducing-rollout-bottlenecks-in-reinforcement-learning-with-nvidia-dynamo/"],
    "reactions": [{ "emoji": "👍", "emojiId": null, "count": "1", "isPaid": false }],
    "totalReactions": 1,
    "channelUsername": "NVIDIA",
    "channelTitle": "NVIDIA",
    "channelUrl": "https://t.me/NVIDIA",
    "channelSubscribers": 6996,
    "channelVerified": false,
    "discoveredVia": "duckduckgo",
    "scrapedAt": "2026-11-20T08:17:28.000Z"
}
```

### Tips for best results

- **Use distinctive keywords.** Brand names, tickers and specific phrases find better channels than very common words.
- **Hashtags** such as `#airdrop` match Telegram hashtags inside channels; channel discovery searches the word itself.
- **Set a language and country** that fit your topic (for example `ru` and `ru`, or `es` and `mx`) to discover local channels.
- **Turn off Exact keyword match** to also get messages where Telegram matched a word form ("биткоина" for "биткоин"), a link or a channel's sign-off.
- **Known channels:** add them under **Channels to always search** so they are covered on every run, even when discovery misses them.

### Integrations

Send results to Google Sheets, Slack, Airtable, a webhook or your database with [Apify integrations](https://apify.com/integrations), or trigger Make, Zapier and n8n workflows when a run finishes. Schedule runs in the Apify Console to monitor keywords daily or hourly.

### API usage

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('automation-lab/telegram-keyword-message-search').call({
    keywords: ['nvidia', '#airdrop'],
    maxItems: 100,
    afterDate: '7 days',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("automation-lab/telegram-keyword-message-search").call(run_input={
    "keywords": ["nvidia", "#airdrop"],
    "maxItems": 100,
    "afterDate": "7 days",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["url"], item["text"])
```

#### cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~telegram-keyword-message-search/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["nvidia"], "maxItems": 50}'
```

### Use with AI agents via MCP

Telegram Keyword Message Search Scraper is available as a tool for AI assistants that support the [Model Context Protocol (MCP)](https://docs.apify.com/platform/integrations/mcp). Ask your assistant in plain language and it configures and runs the search for you.

#### Setup for Claude Code

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/telegram-keyword-message-search"
```

#### Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com?tools=automation-lab/telegram-keyword-message-search"
        }
    }
}
```

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

#### Example prompts

Once connected, try asking your AI assistant:

- "Find Telegram posts from the last 7 days that mention our brand and list the channels with the most subscribers"
- "Search Telegram for #airdrop messages with at least 1,000 views this month"
- "Which Telegram channels talked about 'bitcoin halving' recently? Show the top messages"

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

### Diagnostic privacy

Failed operations send sanitized diagnostic input, exceptions, and Actor/build/run IDs to our private, company-operated GlitchTip service for repair. Secret fields, URL query strings and email addresses are removed, and reports are retained for 30 days. Telemetry costs are covered by the provider; no customer credentials are needed for it.

This Actor uses no AI or model provider. Your keywords are sent as search queries to DuckDuckGo, TGStat, TGKit and Telegram's public channel search. Results are stored in your Apify run storage; retention and deletion follow your Apify account settings. The Actor does not download media files or keep a separate results database.

### Is it legal to scrape Telegram?

The Actor reads only public pages that anyone can open without logging in: public channel previews on `t.me` and public search results. It does not log in, join groups or read private chats. Messages can contain personal data, so make sure your use complies with the GDPR and other laws that apply to you, and do not use the data for spam or harassment. If in doubt, ask a lawyer.

### FAQ

**Does it search every Telegram channel?**
Telegram has no public global search. The Actor finds channels through public web indexes and channel directories, then searches inside each one. Coverage is broad for topics people talk about publicly, but it cannot reach private channels, groups or channels no index knows yet. Add any channel you care about under **Channels to always search**.

**Why did I get fewer messages than Maximum messages?**
Only messages that match your keyword, date range and filters are saved, and some discovered channels have no recent match. Widen the date range, raise **Channels to discover per keyword**, add more keywords, or turn off **Exact keyword match**.

**Can I search groups or private chats?**
No. Only public channels with a public web preview can be searched without logging in.

**How do I get a channel's full history?**
Use our [Telegram Scraper](https://apify.com/automation-lab/telegram-scraper) with the channel usernames from this Actor's results.

**A run returned no results. What now?**
Check the run log: it lists how many channels were found for each keyword. A very rare keyword may simply have no public mentions; try a broader term or a longer date range.

### Related actors

- [Telegram Scraper](https://apify.com/automation-lab/telegram-scraper) – full message history, comments and profiles of channels you name.
- [Telegram Channel Finder](https://apify.com/automation-lab/tgkit-telegram-channel-finder-scraper) – find public channels, groups and bots by topic.

# Changelog

This Actor's version history is a separate document: https://apify.com/automation-lab/telegram-keyword-message-search/changelog.md

# Actor input Schema

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

Words, phrases or #hashtags to find in public Telegram messages. Each one is searched separately and every result row names the keyword that found it. Examples: `nvidia`, `bitcoin halving`, `#airdrop`.

## `maxItems` (type: `integer`):

Stop after this many matching messages in total, across all keywords.

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

Only messages published on or after this date. Pick a date or type a relative value such as `7 days`, `2 weeks` or `1 month`.

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

Only messages published before this date. Leave empty for no upper bound.

## `discoverChannels` (type: `boolean`):

Find public channels that mention each keyword through web search (Google and DuckDuckGo, restricted to t.me), then search inside each of them. Turn it off to search only the channels you list below.

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

Optional public channel usernames or links, such as `durov`, `@telegram` or `https://t.me/s/nvidia`. They are searched for every keyword, on top of the discovered channels.

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

How many discovered channels to search for each keyword. More channels give broader coverage and take longer.

## `maxResultsPerChannel` (type: `integer`):

Maximum matching messages taken from one channel for one keyword, newest first.

## `language` (type: `string`):

Two-letter language code that biases which channels web search finds, for example `en`, `es`, `ru` or `de`. It does not translate or filter messages.

## `country` (type: `string`):

Two-letter country code that biases which channels web search finds, for example `us`, `gb`, `in` or `br`.

## `discoveryTimeRange` (type: `string`):

Favour channels whose pages search engines indexed in this period. Use it to find channels active right now.

## `strictMatch` (type: `boolean`):

Keep only messages that contain every word of the keyword as a whole word, outside links, @handles and the channel's own sign-off. A link preview of an outside page counts. Telegram's own search also matches word forms (staking finds stake), links and sign-offs; switch this off to keep those too.

## `minViews` (type: `integer`):

Only messages with at least this many views.

## `onlyWithMedia` (type: `boolean`):

Only messages that carry a photo, video, document, voice note, poll or sticker.

## Actor input object example

```json
{
  "keywords": [
    "nvidia"
  ],
  "maxItems": 20,
  "discoverChannels": true,
  "maxChannelsPerKeyword": 20,
  "maxResultsPerChannel": 20,
  "language": "en",
  "country": "us",
  "discoveryTimeRange": "any",
  "strictMatch": true,
  "onlyWithMedia": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset of matching messages: keyword, channel and subscribers, date, text, views, reactions, media and link.

# 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": [
        "nvidia"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/telegram-keyword-message-search").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": ["nvidia"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/telegram-keyword-message-search").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": [
    "nvidia"
  ],
  "maxItems": 20
}' |
apify call automation-lab/telegram-keyword-message-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automation-lab/telegram-keyword-message-search"
        }
    }
}
```

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/cBbzDb69KzhXHVZ6c/builds/wbZvIsCvM7bVpQqj2/openapi.json
