# Facebook Group Members Scraper (`khadinakbar/facebook-group-members-scraper`) Actor

Extract active, visible members of public Facebook groups from recent post and comment authors. Cookieless, provider-backed, MCP-ready.

- **URL**: https://apify.com/khadinakbar/facebook-group-members-scraper.md
- **Developed by:** [Khadin Akbar](https://apify.com/khadinakbar) (community)
- **Categories:** Social media, Lead generation, MCP servers
- **Stats:** 5 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 member founds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## Facebook Group Members Scraper

Extract the **active, visible members** of public Facebook groups — the people who actually post and comment — as a clean, deduplicated, enriched list. Cookieless, no login, MCP-ready.

### What it does

Point it at one or more public Facebook groups. It pages through the group's recent public posts (and their comments), then deduplicates every author into a single member record enriched with their activity in that group.

| Field | Description |
|---|---|
| `name` | Member display name |
| `memberId` | Facebook `pfbid` identifier |
| `profileUrl` | Direct Facebook profile link |
| `activityType` | `poster`, `commenter`, or `both` |
| `postCount` | Posts authored in the scanned window |
| `commentCount` | Comments authored in the scanned window |
| `reactionsReceived` | Reactions on their scanned posts |
| `firstSeenAt` / `lastActiveAt` | ISO 8601 activity window |
| `sampleText` / `sampleUrl` | A snippet of their most recent activity |
| `groupUrl` / `groupId` / `groupSlug` | Source group |

### When to use it

- Build a lead list of **engaged people** in a niche community group.
- Find the most active contributors / potential influencers in a group.
- Community research: who drives the conversation, how recently.

### When NOT to use it

- **This does not return a group's full, login-gated member roster.** Facebook hides the complete member list behind login; no cookieless data source exposes it. This actor returns members who are *publicly active* (posted or commented in the visible window).
- For group *post content* (not members), use `facebook-groups-scraper`.
- For Facebook ads, pages, or marketplace, use the matching actor in this portfolio.

### Input

```json
{
  "groupUrls": ["https://www.facebook.com/groups/vegrecipes"],
  "maxMembers": 200,
  "maxPostsPerGroup": 100,
  "includeCommenters": true,
  "deepComments": false,
  "sortBy": "RECENT_ACTIVITY"
}
```

- `groupUrls` / `groupIds` — one or more public groups (URL slug or numeric ID).
- `maxMembers` — cap on unique members per group (also caps your cost).
- `maxPostsPerGroup` — how many recent posts to scan.
- `includeCommenters` — count comment authors as members (default on).
- `deepComments` — fetch full comment threads for maximum member yield (extra cost).
- `sortBy` — `RECENT_ACTIVITY` (active members) or `TOP_POSTS` (high-engagement members).

### Output

One dataset row per unique member. Example:

```json
{
  "name": "Satish Chandra",
  "memberId": "pfbid02d8...",
  "profileUrl": "https://www.facebook.com/pfbid02d8...",
  "activityType": "both",
  "postCount": 2,
  "commentCount": 7,
  "reactionsReceived": 34,
  "lastActiveAt": "2026-06-25T11:04:00.000Z",
  "groupSlug": "vegrecipes"
}
```

### Pricing

Pay-per-event:

- **Member found** — $0.006 per unique member returned.
- **Actor start** — $0.00005 per run.

You are billed only for unique members actually returned. `maxMembers` is your hard cost ceiling.

### Coverage & limits

- Public groups only. Private / closed groups return no data.
- Yield depends on group activity: a busy group surfaces many members; a quiet or heavily-moderated group surfaces few. The actor reports exactly how many posts it scanned and why it stopped.
- Members are derived from *visible public activity*, not the hidden roster. Silent members who never post or comment will not appear.

### Legal

Use only for lawful purposes and in compliance with Facebook's Terms of Service and applicable data-protection law (including GDPR/CCPA where relevant). This actor accesses only publicly visible content and does not bypass authentication. You are responsible for how you use the data.

# Actor input Schema

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

Public Facebook group URLs to extract members from (e.g. 'https://www.facebook.com/groups/vegrecipes'). One member list is built per group from authors of recent visible posts and comments. Accepts /groups/<slug> or /groups/<numericId> forms. NOT a profile or page URL.

## `groupIds` (type: `array`):

Numeric Facebook group IDs as an alternative to URLs (e.g. '198591470769811'). Use when you have the raw group ID instead of the vanity slug. Merged with Group URLs. NOT a post ID or user ID.

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

Maximum unique members to return per group before stopping (e.g. 200). Caps both pagination and your billed cost. Defaults to 200. This is an upper bound; sparse groups return fewer.

## `maxPostsPerGroup` (type: `integer`):

How many recent group posts to page through while collecting members (e.g. 100). More posts surface more members but cost more provider time. Defaults to 100. Pagination also stops early when the group runs out of visible posts.

## `includeCommenters` (type: `boolean`):

When true, people who commented on the scanned posts are counted as members in addition to post authors. Uses comment authors already embedded in each post (no extra calls). Defaults to true. Set false to return only people who authored posts.

## `deepComments` (type: `boolean`):

When true, fetches the full comment thread for each post to surface every commenter, not just the top embedded ones. Increases member yield on busy groups but consumes more provider credits and run time. Defaults to false. Requires Include commenters to be on.

## `sortBy` (type: `string`):

Provider-side ordering of the group posts scanned for members. 'RECENT\_ACTIVITY' favors currently active members; 'TOP\_POSTS' favors high-engagement authors. Defaults to RECENT\_ACTIVITY.

## `providerOrder` (type: `string`):

Which backing data provider to try first. Defaults to ScrapeCreators with SociaVault fallback, which maximizes coverage. Only change for debugging or provider-specific testing.

## `includeRawData` (type: `boolean`):

When true, attaches the raw provider author object to each member record under rawAuthor for debugging. Defaults to false to keep output lean for AI agents.

## Actor input object example

```json
{
  "groupUrls": [
    "https://www.facebook.com/groups/vegrecipes"
  ],
  "groupIds": [
    "198591470769811"
  ],
  "maxMembers": 200,
  "maxPostsPerGroup": 50,
  "includeCommenters": true,
  "deepComments": false,
  "sortBy": "RECENT_ACTIVITY",
  "providerOrder": "scrapecreators-first",
  "includeRawData": false
}
```

# Actor output Schema

## `members` (type: `string`):

Unique active members extracted across all input groups.

## `summary` (type: `string`):

Run-level counts and provider diagnostics.

# 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://www.facebook.com/groups/vegrecipes"
    ],
    "maxMembers": 200,
    "maxPostsPerGroup": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("khadinakbar/facebook-group-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 = {
    "groupUrls": ["https://www.facebook.com/groups/vegrecipes"],
    "maxMembers": 200,
    "maxPostsPerGroup": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("khadinakbar/facebook-group-members-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://www.facebook.com/groups/vegrecipes"
  ],
  "maxMembers": 200,
  "maxPostsPerGroup": 50
}' |
apify call khadinakbar/facebook-group-members-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RZiBCNOSwhxctkqX1/builds/uluhbBjo0rgiVKM6J/openapi.json
