# Subreddit Members Scraper (`agentx/subreddit-members-scraper`) Actor

Subreddit members scraper that lists active users in any community — username, karma, account age & 23 public profile fields per person. Activity-derived from recent posts and comments, not the official subscriber roster. From $3.75 per 1,000 profiles with tier discounts.

- **URL**: https://apify.com/agentx/subreddit-members-scraper.md
- **Developed by:** [AgentX](https://apify.com/agentx) (community)
- **Categories:** Social media, Lead generation, Agents
- **Stats:** 15 total users, 2 monthly users, 100.0% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $3.75 / 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

**Subreddit Members Scraper is a subreddit members scraper that discovers recent post and comment authors in one Reddit community and returns activity-derived public profiles.** It does not claim to expose Reddit's private subscriber roster.

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

- **Two required inputs** choose one community and a profile target.
- **25 top-level fields** cover identity, karma, account flags, trophies, moderated communities, and provenance.
- **Post and comment discovery** finds visible contributors rather than only post submitters.
- **Incremental Dataset writes** preserve completed profiles when a large run reaches a source or time limit.

The smallest useful FREE-tier run requests one profile. At the minimum start charge, one Actor Start plus one Result costs at most **$0.01500**.

### Why Choose Subreddit Members Scraper

**Activity-derived contributor discovery.** Start from a known community and find public accounts that recently authored visible posts or comments.

**Profile enrichment in one workflow.** Each readable username is resolved into public identity, karma, age, account flags, trophies, and moderated-community facts.

**Honest coverage boundaries.** The Actor never labels its output as subscribers, members who joined, readers, or a complete community population.

**Source-faithful media.** Avatar, banner, and trophy icons use stable run key-value-store URLs after a successful save and retain their public source URLs if a save fails.

### Quick Start Guide

**Use the verified minimum workload for a recurring liveness test.**

```json
{
  "community": "learnprogramming",
  "max_results": 1
}
```

1. Enter a plain subreddit name, `r/name` path, or standard Reddit community URL.
2. Choose how many readable contributor profiles to request.
3. Start the run and read the default Dataset.

This prefill returns one profile in about 55 seconds. Live source data and duration can change.

### Input Parameters

**Both fields are required and the user's requested target is respected.**

| Field | Type | Limits | Prefill | Meaning |
|---|---|---|---|---|
| `community` | string | Valid Reddit community name/path/URL | `learnprogramming` | Community whose recent visible activity is scanned. |
| `max_results` | integer | Minimum 1; no hard schema maximum | `1` | Maximum readable profiles requested. |

There is no hidden 400-profile cap. Larger requests depend on visible activity, readable accounts, proxy reach, and the run timeout. Query strings, fragments, user URLs, post URLs, malformed hosts, booleans, strings in place of integers, and values below 1 are rejected.

### Output Data Schema

**Each Dataset row is one public Reddit profile for an author discovered in the requested community's recent activity.** Optional fields can be absent when the source does not expose them.

| Group | Fields |
|---|---|
| Identity | `id`, `name`, `username`, `url`, `avatar`, `banner`, `about`, `created` |
| Source flags | `verified`, `verified_email`, `snoovatar`, `accept_followers`, `is_premium`, `is_employee`, `is_moderator`, `is_suspended`, `over_18`, `robots_hidden` |
| Karma | `post_karma`, `comment_karma`, `total_karma` |
| Nested resources | `trophies`, `moderated` |
| Provenance | `processor`, `processed_at` |

`trophies` documents seven nested fields: `id`, `award_id`, `name`, `url`, `icon`, `granted`, and `description`. `moderated` documents eleven: `id`, `name`, `url`, `title`, `type`, `subscribers`, `created`, `over_18`, `quarantine`, `primary_color`, and `key_color`.

```json
{
  "id": "example-id",
  "username": "example_author",
  "url": "https://www.reddit.com/user/example_author/",
  "post_karma": 1250,
  "comment_karma": 4870,
  "total_karma": 6120,
  "is_moderator": false,
  "trophies": [],
  "moderated": [],
  "processed_at": "2026-08-12T12:58:59+00:00"
}
```

An empty nested array means the public panel returned no values. An unavailable optional value can be omitted; absence is not the same as `false`, zero, or an empty string.

### Integration Examples

The HTTP, Python, JavaScript, Make.com, n8n, and MCP examples all call `agentx/subreddit-members-scraper` with the same one-profile scenario. Keep tokens in secrets and bound charges.

#### Actor ID

```text
lFt4Jcm2UW4qUUJpo
```

Also addressable by name as `agentx/subreddit-members-scraper` — both forms work in the API, the SDKs, Make.com, and n8n.

#### HTTP

```bash
curl -X POST "https://api.apify.com/v2/acts/agentx~subreddit-members-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"community":"learnprogramming","max_results":1}'
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("agentx/subreddit-members-scraper").call(
    run_input={"community": "learnprogramming", "max_results": 1},
    max_total_charge_usd=0.015,
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["username"], item.get("total_karma"))
```

#### JavaScript

```javascript
import { ApifyClient } from "apify-client";

const client = new ApifyClient({ token: "YOUR_API_TOKEN" });

const run = await client.actor("agentx/subreddit-members-scraper").call({
  community: "learnprogramming",
  max_results: 1,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => console.log(item.username, item.total_karma));
```

#### Make.com

1. Add the module **Run an Actor**.
2. Turn **Map** on, to the right of the **Actor** field.
3. Paste the Actor ID `lFt4Jcm2UW4qUUJpo` into the Actor field.
4. Click **⟳ Refresh** to the left of Map.
5. Edit **Input JSON** with `community` and `max_results`.
6. Set **Run synchronously** to **Yes**.
7. Add **Get Dataset Items** and select **defaultDatasetId**.

#### n8n

1. Add **Run an Actor and get dataset** from the Apify node.
2. Set **Actor** → **By ID** and paste `lFt4Jcm2UW4qUUJpo`.
3. Edit **Input JSON** with `community` and `max_results`.

#### MCP

```json
{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "agentx/subreddit-members-scraper"
      ],
      "env": { "APIFY_TOKEN": "YOUR_TOKEN" }
    }
  }
}
```

### Pricing

One contributor profile costs $0.00500 on the FREE tier, plus a $0.01000 Actor Start per run — so the smallest useful run is $0.01500. Actor Start is charged according to requested memory, with a minimum one-time event. Result is charged for each delivered Dataset profile.

| Event | FREE | BRONZE | SILVER | GOLD / PLATINUM / DIAMOND |
|---|---:|---:|---:|---:|
| Actor Start, minimum | $0.01000 | $0.01000 | $0.01000 | $0.01000 |
| Result, per profile | $0.00500 | $0.00450 | $0.00400 | $0.00375 |

At scale, Result pricing ranges from $5.00 to $3.75 per 1,000 delivered profiles before the start charge. Empty or failed runs can still incur Actor Start. Confirm the [live pricing page](https://apify.com/agentx/subreddit-members-scraper/pricing) before production use.

### Use Cases

- Build a reproducible sample of recently visible contributors for community research.
- Enrich authors already found in Reddit posts or comments.
- Export public usernames and profile facts into a review queue or warehouse.
- Compare source-reported karma, account age, trophies, and moderation relationships.
- Monitor how a defined activity sample changes across dated runs.

These uses support research and operations; the output does not prove identity, residence, expertise, influence, authenticity, or formal membership.

### Alternatives

Manual browsing works for a few authors but produces no stable Dataset. A post scraper preserves content context but does not automatically enrich each unique author. A generic crawler leaves browser challenges, deduplication, retries, profile panels, media storage, and schema maintenance to you.

Use [Subreddit Posts Scraper](https://apify.com/agentx/subreddit-posts-scraper) when posts are the primary records, [Reddit Profile Scraper](https://apify.com/agentx/reddit-profile-scraper) for one known username, or [SubReddit Info Scraper](https://apify.com/agentx/subreddit-info-scraper) for rules, settings, and community metadata.

### Limits and Troubleshooting

- **Fewer rows than requested:** visible activity can contain fewer unique readable profiles — asking for 100 in a mid-sized community returned 64, in about five minutes.
- **No rows:** confirm the community name and public recent activity; private, banned, nonexistent, or unavailable communities can return none.
- **Missing optional field:** preserve absence rather than replacing it with a guess.
- **Large request:** rows are saved in batches, but runtime grows with profile and media work. The default prefill is intentionally minimal.
- **Memory:** the Actor runs at 256 MB and accepts up to 512 MB.
- **Media URL remains public:** the save failed but the source URL was retained, preventing information loss.
- **Charge cap reached:** inspect current event prices before increasing `maxTotalChargeUsd`.

### Trust and Reliability

The design audit sampled 20 communities and produced 20 distinct formatted profiles. Separate discovery probes showed comment-only authors in all three tested communities. The combined contract reproduced 24 of 25 optional top-level fields, all seven trophy fields, and ten of eleven moderated-community fields with zero runtime-only fields or URL defects.

Twenty current exits produced five complete passes across six business paths; direct access passed zero of three. The shared 42-attempt budget is consumed once across reopen. A 20-URL media sweep succeeded 20/20 within three attempts.

### Legal and Compliance

Use this Actor only for lawful processing of public information. Respect Reddit's terms, privacy expectations, intellectual-property rights, and applicable data-protection rules. Do not use the output for spam, harassment, deanonymization, sensitive profiling, access-control evasion, or decisions requiring verified identity. Minimize retention and secure exports.

This independent Actor is not affiliated with, endorsed by, or sponsored by Reddit, Inc. Reddit and the Reddit logo are trademarks of Reddit, Inc.

### Frequently Asked Questions

#### How do I scrape subreddit members list data accurately?

Treat the output as a recent activity-derived author sample. It cannot reveal Reddit's official private subscriber roster or silent readers.

#### Is this a subreddit active users list?

It is a structured sample of accounts found in recent visible posts and comments. Activity windows and source availability mean it is not exhaustive.

#### Why can the Dataset contain fewer rows than max\_results?

Deleted, inaccessible, or transiently unreadable accounts are skipped, and the visible activity may contain fewer distinct authors than requested.

#### Can I request more than 400 profiles?

Yes. The input has no hard schema maximum, but runtime, available activity, and the Actor timeout remain practical limits.

#### Are verified and verified\_email independent checks?

No. They are source-reported Reddit flags and must not be presented as AgentX identity verification.

#### Can the same community return different users tomorrow?

Yes. Recent posts, comments, account availability, and profile facts change. Retain `processed_at` and the original input with every snapshot.

### Related AgentX Actors

AgentX publishes 77 Actors — the three closest Reddit workflows first, then the full catalog by category.

Closest to this Actor:

- [Subreddit Posts Scraper](https://apify.com/agentx/subreddit-posts-scraper) — collect posts from a known community.
- [Reddit Profile Scraper](https://apify.com/agentx/reddit-profile-scraper) — profile one known username.
- [SubReddit Info Scraper](https://apify.com/agentx/subreddit-info-scraper) — collect community rules, settings, and wikis.

#### 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 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 Member Scraper](https://apify.com/agentx/telegram-member-scraper)** — Telegram group members
- **[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 product questions in the [AgentX community on Telegram](https://t.me/Apify_Actor). For a reproducible issue, include the run ID, exact input, expected behavior, and observed status, with tokens and personal information removed.

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

**Last Updated:** August 15, 2026

# Actor input Schema

## `community` (type: `string`):

Subreddit name, r/name path, or reddit.com/r/name URL to scan for recent post and comment authors

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

Members to return, minimum 1 and no upper limit. Communities expose far more people than one run can read: each profile costs about 7.6 seconds end to end, so the default one-hour run reaches roughly 400 — raise the run timeout for more. Rows are saved as they are read, so a run that hits its timeout keeps everything already returned.

## Actor input object example

```json
{
  "community": "learnprogramming",
  "max_results": 1
}
```

# Actor output Schema

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

Public Reddit profiles for unique authors discovered in the selected community's recent activity.

# 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 = {
    "community": "learnprogramming",
    "max_results": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("agentx/subreddit-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 = {
    "community": "learnprogramming",
    "max_results": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("agentx/subreddit-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 '{
  "community": "learnprogramming",
  "max_results": 1
}' |
apify call agentx/subreddit-members-scraper --silent --output-dataset

```

## MCP server setup

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