# Facebook Group Post Scraper With Engagement Analyzer (`api-empire/facebook-group-post-scraper`) Actor

Scrape Facebook Group posts with text, authors, timestamps, comments, reactions, shares, and engagement metrics. Analyze top-performing content, audience interests, engagement trends, and group activity for social media research, competitor analysis, and lead generation.

- **URL**: https://apify.com/api-empire/facebook-group-post-scraper.md
- **Developed by:** [API Empire](https://apify.com/api-empire) (community)
- **Categories:** Social media, Automation, Agents
- **Stats:** 13 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.99 / 1,000 results

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/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

### Facebook Scraper — Extract Group Posts, Authors and Comments as JSON

Facebook Group Post Scraper With Engagement Analyzer pulls posts from any public Facebook group and returns post text, author details, reaction/comment/share counts, attachments, and top comments as typed JSON. Every post is scored with a computed engagement value, sorted into a leaderboard, and flagged if it lands in the top 10% for the run. There is no HTML to parse and no selectors to maintain — rows arrive normalized and ready for a spreadsheet, database, or LLM pipeline. Point it at a group URL and get a ranked leaderboard back.

### What is Facebook Group Post Scraper With Engagement Analyzer?

Facebook Group Post Scraper With Engagement Analyzer is an Apify Actor that fetches posts from a public Facebook group's feed and ranks them by a computed engagement score. It returns each post together with its author, its attachments, and its top comments (each with their own comment author) in a single normalized row. No Facebook login is required — the Actor fetches public group feeds logged out, with automatic proxy fallback if Facebook blocks a request.

- Scrape group posts (text, timestamps, URLs, reaction/comment/share counts)
- Scrape post authors (id, name, profile URL)
- Scrape top comments and comment authors (name, verified flag, profile picture, reactions)
- Compute an engagement score, reaction rate, and leaderboard rank for every post
- Export as JSON, CSV, or Excel — no proxy management, no HTML parsing

### What data does Facebook Group Post Scraper With Engagement Analyzer collect?

The Actor returns one leaderboard row per post, and each row carries three kinds of data: the post itself, its author, and its top comments (with their own authors). The table below shows the real fields for each.

| Data Type | Key Fields | JSON Field Names |
| --- | --- | --- |
| Group posts | text, publish date, post URL, reaction/comment/share counts | `text`, `createdAt`, `url`, `reactionCount`, `commentCount`, `shareCount` |
| Engagement metrics | computed score, reaction rate, leaderboard position, top-10% flag | `engagementScore`, `reactionRate`, `viralityRank`, `isTopPost` |
| Post authors | author id, display name, profile URL | `user.id`, `user.name`, `user.url` |
| Top comments & comment authors | comment text, author name/id/url, verified flag, reactions | `topComments[].text`, `topComments[].author.name`, `topComments[].author.isVerified`, `topComments[].reactionCount` |
| Attachments | media type, external link, title, album size | `attachments[].mediaType`, `attachments[].url`, `attachments[].title`, `attachments[].subattachmentCount` |

#### Need more Facebook data?

If you need to find groups before ranking their posts, **Facebook Groups Search Scraper With Member Filters** discovers public groups by keyword and filters them by member count and posting activity. If you want to track a group's overall health over time rather than rank individual posts, **Facebook Group Profile Scraper With Activity Quality Rating** scores a group's activity level and member growth across runs.

### How does Facebook Group Post Scraper With Engagement Analyzer differ from the official Facebook API?

Meta's Graph API requires a registered app, App Review for most permissions, and a valid access token scoped to a group you administer — it has no endpoint for looking up an arbitrary public group's feed by URL. This Actor takes a group URL directly and returns ranked posts without any app-review process.

| Feature | Facebook Graph API | This Actor |
| --- | --- | --- |
| Access to public group posts | Requires a group access token tied to an app the group's admins approved | Works on any public group, given only its URL |
| Approval process | Submit the app for Meta's App Review before most permissions are granted | No review process — run it directly on Apify |
| Engagement scoring | Returns raw reaction/comment/share counts only | Computes `engagementScore`, `reactionRate`, `viralityRank`, and `isTopPost` automatically |
| Entity coverage | Posts, comments, and users are separate endpoint calls | Post, author, and top comments returned together in one row |
| Output format | Nested response shape that varies by endpoint and API version | Flat, normalized JSON with stable field names |
| Setup | Register a Meta developer app and pass App Review | Provide a group URL and start the run |

The Graph API is the right choice if you already administer the group and need write access or webhook-driven updates. This Actor is the right choice for ad-hoc or recurring analysis of any public group's engagement without admin access or an app review process.

### Why do developers and teams scrape Facebook?

#### For community managers and social listening teams

Community managers use the leaderboard to see which posts in their own group actually moved people, without scrolling a feed manually post by post. Sorting by `viralityRank` and reading `topComments` surfaces what a community reacted to, what members actually said about it, which posts to re-share or pin, and which topics keep resurfacing. Filtering with `minEngagement` strips out low-signal posts so a weekly report only covers content that generated real reactions, comments, or shares, rather than the entire noisy feed. The same run can be repeated weekly to track whether engagement is trending up or down.

#### For marketers and brand teams

Marketers run this Actor against niche or competitor groups to see which content formats — photos, links, questions, polls — earn the most `engagementScore` in a given community. Because `attachments[].mediaType` and `attachments[].type` are returned alongside the score, a team can correlate format with performance directly, rather than guessing from a manual feed scroll, and feed the ranked leaderboard into a content calendar or campaign brief. Reading `topComments` on the highest-ranked posts also surfaces the exact language an audience uses, which is useful for matching brand voice to what a community already responds to.

#### For researchers and analysts

Researchers studying public online communities use the Actor to pull a representative sample of a group's recent discourse — post text, timestamps, reaction/comment/share counts, and top comments — for engagement-distribution analysis. Because only publicly accessible group feeds are read, the scope stays within public-data research norms rather than requiring group-admin access. The `isTopPost` flag and `viralityRank` field make it straightforward to isolate outlier posts for closer qualitative review, and `scrapeUntil` lets a study be bounded to a specific date range instead of the group's entire history.

#### For AI engineers and agent builders

AI teams pass the ranked JSON directly into a RAG index or an agent tool without writing an HTML parser or computing engagement themselves. Because every row already carries `engagementScore`, `viralityRank`, and `topComments`, an agent can be asked to "summarize what drove engagement in this group last week" and reason over the fields as-is, instead of first re-deriving engagement from raw reaction, comment, and share counts. The stable schema also means an agent tool built against one run keeps working against the next.

### How to scrape Facebook (step by step)

1. Open Facebook Group Post Scraper With Engagement Analyzer on Apify and start a new run.
2. Provide the required input — paste the public group URL into `groupUrl`. This is the only required parameter.
3. Set the leaderboard filters you want — `count` for sample size, `sortType` for fetch order, `minEngagement` and `topN` to trim the leaderboard, `scrapeUntil` to bound the date range.
4. Start the run. No Facebook login is required; the Actor fetches the group's public feed logged out, with automatic proxy fallback if Facebook blocks a request.
5. Download the ranked results as JSON, CSV, or Excel, or pull them through the Apify API.

#### What to do when Facebook changes its structure

The Actor is maintained, and the output schema is designed to stay stable — field names and types don't change on your end even when Facebook alters its internal feed structure. No specific turnaround time is promised for fixes.

### ⬇️ Input

| Parameter | Required | Type | Description | Example Value |
| --- | --- | --- | --- | --- |
| `groupUrl` | Yes | string | Full public Facebook group URL to analyze. | `"https://www.facebook.com/groups/cheapmealideas"` |
| `count` | No | integer | Number of posts to pull into the leaderboard before ranking. Range 1–10,000. Default `20`. | `50` |
| `minEngagement` | No | integer | Drop any post whose `engagementScore` is below this value. Default `0` (keep all). | `5` |
| `topN` | No | integer | After ranking, keep only the top N posts by engagement score. Leave empty to keep the whole leaderboard. | `10` |
| `sortType` | No | string | Feed fetch order from Facebook *before* re-ranking: `new_posts`, `most_relevant`, or `recent_activity`. Default `"new_posts"`. | `"new_posts"` |
| `scrapeUntil` | No | string | Only include posts created after this UTC date/time. Format `YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`. Leave empty to include all fetched posts. | `"2026-06-01"` |
| `proxy` | No | object | Proxy configuration. Apify Proxy is recommended and enabled by default. | `{ "useApifyProxy": true }` |

```json
{
  "groupUrl": "https://www.facebook.com/groups/cheapmealideas",
  "count": 50,
  "minEngagement": 5,
  "topN": 10,
  "sortType": "new_posts",
  "scrapeUntil": "2026-06-01",
  "proxy": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
```

The most common mistake is expecting `sortType` to control the final row order — it only controls which posts Facebook returns first; the output is always re-ranked by `engagementScore` regardless of the fetch order you choose.

### ⬆️ Output

Every run returns typed, normalized JSON rows in ranked (leaderboard) order — row one is the highest-scoring post in the fetched sample. Results export as JSON, CSV, or Excel. A post's author and top comments arrive nested inside the same row rather than as separate dataset items, but each carries its own distinct field set.

#### Scraped group post

```json
{
  "viralityRank": 1,
  "isTopPost": true,
  "engagementScore": 25,
  "reactionRate": 0.375,
  "reactionCount": 3,
  "commentCount": 8,
  "shareCount": 2,
  "createdAt": 1761419106,
  "url": "https://www.facebook.com/groups/cheapmealideas/permalink/25132651666385171/",
  "user": {
    "id": "100001234567890",
    "name": "Anna Kazazis",
    "url": "https://www.facebook.com/anna.kazazis"
  },
  "text": "Are dried goji berries considered sweet or subacid? Looking for a cheap snack swap.",
  "attachments": [
    {
      "type": "Photo",
      "url": null,
      "title": null,
      "mediaType": "image",
      "subattachmentCount": 0
    }
  ],
  "topComments": [
    {
      "text": "Subacid, but great in trail mix!",
      "createdAt": 1761463794,
      "author": {
        "name": "Gosia Adur",
        "id": "100009876543210",
        "gender": "FEMALE",
        "url": "https://www.facebook.com/gosia.adur",
        "profilePicture": "https://scontent.xx.fbcdn.net/v/...",
        "shortName": "Gosia",
        "isVerified": false
      },
      "reactionCount": 2,
      "commentCount": 1,
      "url": "https://www.facebook.com/groups/cheapmealideas/permalink/25132651666385171/?comment_id=987654321"
    }
  ]
}
```

#### Post author

The author object is nested at `user` inside every post row.

```json
{
  "id": "100001234567890",
  "name": "Anna Kazazis",
  "url": "https://www.facebook.com/anna.kazazis"
}
```

#### Comment author

Each entry in `topComments[].author` carries richer identity fields than the post author, since they come from Facebook's comment payload.

```json
{
  "name": "Gosia Adur",
  "id": "100009876543210",
  "gender": "FEMALE",
  "url": "https://www.facebook.com/gosia.adur",
  "profilePicture": "https://scontent.xx.fbcdn.net/v/...",
  "shortName": "Gosia",
  "isVerified": false
}
```

### How many results can you scrape with Facebook Group Post Scraper With Engagement Analyzer?

The `count` input caps the sample size at 1–10,000 posts (default 20); leave it unset and the Actor paginates the group's feed until Facebook stops returning pages. There is no additional hard cap in the Actor itself beyond that input. Pagination is cursor-based against Facebook's own GraphQL feed endpoint, with a randomized delay between page requests.

One thing to keep in mind: `viralityRank` and `isTopPost` are computed over the fetched sample (up to `count` posts), not over the group's entire posting history — a post ranked #1 is the top performer among the posts this run fetched, not necessarily the group's all-time top post. Run with a larger `count` for a more representative leaderboard.

### Integrate Facebook Group Post Scraper With Engagement Analyzer and automate your workflow

Facebook Group Post Scraper With Engagement Analyzer works with any language or tool that can send an HTTP request.

#### REST API integration

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_API_TOKEN>")
run = client.actor("your-username/facebook-group-post-scraper-with-engagement-analyzer").call(
    run_input={"groupUrl": "https://www.facebook.com/groups/cheapmealideas", "count": 50}
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["viralityRank"], item["engagementScore"], item["text"][:60])
```

Works in Python, Node.js, Go, Ruby, cURL.

#### MCP for AI agents

The Actor is callable through Apify's MCP Server, which exposes any Apify Actor as an MCP tool: `npx -y @apify/actors-mcp-server --actors your-username/facebook-group-post-scraper-with-engagement-analyzer`, run with your `APIFY_TOKEN` set. Compatible with Claude Desktop, Claude Code, Cursor, and other MCP-capable clients.

#### Automation platforms (n8n, Make)

In n8n, use the Apify community node (or a generic HTTP Request node against the Apify API) to start a run and read back the dataset as part of a workflow. In Make, the Apify app module can trigger a run and pass its dataset items into downstream modules such as a spreadsheet, CRM, or Slack notification.

### Is it legal to scrape Facebook?

Scraping publicly available data is generally permitted, but how you store and use it matters. This Actor only returns data visible on a public group's feed — it does not bypass logins or access private groups. Post and comment author fields (`user`, `topComments[].author`) are personal data under regimes like GDPR and CCPA, so you need a lawful basis to store or process them, particularly at scale or for commercial use. Consult legal counsel for commercial use cases involving bulk personal data.

### Frequently asked questions

#### Does Facebook Group Post Scraper With Engagement Analyzer work without a Facebook account?

Yes. It fetches public group feeds logged out; no Facebook account or login credentials are required.

#### How often is the scraped data updated?

Each run fetches live data from Facebook at the time it runs — nothing is cached or served from a previous run.

#### What happens if the group is private, deleted, or has no matching posts?

If the group can't be accessed (private, deleted, or blocked), the Actor logs "Unable to access group" and returns zero rows rather than erroring out. If the group is accessible but has no posts matching your `scrapeUntil` or `minEngagement` filters, you get an empty dataset.

#### Can I scrape private or restricted Facebook groups?

No. Only groups that are public (or otherwise accessible without login) can be scraped. Private groups return zero results.

#### Does Facebook Group Post Scraper With Engagement Analyzer work for AI agent workflows and LLM pipelines?

Yes. It's callable as an HTTP endpoint through the Apify API from any agent framework, and reachable via Apify's MCP Server for MCP-compatible clients. Every response is typed JSON with stable field names — no parsing step before passing it to an LLM.

#### How does the Actor handle Facebook's anti-bot system?

It fetches public feeds logged out with rotating proxy fallback: no proxy first, then Apify datacenter proxy, then Apify residential proxy, each with retries when Facebook returns a rate-limit or block response. Requests are also spaced out with a randomized delay between pages.

#### Is the "engagement analyzer" a real computed metric?

Yes. It's not just a label — every post is scored as `engagementScore = reactionCount + 2×commentCount + 3×shareCount`, given a `reactionRate` (`reactionCount / max(1, commentCount)`), sorted into a `viralityRank`, and flagged `isTopPost` if it falls in the top 10% of the fetched sample. All four fields are computed in the Actor's own post-processing step, not copied from Facebook.

#### Does Facebook Group Post Scraper With Engagement Analyzer return data in a format LLMs can use directly?

Yes. Output is typed, normalized JSON with stable field names — no HTML, no selectors, no parsing. Pass it directly into an LLM context window, index it into a vector store, or route it through an agent tool.

#### Can I use it without managing proxies?

Yes. Apify Proxy is used by default, and the Actor automatically falls back from no proxy to datacenter to residential proxy if Facebook blocks a request — you don't have to configure or rotate anything yourself.

#### What happens when Facebook changes its structure or blocks the scraper?

The Actor is maintained, and its output schema is designed to stay stable on your end — field names and types don't change even when Facebook's internal feed structure does. No specific turnaround time is promised.

### Your feedback

Found a bug or missing a field? We want to know. Open an issue through the Actor's page on Apify, or reach out through the API-Empire publisher contact listed on the Actor's Apify Store listing — bug reports and field requests are how this Actor stays accurate as Facebook's feed structure evolves.

# Actor input Schema

## `groupUrl` (type: `string`):

📌 Paste the full Facebook group URL to analyze.

Example: https://www.facebook.com/groups/cheapmealideas

💡 The group must be public (or accessible to you).

## `count` (type: `integer`):

🎯 How many posts to pull into the leaderboard before ranking.

💡 A larger sample gives a more representative ranking.

⚡ Range: 1-10,000 posts.

## `minEngagement` (type: `integer`):

🧹 Drop any post whose engagementScore (reactions + 2×comments + 3×shares) is below this value.

💡 Set to 0 to keep every post (default). Raise it to focus only on posts that actually moved.

## `topN` (type: `integer`):

✂️ After ranking, keep only the top N posts by engagement score.

💡 Leave empty to keep the whole ranked leaderboard.

## `sortType` (type: `string`):

📋 How posts are pulled from Facebook BEFORE the engagement ranking is applied.

🆕 New posts - Latest posts first (chronological)
⭐ Most relevant - Top posts by Facebook's own ranking
🔥 Recent activity - Posts with recent comments/interactions

💡 The final output is always re-ranked by engagement score regardless of this setting.

## `scrapeUntil` (type: `string`):

⏰ Only include posts created after this date in the leaderboard.

✅ Leave empty to analyze all fetched posts.

📝 Formats: YYYY-MM-DD or YYYY-MM-DD HH:MM:SS (UTC).

## `proxy` (type: `object`):

🌐 Configure proxy settings for fetching.

✅ Recommended: Use Apify Proxy (enabled by default).

## Actor input object example

```json
{
  "groupUrl": "https://www.facebook.com/groups/cheapmealideas",
  "count": 20,
  "minEngagement": 0,
  "sortType": "new_posts",
  "proxy": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped items in the Actor's default dataset.

# 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 = {
    "groupUrl": "https://www.facebook.com/groups/cheapmealideas",
    "scrapeUntil": "",
    "proxy": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("api-empire/facebook-group-post-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 = {
    "groupUrl": "https://www.facebook.com/groups/cheapmealideas",
    "scrapeUntil": "",
    "proxy": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("api-empire/facebook-group-post-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 '{
  "groupUrl": "https://www.facebook.com/groups/cheapmealideas",
  "scrapeUntil": "",
  "proxy": {
    "useApifyProxy": true
  }
}' |
apify call api-empire/facebook-group-post-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,api-empire/facebook-group-post-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/4q9eodLYTAWXxXRl5/builds/dMSIYYepczxkz2l4f/openapi.json
