# Facebook Groups Scraper (`calm_builder/facebook-groups-scraper`) Actor

Scrape posts from public Facebook groups, from links or a keyword search: text, author, photos, videos, reactions, comment and share counts, plus nested comments and replies. Group details too: members, privacy, admins, activity. Date filters. No login.

- **URL**: https://apify.com/calm_builder/facebook-groups-scraper.md
- **Developed by:** [Coder](https://apify.com/calm_builder) (community)
- **Features:** Limited permissions
- **Stats:** 52 total users, 13 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 group posts

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Groups Scraper

Collect posts from **public Facebook groups**, with no login and no cookies. Add a group link, a numeric group id or a group name. You can mix all three in one list.

**No group links? Search by keyword.** Type a topic like `real estate investors` or `dog lovers new york` and the Actor finds the matching public groups and collects their posts. Facebook has no search for logged-out visitors, so this is something you can't do on Facebook itself without an account.

For every post you get the text, date, author, post type, reactions in total and by type, comment and share counts, photos in full size, video links, hashtags, mentions, link previews and shared posts.

Turn on comments to get each post's **comments and replies nested inside the post**: comments first, the replies under each comment, and replies to replies under those.

You also get **one row of details per group**: name, privacy, member count, admins, created date and how many posts it gets per day and per month.

For Facebook pages or profiles, use the [Facebook Posts Scraper](https://apify.com/calm_builder/facebook-posts-scraper). For comments on posts you already have links to, use the [Facebook Comments Scraper](https://apify.com/calm_builder/facebook-comments-scraper).

### How to use it

1. Add one or more public groups, for example `https://www.facebook.com/groups/dogspotting`, `3277056332339849` or `dogspotting`. Or add **search terms** (or both).
2. Set how many posts to collect per group, and optionally a date range.
3. Optionally turn on **Also collect comments**.
4. Click **Start**. Results appear in the **Posts** and **Groups** tabs as they are found, and can be exported to JSON, CSV or Excel.

```json
{
  "startUrls": ["https://www.facebook.com/groups/dogspotting/"],
  "maxPosts": 20,
  "viewOption": "CHRONOLOGICAL",
  "onlyPostsNewerThan": "7 days",
  "includeComments": true,
  "maxComments": 10,
  "includeReplies": true,
  "maxRepliesPerComment": 5
}
```

Search instead of links:

```json
{
  "searchQueries": ["real estate investors", "keto recipes"],
  "maxResultsPerQuery": 10,
  "minMembers": 1000,
  "maxPosts": 20
}
```

### Output

#### Posts

| Field | Example |
|---|---|
| postUrl, postId | https://www.facebook.com/groups/dogspotting/permalink/10166251756484467/ |
| postType | photo, video, reel, link, event, shared, text, mixed |
| authorName, authorProfileUrl | Jane Doe, https://www.facebook.com/jane.doe |
| groupName, groupId, groupUrl | Dogspotting, 10487409466 |
| text, hashtags, mentions | "Saw this cutie on my morning walk", \[dogspotting], \[{name, url}] |
| publishedAt | 2026-09-30T19:58:24Z |
| reactions, reactionsLike … reactionsAngry | 139, 120 … 0 |
| commentCount, shares | 12, 3 |
| media | \[{kind: photo, url, width, height, altText}, {kind: video, hdUrl, sdUrl, thumbnailUrl}] |
| linkPreview, sharedPost | the link card, the post that was shared |
| comments | the post's comments, each with its own `replies` (see below) |

Each comment in `comments` has `commentId`, `commentUrl`, `text`, `createdAt`, `authorName`, `authorUrl`, `reactions` (in total and by type), `replyCount`, `depth` (0 comment, 1 reply, 2 reply to a reply), `parentCommentId` and `replies`.

#### Groups

| Field | Example |
|---|---|
| groupName, groupId, groupUrl | Dogspotting, 10487409466 |
| privacy, visibility | Public, Visible |
| membersCount, membersCountText | 1834978, 1.8M |
| admins, adminsText | \[Stephanie Easley, Marty Kimmel, …], "Stephanie and 6 other members are admins." |
| createdAt | 2008-02-20T15:01:36Z |
| postsLastDay, postsLastMonth | 15, 509 |
| description | the group's About text |
| searchQuery | the search term that found the group (groups from links have none) |

### Options

| Option | What it does |
|---|---|
| Search terms | Find public groups by keyword, one term per line |
| Groups per search | How many public groups to collect for each term (default 10). One search finds up to about 50 groups; add more terms for more |
| Minimum members | Only collect groups from searches with at least this many members |
| Posts per group | How many posts to collect from each group |
| Post order | New posts, recent activity or top posts |
| Only posts newer / older than | A date (`2026-09-01`) or a period (`7 days`, `2 weeks`) |
| Comments per post | How many comments to collect from each post (replies are counted separately) |
| Comment order | Newest first, most relevant, or all |
| Include replies, Replies per comment | Replies under each comment, and how many |
| Reply depth | Replies, or replies and replies to replies |

**Scheduled runs:** to collect only fresh posts on a daily schedule, set *Only posts newer than* to `1 day` and keep *Post order* on *New posts*.

### Good to know

- Only public groups are supported. For a private group you still get its Groups row (name, privacy, members), and the run log says it is private. Missing groups are listed as not found. Neither is charged.
- A link to a single post in a group collects that group's posts.
- **Search** returns public groups only: private groups found by a search are skipped and never charged. A group found by two searches (or by a search and a link) is collected once.
- **Replies:** for long reply threads, Facebook itself shows only some of the replies it counts. The same happens in a browser, even when logged in. The Actor collects every reply Facebook makes available.
- Facebook's own `commentCount` counts comments only, so a post can hold more comments and replies than that number.

### Pricing

You pay per result: one charge per post and one per comment or reply. The Groups rows are free. The free plan lets you try every option on up to 3 groups, 10 posts per group and 10 comments per post.

# Actor input Schema

## `startUrls` (type: `array`):

One public Facebook group per row: a full link (https://www.facebook.com/groups/dogspotting), a numeric group id, or a group name. A link to a post in a group collects that group's posts. Duplicates are collected once. Optional when you search below.

## `searchQueries` (type: `array`):

What to search for, one per line, for example dog lovers new york or real estate investors. Each search finds up to about 50 groups; add more terms to find more.

## `maxResultsPerQuery` (type: `integer`):

How many public groups to collect for each search term. Private groups are skipped and never charged: Facebook shows their posts to members only.

## `minMembers` (type: `integer`):

Only collect groups from searches with at least this many members, for example 1000. Smaller groups are skipped and never charged. Leave empty for any size.

## `maxPosts` (type: `integer`):

Maximum number of posts collected from each group.

## `viewOption` (type: `string`):

Which group posts come first. 'New posts' works best with the date filters.

## `onlyPostsNewerThan` (type: `string`):

Pick a date, or a period back from now (for example 7 days). Leave empty for no limit.

## `onlyPostsOlderThan` (type: `string`):

Pick a date, or a period back from now. Combine with 'newer than' for a date range. Leave empty for no limit.

## `includeComments` (type: `boolean`):

Comments are listed in the post's 'comments' field; each comment holds its own 'replies'.

## `maxComments` (type: `integer`):

Maximum number of top-level comments collected from each post (replies are counted separately below).

## `commentsSortBy` (type: `string`):

Which comments come first.

## `includeReplies` (type: `boolean`):

Also collect replies to comments. Facebook shows only some replies of long threads, even to logged-in users.

## `maxRepliesPerComment` (type: `integer`):

Maximum number of replies collected under each comment (and under each reply, with replies to replies on).

## `replyDepth` (type: `string`):

Replies only, or replies and the replies to those replies.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.facebook.com/groups/dogspotting/"
  ],
  "maxResultsPerQuery": 10,
  "maxPosts": 20,
  "viewOption": "CHRONOLOGICAL",
  "includeComments": false,
  "maxComments": 10,
  "commentsSortBy": "newest",
  "includeReplies": true,
  "maxRepliesPerComment": 5,
  "replyDepth": "1"
}
```

# Actor output Schema

## `posts` (type: `string`):

No description

## `groups` (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 = {
    "startUrls": [
        "https://www.facebook.com/groups/dogspotting/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("calm_builder/facebook-groups-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 = { "startUrls": ["https://www.facebook.com/groups/dogspotting/"] }

# Run the Actor and wait for it to finish
run = client.actor("calm_builder/facebook-groups-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 '{
  "startUrls": [
    "https://www.facebook.com/groups/dogspotting/"
  ]
}' |
apify call calm_builder/facebook-groups-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,calm_builder/facebook-groups-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/UkwI6RWYQ1TrzIk9j/builds/1xRh4tQjnhPxTZ1NV/openapi.json
