# Telegram Member Scraper (`agentx/telegram-member-scraper`) Actor

Telegram member scraper for public groups, returning 23-field profiles from the visible participant list and optional message-author discovery. Export IDs, usernames, names, public flags, presence, bot facts, discovery path, and source-group context.

- **URL**: https://apify.com/agentx/telegram-member-scraper.md
- **Developed by:** [AgentX](https://apify.com/agentx) (community)
- **Categories:** Social media, Lead generation, Agents
- **Stats:** 1,287 total users, 48 monthly users, 100.0% runs succeeded, 16 bookmarks
- **User rating**: 4.80 out of 5 stars

## Pricing

from $0.60 / 1,000 results

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?

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 Member Scraper is a telegram member scraper that exports unique profiles from a public group's visible participant list and, when enabled, from the authors in its message history.** Each Dataset row uses a reviewed 23-field sparse contract and retains the source group and discovery path.

[![Apify Users](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.apify.com%2Fv2%2Facts%2Fagentx~telegram-member-scraper\&query=%24.data.stats.totalUsers\&style=for-the-badge\&label=Apify%20Users\&color=ff9013)](https://apify.com/agentx/telegram-member-scraper) [![Apify Runs](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.apify.com%2Fv2%2Facts%2Fagentx~telegram-member-scraper\&query=%24.data.stats.totalRuns\&style=for-the-badge\&label=Apify%20Runs\&color=ff9013)](https://apify.com/agentx/telegram-member-scraper) [![price](https://img.shields.io/badge/%240.00080%20%2F%20result-4285f4?style=for-the-badge)](https://apify.com/agentx/telegram-member-scraper/pricing) [![capability](https://img.shields.io/badge/23%20profile%20fields-34a853?style=for-the-badge)](https://console.apify.com/actors/agentx~telegram-member-scraper/input) [![API + MCP ready](https://img.shields.io/badge/API%20%2B%20MCP%20ready-fbbc05?style=for-the-badge)](https://apify.com/agentx/telegram-member-scraper/api)

- **Two discovery paths.** Read the participant list first and optionally scan distinct message authors.
- **Traceable profiles.** Keep group ID, username, title, reported size, hidden-list flag, and `found_in` on every row.
- **Current public account facts.** Return usernames, names, public status flags, presence, colors, emoji status, monetization, and bot information.
- **Incremental persistence.** Deduplicate by Telegram user ID and save small batches while collection continues.

At FREE-tier prices, one start plus one member Result costs **$0.01080**.

### Why Choose Telegram Member Scraper

**Hidden participant lists need a second discovery path.** Telegram often exposes only a small visible sample from a large supergroup. With `deep_search` enabled, the Actor continues through message history and treats each distinct author as a discoverable account. This does not reconstruct a complete hidden roster, but it can reach active participants that the list endpoint does not expose.

**Every profile stays attached to its source.** Group identifiers and `found_in` make it possible to merge several authorized exports without losing provenance. A row found in both passes is emitted once because deduplication uses the stable numeric account ID.

**Sparse output avoids invented data.** The 23-field contract omits unavailable values instead of filling them with false, zero, or empty placeholders. Requesting-account relationships, private read state, access hashes, file references, and transport credentials are excluded.

**Long work remains useful.** Results flush in batches of five. If a source account rotates, a run stops, or the timeout arrives after some work, already pushed rows remain in the default Dataset.

### Quick Start Guide

The smallest source example returns one listed member from a public group:

```json
{
  "deep_search": true,
  "max_results": 1,
  "telegram_url": "https://t.me/DatascienceChats"
}
```

Run the Actor, open the default Dataset, and inspect `id`, `username`, `found_in`, `group_title`, and `processed_at`. A one-row test validates the source and contract without committing to a long history scan.

Then compare shallow and deep modes on the same authorized group. Set `deep_search` to `false` for only the visible participant list. Enable it when you need active message authors after that list is exhausted. Start with 10 results before scaling and compare the returned count with the request.

There is no schema maximum, but reachable members, source visibility, history depth, account rotation, and run timeout still bound completion.

### Input Parameters

**Three required inputs define discovery mode, row ceiling, and the public group.**

| Input | Type | Rules | Example |
| --- | --- | --- | --- |
| `deep_search` | boolean | Include message-author discovery after the visible list | `true` |
| `max_results` | integer | Minimum 1; free requests cap at 10 | `1` |
| `telegram_url` | string | Public username, `@handle`, or canonical Telegram URL | `https://t.me/DatascienceChats` |

Canonical `t.me` and `telegram.me` username URLs are accepted. Private invite links, `joinchat` and plus-style URLs, foreign hosts, unrelated paths, and broadcast channels are rejected. A channel has subscribers rather than an exposed group-member path; use its linked discussion group when appropriate.

`max_results` counts unique publishable profiles, not raw list entries or messages. Message history may contain repeated authors, service messages, deleted accounts, and objects that do not meet the publishability contract.

### Output Data Schema

The Dataset contains 23 possible top-level fields:

| Area | Fields |
| --- | --- |
| Group provenance | `group_id`, `group_username`, `group_title`, `group_member_count`, `group_members_hidden`, `found_in` |
| Account identity | `id`, `username`, `usernames`, `source_url`, `first_name`, `last_name`, `type` |
| Public state | `has_photo`, `flags`, `restrictions`, `last_seen`, `colors`, `emoji_status`, `monetization`, `bot_info` |
| Processing | `processor`, `processed_at` |

```json
{
  "group_id": 1013954462,
  "group_username": "DatascienceChats",
  "group_title": "Data Science, ML & AI Chats",
  "group_member_count": 13854,
  "group_members_hidden": true,
  "found_in": "participants",
  "id": 1036017898,
  "username": "example_user",
  "usernames": ["example_user"],
  "source_url": "https://t.me/example_user",
  "first_name": "Example",
  "type": "user",
  "has_photo": true,
  "flags": ["premium"],
  "last_seen": "recently",
  "processor": "https://apify.com/agentx/telegram-member-scraper",
  "processed_at": "2026-08-12T13:00:00+00:00"
}
```

Example values illustrate shape only. Counts, handles, names, flags, and presence can change between runs. A message author may have left the group; `found_in=messages` proves authorship in scanned history, not current membership.

### Integration Examples

Actor ID `PSRx5Q0FWQwgLpfuL` is used by the public API. Run synchronously for a small result set:

```bash
curl -X POST "https://api.apify.com/v2/acts/agentx~telegram-member-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"deep_search":true,"max_results":1,"telegram_url":"https://t.me/DatascienceChats"}'
```

For a larger export, start asynchronously, poll the run, and fetch the default Dataset. Keep tokens in a secret manager and avoid logging them.

```json
{
  "actor": "agentx/telegram-member-scraper",
  "input": {
    "deep_search": true,
    "max_results": 1,
    "telegram_url": "https://t.me/DatascienceChats"
  }
}
```

The same payload works through Apify MCP, schedules, webhooks, Make, n8n, and custom clients. Use `maxTotalChargeUsd` when unattended jobs need a spending ceiling.

### Pricing

Telegram Member Scraper charges one Actor Start plus one Result event for each member profile written to the default dataset.

| Event | FREE | BRONZE | SILVER | GOLD | PLATINUM | DIAMOND |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| Actor Start | $0.01000 | $0.01000 | $0.01000 | $0.01000 | $0.01000 | $0.01000 |
| Result | $0.00080 | $0.00072 | $0.00064 | $0.00060 | $0.00060 | $0.00060 |

A Result is one saved member profile. One FREE result costs `$0.01 + 1 × $0.00080 = $0.01080`; 100 Results cost $0.09000. Runs that return fewer profiles create fewer Result events. Actual charges follow emitted events and current published pricing.

### Use Cases

**Public community research:** collect a bounded sample of visible or active accounts with source-group provenance.

**Cross-group analysis:** export authorized public groups separately and join by numeric account ID while retaining each group's context.

**Bot and moderation review:** identify public bot labels, trust flags, restriction reasons, and message-author discovery paths for human review.

**Audience sampling:** compare the visible participant sample with distinct recent authors without claiming either is a complete current roster.

**Structured export:** load the stable sparse contract into JSON, CSV, Excel, a database, or an enrichment workflow.

### Alternatives

Use Telegram Info Scraper when you already have identifiers and need entity details rather than group discovery. Use Telegram Chat Scraper for messages, reactions, topics, and media. Use Telegram Private Group Scraper only for a separately authorized authenticated content workflow.

Telegram's native client is better for occasional manual inspection. This Actor is useful for repeatable Dataset rows, bounded automation, API access, schedules, and cross-run provenance.

No public tool can reconstruct every hidden member, prove current membership from old authorship, or bypass private-group access.

### Limits and Troubleshooting

- **Only a few listed members:** enable Deep Search; Telegram may expose only a visible sample.
- **Fewer profiles than requested:** the group may have fewer reachable accounts, history may repeat authors, or source work may end early.
- **Channel rejected:** use a discussion group rather than a broadcast channel.
- **Group unreadable:** verify the public username and remove invite or unrelated URL parts.
- **Long deep scan:** lower `max_results`, narrow the operational window with a smaller job, and preserve completed Dataset batches.
- **Missing username or presence:** the account may not publish it. Do not replace absence with a guess.

Keep the run ID when contacting support and compare the request, saved rows, group identity, and discovery paths.

### Trust and Reliability

The design was validated against visible-list and message-author modes, minimum and larger result targets, URL variants, invalid inputs, account rotation, forced stop, 128 MiB Docker limits, Dataset quality, and margin. A new August 12, 2026 regression returned one listed member from the public example in 16.4 seconds.

Telegram remains the source of group identity, list visibility, account facts, and message history. The Actor reports what was reachable at processing time. Store run success does not prove every requested profile was available.

### Legal and Compliance

Collect only data you are authorized to process. Follow Telegram's terms, privacy and data-protection law, copyright, contractual restrictions, and retention duties.

Do not use member or author data for harassment, surveillance, doxxing, unsolicited outreach, sensitive profiling, or discriminatory decisions. A username, flag, presence state, or message-history appearance does not establish identity, consent, safety, or current membership.

Minimize retention, protect exports, honor deletion obligations, and verify consequential facts at the original Telegram surface.

### Frequently Asked Questions

#### How can I scrape telegram group members?

Use a public username-addressable group, choose a result limit, and enable Deep Search when you need message-author discovery beyond the visible participant sample.

#### Can I export telegram members to csv?

Yes. Apify can export the default Dataset as CSV, JSON, Excel, XML, and other supported formats. Sparse fields remain empty where Telegram did not expose them.

#### Is the export a complete member roster?

No. Telegram can hide most of the list, and message authors are only the people who posted in scanned history. Silent members may remain unreachable.

#### Are message authors definitely current members?

No. They authored a message in the group history but may have left later. Retain `found_in` and interpret it correctly.

#### Are bots included?

Yes when discovered and publishable. `type` and `bot_info` distinguish available public bot facts.

#### Why is a field missing?

The field may not apply, may be private, or may not be returned in that response. The sparse contract avoids fabricating a value.

### Related AgentX Actors

AgentX has a broad Actor catalog. Start with the three closest Telegram tools below, then browse the generated catalog by category.

Closest to this Actor:

- [Telegram Chat Scraper](https://apify.com/agentx/telegram-chat-scraper) exports public messages with media and engagement context.
- [Telegram Info Scraper](https://apify.com/agentx/telegram-info-scraper) resolves supplied Telegram entities without group discovery.
- [Telegram Private Group Scraper](https://apify.com/agentx/telegram-private-group-scraper) covers a separately authenticated private-content workflow.

#### Business and Market Intelligence

- **[Google Keyword Trends](https://apify.com/agentx/google-keyword-trends)** — Google Trends keyword interest, compared five at a time
- **[Google Trends Scraper](https://apify.com/agentx/google-trends-scraper)** — Google Trends trending searches
- **[Google Maps Store Scraper](https://apify.com/agentx/google-maps-store-scraper)** — Google Maps business listings
- **[LinkedIn Company Lookup](https://apify.com/agentx/linkedin-company-lookup)** — LinkedIn company records
- **[LinkedIn Profile Lookup](https://apify.com/agentx/linkedin-profile-lookup)** — LinkedIn profile records
- **[Weather Forecast API](https://apify.com/agentx/weather-forecast-api)** — forecast and historical weather data

#### Jobs and Hiring

- **[All Jobs Scraper](https://apify.com/agentx/all-jobs-scraper)** — multi-platform job listings
- **[Bayt Jobs Scraper](https://apify.com/agentx/bayt-jobs-scraper)** — Bayt job listings
- **[Glassdoor Jobs Scraper](https://apify.com/agentx/glassdoor-jobs-scraper)** — Glassdoor job listings
- **[Indeed Jobs Scraper](https://apify.com/agentx/indeed-jobs-scraper)** — Indeed job listings
- **[JobStreet Company Profile](https://apify.com/agentx/jobstreet-company-profile)** — JobStreet employer records
- **[Jooble Jobs Scraper](https://apify.com/agentx/jooble-jobs-scraper)** — Jooble job listings
- **[LinkedIn Jobs Scraper](https://apify.com/agentx/linkedin-jobs-scraper)** — LinkedIn job listings
- **[Naukri Jobs Scraper](https://apify.com/agentx/naukri-jobs-scraper)** — Naukri job listings
- **[Talent Jobs Scraper](https://apify.com/agentx/talent-jobs-scraper)** — Talent.com job listings
- **[ZipRecruiter Jobs Scraper](https://apify.com/agentx/ziprecruiter-jobs-scraper)** — ZipRecruiter job listings

#### Social Media

- **[Instagram Creator Scraper](https://apify.com/agentx/instagram-creator-scraper)** — Instagram creator profiles
- **[Instagram Reels Scraper](https://apify.com/agentx/instagram-reels-scraper)** — Instagram Reels metadata
- **[Instagram Trending Scraper](https://apify.com/agentx/instagram-trending-scraper)** — Instagram trending content
- **[Medium Scraper](https://apify.com/agentx/medium-scraper)** — Medium articles
- **[Medium Profile Scraper](https://apify.com/agentx/medium-profile-scraper)** — Medium author profiles
- **[Reddit Profile Scraper](https://apify.com/agentx/reddit-profile-scraper)** — Reddit user profiles
- **[Reddit Viral Scraper](https://apify.com/agentx/reddit-viral-scraper)** — Reddit viral posts
- **[SubReddit Info Scraper](https://apify.com/agentx/subreddit-info-scraper)** — subreddit metadata
- **[Subreddit Members Scraper](https://apify.com/agentx/subreddit-members-scraper)** — subreddit member lists
- **[Subreddit Posts Scraper](https://apify.com/agentx/subreddit-posts-scraper)** — subreddit post feeds
- **[Telegram Chat Scraper](https://apify.com/agentx/telegram-chat-scraper)** — Telegram chat messages
- **[Telegram Info Scraper](https://apify.com/agentx/telegram-info-scraper)** — Telegram channel metadata
- **[Telegram Member Adder](https://apify.com/agentx/telegram-member-adder)** — Telegram group membership management
- **[Telegram Private Group Scraper](https://apify.com/agentx/telegram-private-group-scraper)** — private Telegram group data
- **[TikTok Creator API](https://apify.com/agentx/tiktok-creator-api)** — TikTok creator profiles
- **[TikTok User Lookup](https://apify.com/agentx/tiktok-user-lookup)** — TikTok account records
- **[X Twitter Community API](https://apify.com/agentx/x-twitter-community-api)** — X community data
- **[X Twitter Profile Lookup](https://apify.com/agentx/x-twitter-profile-lookup)** — X profile records
- **[YouTube Creator Email Scraper](https://apify.com/agentx/youtube-creator-email-scraper)** — YouTube creator contact data

#### Video, Transcripts and Downloads

- **[All Video Scraper](https://apify.com/agentx/all-video-scraper)** — multi-platform video metadata
- **[Video Transcript](https://apify.com/agentx/video-transcript)** — multi-platform transcripts
- **[Video Captions Downloader](https://apify.com/agentx/video-captions-downloader)** — caption files
- **[Video to Social Post](https://apify.com/agentx/video-to-social-post)** — video repurposed into social copy
- **[YouTube Transcript](https://apify.com/agentx/youtube-transcript)** — YouTube transcripts
- **[TikTok Transcript](https://apify.com/agentx/tiktok-transcript)** — TikTok transcripts
- **[X Twitter Transcript](https://apify.com/agentx/x-twitter-transcript)** — X video transcripts
- **[Facebook Transcript](https://apify.com/agentx/facebook-transcript)** — Facebook video transcripts
- **[Bilibili Transcript](https://apify.com/agentx/bilibili-transcript)** — Bilibili transcripts
- **[Dailymotion Transcript](https://apify.com/agentx/dailymotion-transcript)** — Dailymotion transcripts
- **[Rutube Transcript](https://apify.com/agentx/rutube-transcript)** — Rutube transcripts
- **[Loom Transcript](https://apify.com/agentx/loom-transcript)** — Loom transcripts
- **[Wistia Transcript](https://apify.com/agentx/wistia-transcript)** — Wistia transcripts
- **[Instagram Reels Downloader](https://apify.com/agentx/instagram-reels-downloader)** — Reels downloads
- **[Kick Clip Downloader](https://apify.com/agentx/kick-clip-downloader)** — Kick clip downloads
- **[Linkedin Video Downloader](https://apify.com/agentx/linkedin-video-downloader)** — LinkedIn video downloads
- **[Pinterest Video Downloader](https://apify.com/agentx/pinterest-video-downloader)** — Pinterest video downloads
- **[Reddit Video Downloader](https://apify.com/agentx/reddit-video-downloader)** — Reddit video downloads
- **[Snapchat Video Downloader](https://apify.com/agentx/snapchat-video-downloader)** — Snapchat video downloads
- **[TED Talk Downloader](https://apify.com/agentx/ted-talk-downloader)** — TED talk downloads
- **[TikTok Live Downloader](https://apify.com/agentx/tiktok-live-downloader)** — TikTok live downloads
- **[Twitch VOD Downloader](https://apify.com/agentx/twitch-vod-downloader)** — Twitch VOD downloads
- **[Zoom Recording Downloader](https://apify.com/agentx/zoom-recording-downloader)** — Zoom recording downloads

#### E-Commerce and Retail

- **[All Shopping Scraper](https://apify.com/agentx/all-shopping-scraper)** — multi-platform product data
- **[AliExpress Product Scraper](https://apify.com/agentx/aliexpress-product-scraper)** — AliExpress products
- **[Amazon Storefront Scraper](https://apify.com/agentx/amazon-storefront-scraper)** — Amazon Brand Store pages
- **[Bol Product Scraper](https://apify.com/agentx/bol-product-scraper)** — Bol.com products
- **[eBay Seller Leads API](https://apify.com/agentx/ebay-seller-leads-api)** — eBay seller records
- **[Hepsiburada Product Scraper](https://apify.com/agentx/hepsiburada-product-scraper)** — Hepsiburada products
- **[Kakaku Product Scraper](https://apify.com/agentx/kakaku-product-scraper)** — Kakaku.com products
- **[Rakuten Product Scraper](https://apify.com/agentx/rakuten-product-scraper)** — Rakuten products

#### Classifieds and Automotive

- **[All Vehicle Scraper](https://apify.com/agentx/all-vehicle-scraper)** — multi-platform vehicle listings
- **[AutoTrader Vehicle Search](https://apify.com/agentx/autotrader-vehicle-search)** — AutoTrader US listings
- **[AutoTrader UK Vehicle Search](https://apify.com/agentx/autotrader-uk-vehicle-search)** — AutoTrader UK listings

#### Real Estate

- **[All Property Scraper](https://apify.com/agentx/all-property-scraper)** — multi-platform property listings
- **[Homes Property Scraper](https://apify.com/agentx/homes-property-scraper)** — Homes.com listings
- **[MagicBricks Property Scraper](https://apify.com/agentx/magicbricks-property-scraper)** — MagicBricks listings
- **[NoBroker Property Scraper](https://apify.com/agentx/nobroker-property-scraper)** — NoBroker listings
- **[Property24 Property Scraper](https://apify.com/agentx/property24-property-scraper)** — Property24 listings
- **[Realtor Property Scraper](https://apify.com/agentx/realtor-property-scraper)** — Realtor.com listings
- **[Zillow Property Scraper](https://apify.com/agentx/zillow-property-scraper)** — Zillow listings

### Support and Community

Ask the AgentX team in the [Telegram community](https://t.me/Apify_Actor) with the Actor name, run ID, sanitized group URL, input mode, requested count, returned count, and discovery-path summary. Never post tokens or private identifiers.

AgentX is an Arcyton brand — [arcyton.com](https://arcyton.com).

**Last Updated:** August 12, 2026

# Actor input Schema

## `deep_search` (type: `boolean`):

Also collect members from the people who posted in the group. Telegram hides the participant list on most groups, so without this a run returns only the few dozen members the group still exposes. Leave it on unless you specifically want just that visible list.

## `max_results` (type: `integer`):

Members to return, minimum 1. Telegram hides the participant list on most groups, so the visible list alone returns only a few dozen people however large the group is — measured at 22 of 5,396 and 38 of 26,305. Turn on Deep Search to read members from the group's message history, which is what reaches larger numbers: measured at 5 to 10 members per second, depending on how many distinct people post. Rows are saved as they are found, so a run that hits its timeout keeps everything already returned.

## `telegram_url` (type: `string`):

Public Telegram group as a username, @username, t.me username URL, or telegram.me username URL. Invite, joinchat, plus-style, private, and non-Telegram links are rejected.

## Actor input object example

```json
{
  "deep_search": true,
  "max_results": 1,
  "telegram_url": "https://t.me/DatascienceChats"
}
```

# Actor output Schema

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

Telegram member profiles with public identity, source group, discovery path, profile state, bot details, and processing timestamps.

# 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 = {
    "deep_search": true,
    "max_results": 1,
    "telegram_url": "https://t.me/DatascienceChats"
};

// Run the Actor and wait for it to finish
const run = await client.actor("agentx/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 = {
    "deep_search": True,
    "max_results": 1,
    "telegram_url": "https://t.me/DatascienceChats",
}

# Run the Actor and wait for it to finish
run = client.actor("agentx/telegram-member-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 '{
  "deep_search": true,
  "max_results": 1,
  "telegram_url": "https://t.me/DatascienceChats"
}' |
apify call agentx/telegram-member-scraper --silent --output-dataset

```

## MCP server setup

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