# Telegram Members Scraper (`lofomachines/telegram-member-scraper`) Actor

Scrape group members from any telegram group. Export public Telegram group messages or discover and profile a group's members. Clean, structured, fast and cheap. No API or Login required.

- **URL**: https://apify.com/lofomachines/telegram-member-scraper.md
- **Developed by:** [Lofomachines](https://apify.com/lofomachines) (community)
- **Categories:** Developer tools, Social media, Lead generation
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Group Scraper – Messages & Members Export 🚀

**Turn any public Telegram group into clean, structured data in minutes.** Export the latest group messages, or automatically discover a group's most active members and get a ready-to-use profile for each one — **no login, no phone number, no Telegram account required.**

Whether you're doing market research, community analysis, lead generation, or trend monitoring, this Telegram scraper gives you organized, spreadsheet-ready results you can push straight into your CRM, data warehouse, or automation workflow.

---

### ✅ What this Actor does

This Actor works in **two simple modes** — pick one, paste a public group link, choose how many results you want, and run:

#### 1. 📨 Group Messages
Export the most recent public messages from a Telegram group as a clean dataset. Each message includes the text, the date, the sender's handle and name, whether it contains media, whether it's a reply or a forward, and the group it belongs to.

Perfect for:
- Tracking conversations, sentiment and trending topics inside a community
- Building datasets for research, analytics or AI training
- Monitoring announcements, alpha, deals or signals in real time
- Archiving public discussions for compliance or reporting

#### 2. 👥 Active Members
Automatically identify a group's **most active members** and build a rich public profile for each of them — including display name, handle, bio, profile photo and a direct public link.

Perfect for:
- Building targeted outreach and lead lists from niche communities
- Finding influencers, power users and community champions
- Audience research and competitor community analysis
- Growing partnerships, ambassador programs and B2B pipelines

---

### 💡 Popular use cases

| Who | How they use it |
| --- | --- |
| **Growth & sales teams** | Discover engaged members in relevant communities and build warm outreach lists |
| **Market researchers** | Analyze what real people discuss in industry, crypto, gaming or trading groups |
| **Community managers** | Spot the most active contributors and understand engagement |
| **Recruiters** | Find active specialists inside professional and niche groups |
| **Analysts & data teams** | Feed clean Telegram data into dashboards, models and reports |
| **Founders & marketers** | Validate demand and monitor conversations around a topic or brand |

---

### 🧾 Input

You only need to fill in a few simple fields — no technical setup.

| Field | Description |
| --- | --- |
| **Mode** | Choose **Group messages** or **Active members** |
| **Telegram group URLs** | One or more public group links, e.g. `https://t.me/YourGroup` (a `@handle` also works). Add as many as you like — they are processed one after another into a single dataset. |
| **Number of results per group** | How many messages to export, or how many member profiles to build, for **each** group |

#### Example input

```json
{
  "mode": "members",
  "groupUrls": [
    "https://t.me/GainsChat",
    "https://t.me/AnotherGroup"
  ],
  "maxItems": 1000
}
````

***

### 📤 Output

Results are stored in a clean, structured dataset that you can export to **JSON, CSV, Excel, or via API**.

#### Example — Group Messages

```json
{
  "messageId": 657904,
  "date": "2026-07-11T09:57:07+00:00",
  "text": "Example message",
  "senderUsername": "example_user",
  "senderName": "Example User",
  "hasMedia": false,
  "mediaType": null,
  "isReply": false,
  "isForwarded": false,
  "groupTitle": "GAINS Chat",
  "groupUrl": "https://t.me/GainsChat"
}
```

#### Example — Active Members

```json
{
  "username": "example_user",
  "handle": "@example_user",
  "profileUrl": "https://t.me/example_user",
  "name": "Example User",
  "bio": "Crypto trader & community builder",
  "profilePhotoUrl": "https://cdn.telegram.org/.../photo.jpg",
  "messagesInGroup": 42,
  "lastActiveDate": "2026-07-11T09:57:07+00:00",
  "sourceGroupTitle": "GAINS Chat",
  "sourceGroupUrl": "https://t.me/GainsChat"
}
```

***

### 🔗 Integrations & automation

This Actor plugs directly into your favorite tools. Combine it with **[n8n](https://n8n.io)**, **[Make](https://www.make.com)**, or **[Zapier](https://zapier.com)** to:

- Automatically send new leads into Google Sheets, Airtable, Notion or a CRM (HubSpot, Pipedrive, Salesforce)
- Trigger Slack or email alerts when new messages match a keyword
- Schedule recurring runs to keep your dataset fresh
- Sync results into your data warehouse via the Apify API and webhooks

You can also call it programmatically with the **Apify API**, official **JavaScript / Python SDKs**, or the **Apify MCP Server** for AI agents.

***

### ⚡ Why choose this Actor

- **No account or login required** — just a public group link
- **Two tools in one** — messages export *and* active member profiling
- **Clean, consistent output** — no clutter, ready for spreadsheets and CRMs
- **Fast & scalable** — optimized to handle large groups efficiently
- **Pay only for what you use** — run 10 results or 10,000

***

### 🧩 More tools you may like

Explore other Actors built by the same author to supercharge your data and lead-generation workflows:

- 🔎 **[Telegram Keyword Search Scraper](https://apify.com/lofomachines/telegram-keyword-search-scraper)** — find public Telegram groups, channels and posts by keyword
- 🎯 **[Social Media Lead Finder](https://apify.com/lofomachines/fresh-lead-finder)** — find interested people in real time across social platforms
- 🕵️ **[Watson – Username Finder](https://apify.com/lofomachines/watson)** — check a username across hundreds of sites
- 🖼️ **[Social Avatar Finder](https://apify.com/lofomachines/social-avatar-finder)** — reverse image search to match profiles and avatars
- 📇 **[Contact Extractor](https://apify.com/lofomachines/contact-extractor)** — extract emails, phones and social links from any website

***

### ❓ FAQ

**Do I need a Telegram account or API key?**
No. You only need the public group URL.

**Which groups are supported?**
Public Telegram groups. Private groups and broadcast channels are not supported.

**In what format can I get the data?**
JSON, CSV, Excel, HTML or via the Apify API — whatever fits your workflow.

**Can I automate or schedule it?**
Yes. Use Apify Schedules, webhooks, or connect it to n8n, Make and Zapier.

***

#### ⚠️ Fair use

Use this Actor responsibly and in compliance with applicable laws and platform terms. Only public data is processed. You are responsible for how you use the collected data, including any privacy and marketing regulations that apply to you.

# Actor input Schema

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

Choose the type of data you want. "Group messages" exports the latest public messages from the group. "Active members" identifies the group's most active members and builds a public profile for each of them.

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

Enter public Telegram group URLs in this format: https://t.me/YourGroup

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

How many results you want for each group. In "Group messages" mode this is the number of messages to export per group. In "Active members" mode this is the number of member profiles to build per group.

## Actor input object example

```json
{
  "mode": "messages",
  "groupUrls": [
    "https://t.me/GainsChat"
  ],
  "maxItems": 50
}
```

# Actor output Schema

## `overview` (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 = {
    "groupUrls": [
        "https://t.me/GainsChat"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lofomachines/telegram-member-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 = { "groupUrls": ["https://t.me/GainsChat"] }

# Run the Actor and wait for it to finish
run = client.actor("lofomachines/telegram-member-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "groupUrls": [
    "https://t.me/GainsChat"
  ]
}' |
apify call lofomachines/telegram-member-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lofomachines/telegram-member-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Telegram Members Scraper",
        "description": "Scrape group members from any telegram group. Export public Telegram group messages or discover and profile a group's members. Clean, structured, fast and cheap. No API or Login required.",
        "version": "0.1",
        "x-build-id": "drOTK7mjB3bhxwdeZ"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lofomachines~telegram-member-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lofomachines-telegram-member-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/lofomachines~telegram-member-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lofomachines-telegram-member-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/lofomachines~telegram-member-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lofomachines-telegram-member-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "mode",
                    "groupUrls",
                    "maxItems"
                ],
                "properties": {
                    "mode": {
                        "title": "What do you want to collect?",
                        "enum": [
                            "messages",
                            "members"
                        ],
                        "type": "string",
                        "description": "Choose the type of data you want. \"Group messages\" exports the latest public messages from the group. \"Active members\" identifies the group's most active members and builds a public profile for each of them.",
                        "default": "messages"
                    },
                    "groupUrls": {
                        "title": "Telegram group URLs",
                        "minItems": 1,
                        "maxItems": 10,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Enter public Telegram group URLs in this format: https://t.me/YourGroup",
                        "items": {
                            "type": "string",
                            "pattern": "^https://t\\.me/[A-Za-z0-9_]+/?$"
                        }
                    },
                    "maxItems": {
                        "title": "Number of results per group",
                        "minimum": 50,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "How many results you want for each group. In \"Group messages\" mode this is the number of messages to export per group. In \"Active members\" mode this is the number of member profiles to build per group.",
                        "default": 50
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
