# Telegram Members Scraper — Group & Channel Stats (`darknezz/telegram-members-scraper`) Actor

Get the public profile and member size of any public Telegram group or channel without login or API key: chat type, title, description, member/subscriber count, online count, photo and message-preview availability. Ideal for community monitoring, growth tracking and market research.

- **URL**: https://apify.com/darknezz/telegram-members-scraper.md
- **Developed by:** [Oaida Adrian](https://apify.com/darknezz) (community)
- **Categories:** Social media, Lead generation, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Telegram Members Scraper — Group & Channel Stats

Get the **public profile and membership size** of any public Telegram group or channel without login, API keys, phone numbers or proxies. Pass one or more chat usernames and get clean JSON with the chat type, title, description, member/subscriber count, online count, photo and more.

Built for community managers, growth teams and researchers who need to track how big public Telegram communities are — without touching the Telegram API or burning an account.

### Why this Actor

- **No Telegram account needed** — reads the public web profile (`t.me/<chat>`), so there is nothing to authenticate or configure.
- **No API key, no `api_id`/`api_hash`, no bot token, no phone number, no proxy budget.**
- **Groups and channels, one input** — the Actor detects the chat type automatically and returns the right size metric (`members` for groups, `subscribers` for channels).
- **Cheap and fast** — pay only per chat profile read, plus a one-time start fee.

### What it returns (and what it honestly cannot)

Each dataset item is the **public profile of one chat**, including its **membership size**. Telegram deliberately hides member *rosters* (usernames, user IDs, joined dates) from the unauthenticated web surface — the public preview shows only the info card. This Actor returns everything that card exposes:

| Field | Groups | Channels |
|---|---|---|
| `chatType` | `group` | `channel` |
| `chatTitle` / `chatDescription` | ✅ | ✅ |
| `memberCount` | ✅ | — |
| `onlineCount` | ✅ | — |
| `subscriberCount` | — | ✅ |
| `photoUrl` / `profileUrl` | ✅ | ✅ |
| `messagePreviewAvailable` | `false` (no public preview) | `true` (when `/s/` exists) |
| `previewAuthors` | — | distinct accounts on the post preview (usually the channel itself; forwarded posts may surface others) |

> **Why no per-member rows?** Telegram does not expose a member list on the public web. A full roster (IDs, usernames, join dates) requires the authenticated Telegram API — which would contradict this Actor's no-login, no-API-key design. Use this Actor for **community sizing, growth tracking and chat intelligence**; use the official API if you need an actual roster and are authorised for it.

### How it works

Give it a list of public chat usernames (`@DatascienceChats`, `durov`) or links (`t.me/python_community`, `t.me/s/durov`). For each chat the Actor loads the public info page, parses the profile card and — for channels — probes the `/s/` message preview for visible author accounts. Output is **one dataset item per chat**.

### Input

```json
{
  "chats": ["@DatascienceChats", "https://t.me/durov"],
  "checkPreview": true
}
```

| Field | Type | Description |
|---|---|---|
| `chats` | array | Public group/channel usernames (`@name`, `name`) or links (`t.me/name`, `t.me/s/name`) — **required** |
| `checkPreview` | boolean | Probe the `/s/` message preview for channels and collect visible authors (default `true`) |

### Output (one item per chat)

```json
{
  "chatUsername": "DatascienceChats",
  "chatType": "group",
  "chatTitle": "Data Science,ML & AI Nugget Chats",
  "chatDescription": "Discussion community for DS, ML, IOT, AI, DEEP LEARNING and much more…",
  "memberCount": 13871,
  "onlineCount": 380,
  "subscriberCount": null,
  "photoUrl": "https://cdn4.telegram-cdn.org/file/…",
  "profileUrl": "https://t.me/DatascienceChats",
  "messagePreviewAvailable": false,
  "previewAuthors": [],
  "scrapedAt": "2026-08-10T12:00:00+00:00"
}
```

### Use cases

- 📈 **Growth tracking** — chart member/subscriber counts of competitor or topic communities over time.
- 🏷️ **Community segmentation** — classify public groups vs broadcast channels and their relative sizes.
- 🔍 **Market research** — size the Telegram audience for a niche before launching a channel or product.
- 🧹 **Lead-list hygiene** — confirm a group exists, is public, and roughly how many people it reaches before outreach.
- 🤖 **AI / datasets** — build metadata corpora of public Telegram communities for classification and analytics.

### Run it from the API

Trigger the Actor and get results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/darknezz~telegram-members-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"chats":["@DatascienceChats","durov"]}'
```

**Scheduling:** attach an Apify Schedule (e.g. weekly) to keep a growth-tracking dataset topped up automatically.

### Limitations

- Only **public** chats can be read. Private groups/channels are not accessible without authentication.
- **No member roster.** Telegram hides member lists from the public web; the Actor returns the membership *size* and chat profile, not per-user rows. A roster requires the authenticated Telegram API.
- Counts are as displayed on the public profile at scrape time (Telegram rounds large numbers, e.g. `13.9K` → `13900`).
- `messagePreviewAvailable` is only meaningful for channels; group `/s/` URLs redirect to the info page by design.

### Pricing

Pay per event: a small fee for each chat profile extracted, plus Apify's standard platform events (actor start + dataset item). No subscription — you pay only for what you run.

### FAQ

**Do I need a Telegram account, bot token or `api_id`?** No — the Actor reads the public web profile, so there is nothing to authenticate.

**Can it scrape private groups or channels?** No. Only public chats that expose a `t.me/<name>` profile can be read.

**Where is the member list?** Telegram does not publish member rosters on the web. The Actor returns the member/subscriber **count** from the public info card. Getting actual member records requires the Telegram API (login + `api_id`/`api_hash`), which this Actor deliberately avoids.

**Why does a channel have `subscriberCount` but no `memberCount`?** Channels have subscribers, not members — Telegram exposes only the subscriber count publicly. Groups expose member + online counts.

**Do I need a proxy?** No. The public profile is reachable directly over HTTPS — no proxy or residential IP budget required.

**Is scraping this legal?** The profile is public and unauthenticated. You are responsible for complying with Telegram's terms and any privacy laws (e.g. GDPR) that apply to how you store and use the data.

# Actor input Schema

## `chats` (type: `array`):

Public Telegram group or channel usernames or t.me links (e.g. '@DatascienceChats', 'https://t.me/durov'). Private chats cannot be read.

## `checkPreview` (type: `boolean`):

Also probe the public /s/ message preview for channels and collect visible author accounts. Groups redirect the preview, so this only applies to channels.

## Actor input object example

```json
{
  "chats": [
    "@DatascienceChats",
    "durov"
  ],
  "checkPreview": true
}
```

# Actor output Schema

## `results` (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 = {
    "chats": [
        "@DatascienceChats",
        "durov"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("darknezz/telegram-members-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 = { "chats": [
        "@DatascienceChats",
        "durov",
    ] }

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

```

## MCP server setup

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