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

Scrape public posts from Facebook groups without logging in.

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

## Pricing

from $1.70 / 1,000 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** creates a structured dataset of public posts collected from Facebook groups. Each dataset item can include the post id, text, publish time, reaction counts, and the group name. Query the source with group URLs or group ids, control the result limit with maxItems, and retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

[![Facebook Groups Scraper — input to structured data](https://raw.githubusercontent.com/faizanalii/apify-actor-assets/main/facebook-groups-scraper/facebook-groups-scraper-value-demo.gif)](https://apify.com/datascrapers/facebook-groups-scraper)

### Dataset at a glance

| Property | Value |
|---|---|
| Source | facebook.com groups |
| Record unit | One public group post |
| Input methods | startUrls, groupIds |
| Main identifiers | postId, url |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML |
| Update model | Fresh records per Actor run |
| Pricing | $2.00 per 1,000 posts on the free plan |

### Coverage and available records

Pass public Facebook group URLs in startUrls, or group ids in groupIds. Each post includes text, publish time, and the public reaction, like, comment, share, and view counts when the group exposes them. The stored example is a post in group 284228368623393 published on 2026-10-16, with reaction and comment counts of 0.

sortOrder accepts TOP_POSTS. maxItems limits the run. A value of 0 uses the input schema default, which is also 0 and means the Actor follows its own cap. The Actor does not post, comment, or log into a private account. The example omits the author display name.

### Data dictionary

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| postId | string | no | Post id. Use this field to deduplicate. | 2980385009007702 |
| url | string | yes | Public post URL. | https://www.facebook.com/groups/auditionskolkatamumbai/posts/2980385009007702/ |
| text | string | yes | Post text. | |
| publishedAt | string | yes | Publish time in ISO 8601. | 2026-10-16T09:53:13+00:00 |
| groupId | string | yes | Group id. | 284228368623393 |
| groupName | string | yes | Group name. | ACTING AUDITIONS KOLKATA, MUMBAI \[INDIA] |
| groupUrl | string | yes | Group URL. | https://www.facebook.com/groups/284228368623393 |
| reactionCount | number | yes | Public reaction count. | 0 |
| likeCount | number | yes | Public like count. | 0 |
| commentCount | number | yes | Public comment count. | 0 |
| shareCount | number | yes | Public share count. | 0 |
| viewCount | number | yes | Public view count. Null when hidden. | null |

### Example dataset record

```json
{
  "postId": "2980385009007702",
  "url": "https://www.facebook.com/groups/auditionskolkatamumbai/posts/2980385009007702/",
  "publishedAt": "2026-10-16T09:53:13+00:00",
  "groupId": "284228368623393",
  "groupName": "ACTING AUDITIONS KOLKATA, MUMBAI [INDIA]",
  "reactionCount": 0,
  "commentCount": 0,
  "shareCount": 0
}
```

This is a stored public post. The saved row also includes the post text. The author display name is not copied into this example.

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---:|---|---|---|
| startUrls | array | no | empty | group URLs | Facebook group URLs. |
| groupIds | array | no | empty | ids | Group ids. |
| maxItems | integer | no | 0 | integer | Post cap. |
| sortOrder | string | no | TOP_POSTS | TOP_POSTS | Post order. |
| maxConcurrency | integer | no | 5 | positive integer | Parallel group reads. |
| proxyConfiguration | object | no | Apify residential | Apify proxy input | Optional proxy. |

Minimal request:

```json
{"startUrls": [{"url": "https://www.facebook.com/groups/284228368623393/"}], "maxItems": 5}
```

### Retrieve the data through the API

Start the Actor with JSON input, wait for the run, then read the default dataset.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datascrapers/facebook-groups-scraper").call(run_input={
    "startUrls": [{"url": "https://www.facebook.com/groups/284228368623393/"}],
    "maxItems": 5,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["postId"], item.get("reactionCount"))
```

### Data quality and record handling

Deduplicate on postId. Counts are the public figures at request time. viewCount stays null when the group hides it. A later run can return the same post with a new reaction count.

### Pricing and cost examples

Pay per event. post is $2.00 per 1,000 on Free, $1.90 on Bronze, $1.80 on Silver, and $1.70 on Gold. Platinum and Diamond use the Gold price. Platform usage is included. Saving 1,000 posts costs $2.00 on Free.

### Limitations and responsible data use

The Actor reads public group posts. It does not publish or message. Facebook can hide a group or block a session. Use the data in line with Facebook terms.

### Dataset questions

#### What is one record?

One public group post, keyed by postId.

#### Which field should I use to deduplicate?

postId.

#### Are author names included?

The saved dataset can include them. This page does not copy a person's name into the example.

### Related datasets from Data Scrapers

- [Facebook Page Scraper](https://apify.com/datascrapers/facebook-page-scraper)
- [Instagram Hashtag Scraper](https://apify.com/datascrapers/instagram-hashtag-scraper)
- [Reddit Scraper](https://apify.com/datascrapers/reddit-scraper)
- [YouTube Channel Scraper](https://apify.com/datascrapers/youtube-channel-scraper)

### Data Scrapers support

Questions about this dataset: stardustspotlight@gmail.com.

# Actor input Schema

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

Public Facebook group URLs, for example https://www.facebook.com/groups/284228368623393/. Several groups are scraped at the same time.

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

Numeric Facebook group IDs, for example 284228368623393. Used together with group URLs.

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

Maximum number of posts to extract across all groups. Use 0 for no limit.

## `sortOrder` (type: `string`):

How the group feed is ordered. Top posts follows Facebook's default ranking. Newest lists posts in chronological order.

## `maxConcurrency` (type: `integer`):

How many group URLs to scrape at the same time.

## `proxyConfiguration` (type: `object`):

Proxy used for group requests. Residential proxies are the default.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/284228368623393/"
    }
  ],
  "maxItems": 30,
  "sortOrder": "TOP_POSTS",
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset of scraped group posts.

## `runStats` (type: `string`):

Post count and run 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 = {
    "startUrls": [
        {
            "url": "https://www.facebook.com/groups/284228368623393/"
        }
    ],
    "maxItems": 30,
    "sortOrder": "TOP_POSTS",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/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": [{ "url": "https://www.facebook.com/groups/284228368623393/" }],
    "maxItems": 30,
    "sortOrder": "TOP_POSTS",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/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": [
    {
      "url": "https://www.facebook.com/groups/284228368623393/"
    }
  ],
  "maxItems": 30,
  "sortOrder": "TOP_POSTS",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call datascrapers/facebook-groups-scraper --silent --output-dataset

```

## MCP server setup

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