# Telegram Groups Search (`datahamster/telegram-groups-search`) Actor

Telegram groups search by keyword: public groups only, each read from its t.me page with member count, members online, description and photo. Channels and personal accounts are filtered out. Monitor mode alerts on newly found groups. No login, no API key, no start fee.

- **URL**: https://apify.com/datahamster/telegram-groups-search.md
- **Developed by:** [Viktor Dubnytskiy](https://apify.com/datahamster) (community)
- **Categories:** Social media
- **Features:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.72 / 1,000 result items

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 Groups Search

Find public Telegram groups by keyword and get one row per group: title, link, member count, members online now, description, photo and verified badge. Every row is read from the group's own t.me page, so a channel is never sold as a group and a dead link never becomes a row. No Telegram account, no phone number, no API key.

**Try it:** the prefilled example returns 14 rows in about 36 seconds and costs about $0.049. Results cost $3.40 per 1,000.

Differs from our [Telegram Channel Search Scraper](https://apify.com/datahamster/telegram-channels-search), which returns channels and groups together: this actor returns groups only, searches with group-oriented phrasings (so more groups per keyword), adds the live `online` count, and its monitor reports newly found groups.

Coverage: Telegram has no public group directory. Groups are found through the search-engine index of t.me with three phrasings per keyword ("<keyword> chat", "<keyword> group", "<keyword>"), usually 5-30 groups per keyword; groups never linked on the open web are not found.

### Why this one

Compared with the most-used actor for this phrase (powerai/telegram-groups-search-scraper, 30 users in 30 days; its README and input schema checked 2026-11-09):

- **Group or channel, decided from Telegram's own page.** t.me prints "members" for a group and "subscribers" for a channel; this actor opens every hit and keeps only groups (`includeChannels` adds channels with `kind: "channel"`). Personal accounts, bots and dead links are dropped before a row exists. Run b942hMatcX9b8BHdB opened 20 links for "crypto": 14 groups returned, 4 channels and 2 personal accounts dropped and not charged.
- **Members online now.** `online` is the live "N online" counter from the group page, next to `members`. The leader returns members and a rank but no online count.
- **Monitor mode for newly found groups.** Save the input as a task in Monitor mode: each run returns only groups this monitor has not found before for the keyword, with `firstSeenAt`; the first run is a free baseline. "Newly found" means newly reached through the search index, which can be an older group that the index started listing, not only a group created since the last run (Telegram shows no creation date). Optional webhook or Telegram bot alert. The leader has no monitor mode. Proof: a baseline for "crypto" and "python" (run zTvXVzvuVHRhbzOxz, 29 groups recorded, nothing charged), then run Zf9SRzabXFJbkG3JT 25 minutes later pushed 1 newly found group (a 17,000-member group the search index had not listed in the baseline, not a group created in between) and none of the 29 known ones.
- **Size filters and direct links.** `minMembers` / `maxMembers` in the input, and `groupUrls` to classify and read t.me links you already have.
- **Cheaper in total.** $3.40 per 1,000 groups and no start fee, against the leader's $4.99 per 1,000 plus $0.09 for every run.

### What you get

| Field | Example |
|---|---|
| `url`, `username` | `https://t.me/examplechat`, `examplechat` |
| `title` | `Example Chat` |
| `kind` | `group` (or `channel` with `includeChannels`) |
| `members`, `membersText` | `1422`, `1 422 members, 35 online` |
| `online` | `35` (null when Telegram prints no online counter, as for small groups) |
| `description`, `photoUrl`, `verified` | group description, photo link, `false` |
| `mentionCount` | `1` (person @handles masked as `@user` in the description) |
| `firstSeenAt` | monitor mode: when this monitor first found the group |
| `keyword`, `rank`, `source` | `crypto`, `1`, `search` or `url` |

Real rows from the prefilled run (keyword `crypto`, 14 groups):

| `url` | `title` | `members` | `online` |
|---|---|---|---|
| https://t.me/CryptoComOfficial | Crypto.com | 65676 | 2036 |
| https://t.me/CryptoChatCWN | CWN Crypto Chat | 14660 | 223 |
| https://t.me/globalcrypto_chat | Global Crypto Chat | 10068 | 139 |

### How it works

1. **Discovery.** Each keyword is searched in a public search-engine index restricted to `t.me` (Yahoo, DuckDuckGo as fallback), first as "<keyword> chat", then "<keyword> group", then the bare keyword, until `resultsPerKeyword` unique links are collected.
2. **Classification.** Every link's public card `t.me/<name>` is opened: "N members, M online" is a group, "N subscribers" is a channel, a card without a counter is a person or a bot and is skipped.
3. **Empty runs explain themselves.** `RUN_SUMMARY` in the run's key-value store has `emptyReason`: `no_matches` when the index had nothing or every hit was a channel, `blocked` when Telegram or the search engines refused the requests.

### Input

| Field | Meaning | Default |
|---|---|---|
| `keywords` | Topics, e.g. `crypto`, `python`, `berlin expats` | `["crypto"]` |
| `groupUrls` | t.me links or @usernames to classify directly | empty |
| `resultsPerKeyword` | Unique search hits opened per keyword (1-300) | `30` |
| `includeChannels` | Also return channels, with `kind: channel` | `false` |
| `minMembers` / `maxMembers` | Size bounds | empty |
| `maxItems` | Stop after this many rows | `100` |
| `mode`, `monitorStateId`, `webhookUrl`, `telegramBotToken`, `telegramChatId` | Monitor mode and alerts | `scrape` |

### Monitor mode

Run the input as a saved task with Mode = Monitor (or pass a `monitorStateId`). The first run of each keyword records the groups it finds and pushes nothing (free baseline). Later runs push only newly found groups (usernames the monitor has never seen; `firstSeenAt` is set) and charge one `monitor-check` per run plus one `change` per new group. Member counts change all the time and are not billed as changes. Changing `resultsPerKeyword` or a filter starts a new baseline. If a monitor run is killed, the next run of the same task waits until that run's timeout (`emptyReason: overlapping_run`).

### Pricing

| Event | Price |
|---|---|
| result | $0.0034 per group ($3.40 per 1,000) |
| monitor-check | $0.005 per monitor run |
| change | $0.0034 per new group in monitor mode |

Store discounts: Silver 10% off, Gold and higher 20% off. Hits that turn out to be channels, persons or dead links are not charged. Platform usage is paid by you; the actor uses no proxy and runs in 512 MB.

**Found it useful?** A short review on the Store page helps other people find this actor. If something is wrong, open an issue on the actor page.

### Related actors

- [Telegram Channel Search Scraper](https://apify.com/datahamster/telegram-channels-search): channels and groups together, with subscriber counts and last post time.
- [Telegram Keyword Search](https://apify.com/datahamster/telegram-keyword-search): posts that mention a keyword across public channels.
- [Facebook Groups Search Scraper](https://apify.com/datahamster/facebook-groups-search): the same discovery for Facebook groups.

### Limits

- Only public groups with a t.me username are found; private groups and invite links (`t.me/+...`) are skipped.
- Discovery depends on the search-engine index; most keywords give 5-30 groups. Use several related keywords for more.
- `members` is the number Telegram prints; `online` is missing on small groups, where Telegram does not print it.
- No member lists, admins or messages: only what the group's public card shows.
- Person handles: every @handle and bare t.me/<name> link in the description other than the row's own is replaced with `@user` / `t.me/user` unless its t.me card shows a public channel or group (one card check per handle, at most 40 per run; handles beyond that are masked unchecked). Post links t.me/<name>/<id> and invite links stay. `mentionCount` says how many were masked.

### FAQ

**Does it need a Telegram account?** No. Every request is a plain public web request.

**Why fewer rows than `resultsPerKeyword`?** That many links are opened; channels, personal accounts and dead links among them are dropped and not charged.

### Changelog

- 0.1: first release. Group discovery with three phrasings, group/channel classification from t.me, online counts, size filters, monitor mode.

# Actor input Schema

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

Topics to find public Telegram groups for, one per line, e.g. "crypto", "python", "berlin expats". Any language works.

## `groupUrls` (type: `array`):

Optional t.me links you already have, e.g. "https://t.me/examplechat" or "@examplechat": each is opened and returned with members, online count and group/channel kind.

## `resultsPerKeyword` (type: `integer`):

How many unique t.me links from the search index are opened per keyword, e.g. 30. Channels, personal accounts and dead links among them are dropped, so you get fewer groups than this. Range 1-300.

## `includeChannels` (type: `boolean`):

Also return the channels found on the way, marked kind = channel. Off: groups only.

## `minMembers` (type: `integer`):

Optional. Keep only groups with at least this many members, e.g. 1000.

## `maxMembers` (type: `integer`):

Optional. Keep only groups with at most this many members, e.g. 50000.

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

Stop after this many results (you are charged only for pushed items)

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

scrape = full results; monitor = only new/changed items since the previous run of this task

## `monitorStateId` (type: `string`):

Optional state id when not running as a saved task (monitor mode)

## `webhookUrl` (type: `string`):

POST a change summary here in monitor mode

## `telegramBotToken` (type: `string`):

Optional: bot token for monitor-mode change summaries

## `telegramChatId` (type: `string`):

Optional: chat id that receives monitor-mode summaries

## Actor input object example

```json
{
  "keywords": [
    "crypto"
  ],
  "resultsPerKeyword": 20,
  "includeChannels": false,
  "maxItems": 20,
  "mode": "scrape"
}
```

# Actor output Schema

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

All pushed rows (dataset, JSON)

## `resultsTable` (type: `string`):

Dataset in the Console viewer

## `runSummary` (type: `string`):

RUN_SUMMARY record

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

// Run the Actor and wait for it to finish
const run = await client.actor("datahamster/telegram-groups-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": ["crypto"],
    "resultsPerKeyword": 20,
    "maxItems": 20,
}

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

```

## MCP server setup

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