# Telegram Keyword Search Scraper: Posts, Channels | $0.50/1K (`architekture/telegram-keyword-search-scraper`) Actor

Telegram keyword search across public channels: finds channels that mention your keyword, searches inside each one and returns only posts that contain it, with text, date, views, reactions, media and links. No login or API key. Only-new-posts mode. Pay per result: $0.50 per 1,000 posts.

- **URL**: https://apify.com/architekture/telegram-keyword-search-scraper.md
- **Developed by:** [architek.earth](https://apify.com/architekture) (community)
- **Categories:** Social media, Agents, MCP servers
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 1,000 matching 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 Keyword Search Scraper: Posts, Channels | $0.50/1K

**Recorded run: 1,000 posts for 6 keywords from 61 public channels in 353 seconds** (2026-11-17, build 0.1.1, run `mSNaBQQgeZvRgcGtE`, every row contains its keyword). A bounded sample, not a whole-Telegram benchmark.

architek.earth: an independent data studio. Pay-per-result scrapers with recorded runs, stable schemas and free status rows, built for people and AI agents.

**What's new**

- **2026-11-17**: First release. Keyword search across public Telegram channels: channels found through Google's index of public Telegram pages (or your own list), then Telegram's own in-channel search, and only posts that contain the keyword are returned. Date window, only-new-posts mode and a free 20-post preview. Launch price $0.50 per 1,000 posts until 2026-12-31.

Telegram Keyword Search Scraper takes keywords and returns public Telegram posts that contain them, one row per post, with the channel it came from and how that channel was found. No Telegram account, phone number, API key or session string is involved.

| Source | Data | From | Standout fields |
|---|---|---|---|
| Public Telegram channels (t.me web preview, found through Google's index) | Posts that contain your keyword | $0.50 / 1,000 posts | `keyword`, `matchedIn`, `discoverySource`, `views`, `reactions`, `channelSubscribers` |

### ✅ Why choose this scraper

- **Every row contains your keyword.** Each channel is searched with Telegram's own in-channel search, then every post is checked for every word of your keyword; posts that do not contain it are dropped and never charged. `matchedIn` says whether the words are in the post text (`text`) or all in its links and link card (`link`). In the six recorded runs Telegram's search returned 341 posts that did not contain the keyword; none was delivered or charged.
- **One bill, no hidden child run.** Channel discovery and the search run inside this scraper; nothing else is started on your account.
- **Search only the channels you care about.** Give `channels` and discovery is skipped: each keyword is searched in exactly those channels.
- **Only new matching posts on a schedule.** With `incrementalMode` the scraper remembers the newest matching post per keyword and channel under your `stateKey`. In recorded run `Fqeh9MGoG2N9FlF7e` the 4-keyword input was run again: channels already seen delivered 0 posts (35 known posts skipped), and the 105 rows came from channels Google listed for the first time.
- **Full post context.** Views, reactions, media URLs, links, forwards, replies, channel title and subscribers on every row, the same fields as our Telegram Channel Scraper.

#### Tested head-to-head (2026-11-17)

Our numbers come from our own recorded runs only; the field numbers are public store statistics. We did not run any competing product.

| | This scraper | Field (public store data, 2026-11-17) |
|---|---|---|
| Price per 1,000 posts | $0.50, no start fee | field leader $2.50; top-10 paid members $1.00 to $5.00 |
| Rows that contain the keyword | All rows: posts are checked word by word before delivery | The field leader documents that its row is each channel's newest post, which "may not contain your keyword" |
| Only new posts between runs | `incrementalMode` per keyword and channel | The field leader documents no cross-run deduplication |
| Recorded runs | 6 of 6 succeeded: `gqYd8dwemfepKwJ41`, `Fqeh9MGoG2N9FlF7e`, `mja1bl248B7rC4y1a`, `mSNaBQQgeZvRgcGtE`, `NS2RSNovSB90Wi0qd`, `ft9bxplktyNu2ceBh` | 30-day non-success 1.1% for the field leader |

Six runs are a small sample; they do not show that this scraper is more reliable than any other.

### ⚠️ Worth knowing up front

- **Telegram has no public search across all channels.** Telegram's global search needs a logged-in account, which this scraper does not use. Channels are found through Google's index of public Telegram preview pages (`site:t.me/s`), so discovery covers channels Google has indexed for your keyword, not all of Telegram. If you know the channels, list them in `channels`.
- **About 20 matches per channel.** Telegram's in-channel search returns the newest 20 to 22 matching posts per channel and keyword in the recorded runs. A keyword's total is therefore about 20 times the number of channels searched: raise `maxChannelsPerKeyword` (up to 50) for more posts, not only `maxPostsPerKeyword`.
- Matching is word-start and case-insensitive: `etf` matches `ETFs`, `ai` does not match `said`. Every word of a keyword must appear; wrap a keyword in double quotes (`"\"bitcoin etf\""`) to require the exact phrase. Scripts written without spaces (Chinese, Japanese, Thai) match anywhere in the text.
- Only **public channels** can be searched. Groups, users, bots, private channels (invite links `t.me/+...`, `t.me/c/...`) and channels whose owner turned the web preview off cannot; each ends as a free status row (`NOT_A_CHANNEL`, `PRIVATE_CHANNEL`, `PREVIEW_DISABLED`, `NOT_FOUND`) and the rest continue.
- Google's ranking changes from day to day, so a scheduled run can find channels the previous run did not. In incremental mode such a channel delivers its recent matching posts once, then only new ones.
- `views`, reaction counts and `channelSubscribers` are rounded the way Telegram shows them (`4.93K` becomes 4,930); the raw counter is in `viewsText`. Media URLs carry an expiring token.
- Invalid input, no channels found for a keyword after a second try (`NO_CHANNELS_FOUND`), no matching post (`NO_MATCHING_POSTS`), nothing new since the last run (`NO_NEW_POSTS`), a refusal after one retry (`BLOCKED`), and runs stopped by the time limit, your spending limit or the preview limit (`PARTIAL`, `BUDGET_LIMIT`, `PREVIEW_LIMIT`) each write a free status row (`"recordType": "status"`).

### ⚡ Try the example

The free preview returns up to 20 posts per run and never charges. It is on in the input form and off by default through the API.

Open the [input page](https://console.apify.com/actors/HghcEaetlCkhU3x21/input), switch to JSON, paste this and start:

```json
{
  "keywords": ["bitcoin etf"],
  "maxChannelsPerKeyword": 5,
  "maxPostsPerKeyword": 20,
  "preview": true
}
```

Recorded preview run `ft9bxplktyNu2ceBh` (keywords `remote jobs` and a nonsense word): 20 posts, 0 charged, and a free `NO_CHANNELS_FOUND` row for the nonsense word. Set `preview` to `false` for paid collection.

### ⚙️ Input

| Parameter | Type | Default | Description |
|---|---|---|---|
| `keywords` | array | none | Words or phrases (up to 20, 100 characters each). Every word must appear in a returned post; double quotes require the exact phrase. |
| `channels` | array | none | Optional. Public channel usernames or t.me links (up to 100). When set, discovery is skipped and only these channels are searched. |
| `maxChannelsPerKeyword` | integer | `10` | Channels found through Google and searched per keyword (1 to 50). Ignored when `channels` is set. |
| `maxPostsPerKeyword` | integer | `100` | Most matching posts delivered and charged per keyword, across its channels (1 to 10,000). |
| `since` | string | none | Only posts published on or after this date (UTC), e.g. `2026-10-01`. |
| `until` | string | none | Only posts published on or before this date (UTC). |
| `incrementalMode` | boolean | `false` | Deliver only matching posts newer than the previous run with the same `stateKey`, per keyword and channel. |
| `stateKey` | string | none | Any name for this collection. Needed for incremental mode; also lets a stopped run continue without paying twice. |
| `preview` | boolean | `false` (form: `true`) | Up to 20 posts, never charged. |
| `feedback` | string | none | Optional note for the maintainers. Logged and read by a human; never changes output. |

#### Input recipes

Public example tasks are not published yet. Each recipe below is paste-ready JSON for the [input page](https://console.apify.com/actors/HghcEaetlCkhU3x21/input) (JSON tab).

- **Brand mentions across Telegram:** `{"keywords": ["openai", "anthropic"], "maxChannelsPerKeyword": 20, "maxPostsPerKeyword": 300}`
- **Exact phrase only:** `{"keywords": ["\"spot bitcoin etf\""], "maxChannelsPerKeyword": 15}`
- **Daily keyword alert:** `{"keywords": ["airdrop", "token unlock"], "incrementalMode": true, "stateKey": "daily-crypto-alerts", "maxPostsPerKeyword": 200}`
- **Search inside your own channel list:** `{"keywords": ["telegram"], "channels": ["durov", "telegram"], "maxPostsPerKeyword": 50}`
- **One month of mentions:** `{"keywords": ["nvidia"], "since": "2026-10-01", "until": "2026-10-31", "maxChannelsPerKeyword": 20, "maxPostsPerKeyword": 500}`

### 🧱 Stable fields

These top-level fields keep their name and kind of value in every release. Fields are only ever added, never renamed or removed.

| Field | Type | Meaning |
|---|---|---|
| `recordType` | string | `"post"` on data rows, `"status"` on free status rows. |
| `keyword` | string | The keyword this post matched, as you typed it. A post matching two keywords appears once per keyword. |
| `matchedIn` | string | `text`: every keyword word is in the post text. `link`: every keyword word is in the post's links or link card (title, description, URL). |
| `discoverySource` | string | `google_index` (channel found through Google's index of t.me) or `input` (from your `channels`). |
| `discoveryRank` | integer | Position of the channel in the keyword's channel list (1 = first). |
| `postId` | string | `<channel>/<messageId>`, e.g. `glassnode/2108`. |
| `channel` / `messageId` / `url` | string / integer / string | Channel username, post number, `https://t.me/<channel>/<id>`. |
| `date` | string, nullable | Publication time, ISO 8601 UTC. |
| `edited` | boolean | Telegram marks the post as edited. |
| `text` / `textHtml` | string, nullable | Plain text with emoji and line breaks / the post HTML as Telegram renders it. |
| `views` / `viewsText` | integer / string, nullable | View count as shown (rounded) / the raw counter, e.g. `4.93K`. |
| `reactions` | array | `{emoji, customEmojiId, count, paid}` per reaction. |
| `reactionsTotal` / `paidReactions` | integer | Sum of normal reactions / sum of Telegram Stars reactions. |
| `author` | string, nullable | Post signature, when the channel signs posts. |
| `forwardedFrom` | object, nullable | `{name, url}` of the original source. |
| `replyToUrl` / `replyToMessageId` | string / integer, nullable | The post this one replies to. |
| `media` / `mediaTypes` | array | `{type, url, thumbnailUrl, duration, title}` per item / distinct types. |
| `links` / `hashtags` | array | Links and hashtags in the post text. |
| `linkPreview` | object, nullable | `{url, siteName, title, description, imageUrl}` of the link card. |
| `channelTitle` / `channelSubscribers` / `channelUrl` | string / integer / string | Channel name, subscriber counter as shown (rounded), channel link. |
| `scrapedAt` | string | Read time, ISO 8601 UTC. |
| `changeType` | string | `"new"` on rows from incremental mode. |

Status rows carry `recordType`, `keyword`, `inputRef`, `status` and `message`. `deliveryId` is a technical delivery key, not part of the contract. To have another field pinned, say so in `feedback`.

### 📦 Output example

Abridged real row from run `gqYd8dwemfepKwJ41` on 2026-11-17 (media URL shortened; values are a snapshot):

```json
{
  "recordType": "post",
  "keyword": "bitcoin",
  "matchedIn": "text",
  "discoverySource": "google_index",
  "discoveryRank": 4,
  "postId": "glassnode/2108",
  "channel": "glassnode",
  "messageId": 2108,
  "url": "https://t.me/glassnode/2108",
  "date": "2026-11-15T12:01:22Z",
  "edited": false,
  "text": "Bitcoin has dropped into the top of the pain zone.\n\nPrice briefly touched the largest cluster on the map, which sits between $60k - $63k. ...",
  "views": 4930,
  "viewsText": "4.93K",
  "reactions": [{"emoji": "👍", "customEmojiId": null, "count": 35, "paid": false}],
  "reactionsTotal": 59,
  "paidReactions": 0,
  "author": null,
  "forwardedFrom": null,
  "replyToUrl": null,
  "replyToMessageId": null,
  "media": [{"type": "photo", "url": "https://cdn4.telesco.pe/file/Yn-APoWW....jpg", "thumbnailUrl": null, "duration": null, "title": null}],
  "mediaTypes": ["photo"],
  "links": [],
  "hashtags": [],
  "linkPreview": null,
  "channelTitle": "Glassnode",
  "channelSubscribers": 43700,
  "channelUrl": "https://t.me/glassnode",
  "scrapedAt": "2026-11-17T07:22:55Z",
  "changeType": "new"
}
```

Free status rows from runs `NS2RSNovSB90Wi0qd` and `ft9bxplktyNu2ceBh`:

```json
{"recordType": "status", "keyword": "durov", "inputRef": "botfather", "status": "NOT_A_CHANNEL", "message": "This name is a user, a bot or a group, not a public channel; only channels have a public preview"}
{"recordType": "status", "keyword": "zqxjvwkplmtr qqqzzz", "inputRef": "zqxjvwkplmtr qqqzzz", "status": "NO_CHANNELS_FOUND", "message": "Google's index has no public Telegram channel page for this keyword (checked twice). Try a broader keyword or give channels to search directly."}
```

### 🧠 Advanced usage

**Keyword alerts.** Schedule a run with `incrementalMode: true` and one `stateKey` per watch list. Each later run delivers only matching posts with a higher post number than the newest one already delivered for that keyword and channel; quiet channels cost one page read and no charge.

**How a keyword is processed.** Up to `maxChannelsPerKeyword` channels are read from Google result pages for `site:t.me/s "<keyword>"` (10 results per page, usually 3 to 8 new channels per page; reading stops when a page adds none). Each channel is then searched with `t.me/s/<channel>?q=<keyword>`, newest first, until `maxPostsPerKeyword` is reached. Keywords run one after another; a free preview stops at 20 posts.

**Completeness.** `RUN_SUMMARY` in the run's key-value store has `status` (`COMPLETE`, `PARTIAL`, `BUDGET_LIMIT`, `PREVIEW_LIMIT`), channels searched, Google pages read, posts delivered and charged, and posts dropped because they did not contain the keyword (`notMatching`). `PARTIAL` means at least one keyword or channel has a `BLOCKED` or `SOURCE_*` status row, or the run stopped at its time limit.

**Stopped runs.** With a `stateKey`, run the same input again: channels are not looked up again, the search continues from the saved page, and posts already delivered are skipped and not charged again. A keyword whose channel search was refused is tried again.

### 🔌 Integrations

Results land in a dataset you can export as JSON, CSV or Excel, send to Google Sheets, or pass to Make, Zapier or n8n; a webhook can fire when a run finishes, and a schedule runs it on a timetable.

#### n8n

Add an **HTTP Request** node: method `POST`, URL `https://api.apify.com/v2/acts/architekture~telegram-keyword-search-scraper/run-sync-get-dataset-items?timeout=300&maxTotalChargeUsd=0.10`, authentication Header Auth with `Authorization: Bearer <your token>`, body JSON:

```json
{"keywords": ["bitcoin etf"], "incrementalMode": true, "stateKey": "n8n-etf-watch", "maxPostsPerKeyword": 100}
```

The node returns the rows as items. Add an **IF** node on `recordType` equal to `post` to separate posts from status rows, then route posts to Slack, a sheet or a database. Put a **Schedule Trigger** in front once the first result looks right.

#### Make

Add **HTTP: Make a request**: method `POST`, the same URL, header `Authorization: Bearer <your token>`, body type raw, content type `application/json`, the same JSON body, and "Parse response" on. Follow it with an **Iterator** over the returned array and a **Filter** on `recordType = post`. Do not retry an ambiguous POST automatically; check first whether a run was created.

### 💸 Pricing

Pay per result. Platform usage, proxies and the Google channel lookup are included. Status rows, channels without a preview, posts that do not contain the keyword and failed requests are free.

| Event | Price | What it covers |
|---|---|---|
| Free preview | $0 | Up to 20 posts per run with `preview: true`. |
| `post` | $0.50 / 1,000 posts ($0.0005 each) | One delivered post row that contains its keyword. |

Launch price until 2026-12-31. 1,000 posts cost $0.50; the $5 monthly free credit covers about 10,000 posts. Silver plans pay 10% less and Gold and above 20% less. Set a maximum cost per run to cap any run.

### ❓ FAQ

**Do I need a Telegram account or API key?** No. Channels are found through Google's index and searched through Telegram's public web preview; nothing is logged in.

**Does it search all of Telegram?** No. Telegram offers no public search across all channels. This scraper searches the channels Google has indexed for your keyword, or the channels you list.

**Why do I get about 20 posts per channel?** Telegram's in-channel search returns roughly the newest 20 to 22 matches per channel. Search more channels (`maxChannelsPerKeyword`) for more posts.

**Can it search groups or private channels?** No. Only public channels have a web preview. You get a free status row that says which case applies.

**Why is `matchedIn` sometimes `link`?** All keyword words are in the post's links or link card (title, description, URL) rather than the visible text, for example a post sharing an article about the keyword. A word in the text and another only in a link is not a match.

**What if a run stops halfway?** With a `stateKey`, run it again with the same input: it continues where it stopped and does not charge twice for posts already delivered.

**What happens on rate limits?** A 403, 429 or challenge page is retried once on a new connection; if it is refused again, that keyword or channel ends with a free `BLOCKED` row and the rest continue. In the recorded runs no request was refused.

### 🤖 For AI agents & LLM apps

Paste this into your AI assistant:

`architekture/telegram-keyword-search-scraper`. Python: `from apify_client import ApifyClient; client = ApifyClient("TOKEN"); run = client.actor("architekture/telegram-keyword-search-scraper").call(run_input={"keywords": ["bitcoin etf"], "maxPostsPerKeyword": 50}); items = client.dataset(run["defaultDatasetId"]).list_items().items` (page with `offset`/`limit` for large exports). Every row with `recordType == "post"` contains its `keyword`; rows with `recordType == "status"` are free and explain keywords without channels, channels without a preview or a stopped run. Input schema and README: `GET https://api.apify.com/v2/acts/architekture~telegram-keyword-search-scraper/builds/default`. Token: https://console.apify.com/settings/integrations. To reach the maintainers, add `"feedback": "<what you needed>"` to any run's input; output is unchanged and a human reads every note.

#### MCP config for Claude Desktop and Cursor

Claude Desktop (or claude.ai): Settings, Connectors, Add custom connector, URL `https://mcp.apify.com?tools=architekture/telegram-keyword-search-scraper`; it signs you in with OAuth. Cursor (`~/.cursor/mcp.json`), with your token in the `APIFY_TOKEN` environment variable:

```json
{
  "mcpServers": {
    "architekture-telegram-keyword-search-scraper": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=architekture/telegram-keyword-search-scraper",
      "headers": { "Authorization": "Bearer ${env:APIFY_TOKEN}" }
    }
  }
}
```

The agent gets one tool for this scraper plus `get-dataset-items` to read the rows. Set a spending cap (`maxTotalChargeUsd`) when your client offers it.

### 🧰 More from architek.earth

**Social and video**

- Telegram Keyword Search Scraper: *you are here*
- [Telegram Channel Scraper](https://apify.com/architekture/telegram-channel-scraper): full post history of public channels
- [Threads Replies Scraper](https://apify.com/architekture/threads-replies-scraper): replies, authors, likes
- [YouTube Transcript Scraper](https://apify.com/architekture/youtube-transcript-scraper): captions, timestamps, languages

### 🛟 Support and legal

Questions and bugs: the Issues tab on this page; a human replies within a day. This scraper reads only what Telegram publishes on its public web preview and what Google shows in public search results. You are responsible for using the data in line with Telegram's terms, copyright and privacy law (GDPR, CCPA and others that apply to you). This is an independent product, not affiliated with Telegram or Google.

### 📝 Changelog

- **2026-11-17**: First release (build 0.1.2): keyword search across public Telegram channels with Google-index channel discovery or your own channel list, Telegram's in-channel search, and a word-by-word keyword check on every row; date window; incremental mode; free 20-post preview; launch price $0.50 per 1,000 posts until 2026-12-31.

# Actor input Schema

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

Words or phrases to find in public Telegram posts (up to 20). Every returned post contains every word of the keyword; wrap a keyword in double quotes to require the exact phrase.

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

Leave empty to find channels through Google's index of public Telegram pages. Or list public channel usernames or t.me links (up to 100) to search only those; channel discovery is then skipped.

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

How many channels found through Google are searched for each keyword (ignored when you list channels).

## `maxPostsPerKeyword` (type: `integer`):

Most matching posts delivered (and charged) per keyword, across its channels, newest first within each channel.

## `since` (type: `string`):

Only posts published on or after this date (UTC).

## `until` (type: `string`):

Only posts published on or before this date (UTC).

## `preview` (type: `boolean`):

Deliver up to 20 matching posts per run without any charge. Switch off for paid collection.

## `incrementalMode` (type: `boolean`):

Deliver only matching posts newer than the previous run with the same stateKey, per keyword and channel. Ideal for scheduled keyword alerts.

## `stateKey` (type: `string`):

Any name for this collection (e.g. etf-watch). Needed for incremental mode; also lets a stopped run continue without paying twice.

## `feedback` (type: `string`):

Optional. Logged and read by a human; never changes the output.

## Actor input object example

```json
{
  "keywords": [
    "bitcoin etf"
  ],
  "maxChannelsPerKeyword": 5,
  "maxPostsPerKeyword": 20,
  "preview": true,
  "incrementalMode": false
}
```

# Actor output Schema

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

One row per delivered post that contains the keyword, plus free status rows.

## `summary` (type: `string`):

RUN_SUMMARY record: status and counts.

# 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"
    ],
    "maxChannelsPerKeyword": 5,
    "maxPostsPerKeyword": 20,
    "preview": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("architekture/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"],
    "maxChannelsPerKeyword": 5,
    "maxPostsPerKeyword": 20,
    "preview": True,
}

# Run the Actor and wait for it to finish
run = client.actor("architekture/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"
  ],
  "maxChannelsPerKeyword": 5,
  "maxPostsPerKeyword": 20,
  "preview": true
}' |
apify call architekture/telegram-keyword-search-scraper --silent --output-dataset

```

## MCP server setup

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