# Facebook Group Data Scraper (`qaseemiqbal/facebook-group-data-scraper`) Actor

Extract posts, comments, engagement metrics, links, and media details from public Facebook groups. Monitor public community conversations, track brand or product mentions, research topics, and export structured Facebook group data to spreadsheets, dashboards, databases, webhooks, or AI workflows.

- **URL**: https://apify.com/qaseemiqbal/facebook-group-data-scraper.md
- **Developed by:** [Muhammad Qaseem Iqbal](https://apify.com/qaseemiqbal) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 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.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Data Scraper

Extract posts, comments, engagement metrics, links, and media details from public Facebook groups. Use this Actor to monitor public community conversations, track brand or product mentions, research topics, and send clean Facebook group data to spreadsheets, dashboards, databases, webhooks, or AI tools.

This Actor is built for public content only. It does not use Facebook login, cookies, credentials, private group access, or any access-control bypass.

### What Is This Actor?

Facebook Group Data Scraper is a Facebook group data extractor for people who need structured data from public group discussions.

Add one or more public Facebook group URLs, choose how many posts you want, and start the Actor. The default settings are tuned for low-cost runs: small post limits, no comments by default, no media metadata by default, one browser page at a time, and blocked heavy page resources. The results are saved in an Apify dataset that you can download as JSON, CSV, Excel, XML, HTML table, or JSONL.

Typical users include:

- Marketing and social listening teams
- Brand and competitor research teams
- Community managers
- Lead generation and demand research teams
- Researchers studying public conversations
- Agencies monitoring niches, events, local communities, and product feedback
- Data teams feeding public social data into BI, ETL, or AI workflows

### What Can You Extract?

| Data type | Examples |
| --- | --- |
| Posts | Post text, post URL, post ID, permalink ID, timestamp |
| Groups | Group URL, group title, public group metadata when visible |
| Authors | Public display name, profile URL, public ID when visible |
| Engagement | Likes, reactions, comments count, shares count |
| Reactions | Like, love, care, haha, wow, sad, angry counts when visible |
| Comments | Top visible comments, comment text, author, likes, date, replies where available |
| Media | Image URLs, video URLs, thumbnails, dimensions, alt text, link previews |
| Text signals | Hashtags, mentions, external links, normalized post text |
| Monitoring | New or changed posts when incremental mode is enabled |
| Diagnostics | Extraction status, confidence flags, truncation indicators, and error records |

### Common Use Cases

- Monitor public Facebook groups for brand mentions
- Track competitor discussions and product complaints
- Find high-engagement posts in a niche or local community
- Collect public comments for sentiment or topic analysis
- Discover repeated questions, requests, and buying signals
- Watch event, marketplace, hobby, or neighborhood groups
- Build dashboards in Google Sheets, Excel, BI tools, or databases
- Feed public group data into AI summaries, alerts, or research reports

### How To Use It

1. Open the Actor in Apify Console.
2. Add one or more public Facebook group URLs.
3. Set the maximum number of posts per group.
4. Choose whether to collect comments, media, reaction breakdowns, and shares.
5. Keep Apify Proxy enabled for better reliability.
6. Click Start.
7. Download the results from the Output tab or use them through the API.

You can also create an Apify Task and schedule it to run every hour, day, or week. Enable incremental mode if you only want new or changed posts after the first run.

### Input

The only required input is a public Facebook group URL.

Example:

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/webscrapingandautomation"
    }
  ],
  "costMode": "lowest_cost",
  "maxPostsPerGroup": 25,
  "sortMode": "recent_activity",
  "commentsMode": "none",
  "maxCommentsPerPost": 0,
  "includeReactionBreakdown": true,
  "includeSharesCount": true,
  "includeMedia": false,
  "blockHeavyResources": true,
  "maxConcurrency": 1,
  "maxScrollsPerGroup": 3,
  "privacyMode": "include_public_author_fields",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
````

Supported URL examples:

```text
https://www.facebook.com/groups/groupname/
https://www.facebook.com/groups/123456789/
https://www.facebook.com/groups/groupname/permalink/1234567890/
https://www.facebook.com/groups/groupname/posts/1234567890/
```

This Actor does not support Facebook pages, profiles, events, marketplace listings, private groups, cookies, usernames, passwords, or browser sessions.

### Main Input Options

| Option | What it does |
| --- | --- |
| `startUrls` | Public Facebook group URLs or public group post URLs |
| `costMode` | Sets the default cost profile for the run |
| `maxPostsPerGroup` | Maximum posts to collect from each group |
| `sortMode` | Tries to sort by recent activity, new posts, or relevance |
| `searchQuery` | Optional keyword search inside public group posts |
| `dateFrom` / `dateTo` | Optional date range filters |
| `commentsMode` | Choose no comments, top comments, expanded comments, or best-effort deeper comments |
| `maxCommentsPerPost` | Maximum comments to collect per post |
| `includeMedia` | Include image, video, thumbnail, and link preview metadata |
| `blockHeavyResources` | Blocks images, video, fonts, and stylesheets to reduce browser cost |
| `maxScrollsPerGroup` | Controls how much feed scrolling the Actor does |
| `incrementalMode` | Emit only new or changed posts on repeated runs |
| `privacyMode` | Include, hash, or remove public author identifiers |
| `outputMode` | Keep comments nested in posts or write separate comments/media datasets |

### Cost Modes

| Mode | Best for | Default behavior |
| --- | --- | --- |
| `lowest_cost` | Cheapest scheduled monitoring or quick tests | 25 posts per group, no comments, no media metadata, one browser page, heavy resources blocked |
| `balanced` | General research runs | 100 posts per group, top comments, media metadata, two browser pages, heavy resources blocked |
| `maximum_data` | Richer one-off exports | Higher post/comment limits, expanded comments, media metadata, more scrolling, heavy resources allowed |

### Output

Results are saved to the default dataset as post records. Depending on your settings, the Actor can also write separate datasets for comments, media, and errors.

Example output:

```json
{
  "recordType": "post",
  "url": "https://www.facebook.com/groups/examplepublicgroup/permalink/1234567890",
  "time": "2026-06-12T13:45:00.000Z",
  "group": {
    "title": "Example Public Group",
    "url": "https://www.facebook.com/groups/examplepublicgroup",
    "isPublic": true
  },
  "author": {
    "name": "Public Author",
    "profileUrl": "https://www.facebook.com/profile.php?id=123"
  },
  "content": {
    "text": "Example public post text.",
    "hashtags": ["example"],
    "externalLinks": ["https://example.com"]
  },
  "engagement": {
    "likesCount": 120,
    "sharesCount": 3,
    "commentsCount": 18,
    "reactionLikeCount": 90,
    "reactionLoveCount": 20
  },
  "topComments": [
    {
      "text": "Example public comment.",
      "likesCount": 2,
      "threadingDepth": 0
    }
  ],
  "commentsTruncated": false,
  "extraction": {
    "status": "succeeded",
    "confidence": "high",
    "changedSinceLastRun": false
  }
}
```

You can download results in:

- JSON
- JSONL
- CSV
- Excel
- XML
- HTML table

You can also access results through Apify API, Apify SDKs, webhooks, integrations, or AI workflows.

### Monitoring New Posts

Turn on `incrementalMode` when you want to monitor the same public groups over time.

On the first run, the Actor records the posts it finds. On later runs, it compares new results with the saved state and emits only posts that are new or changed. This is useful for alerts, scheduled reports, and webhook workflows.

### Privacy Controls

Some public Facebook group posts may contain personal data. This Actor includes privacy options so you can reduce what is stored.

| Mode | Result |
| --- | --- |
| `include_public_author_fields` | Keeps public author fields when visible |
| `hash_author_ids` | Replaces author IDs and profile URLs with hashed values |
| `omit_author_fields` | Removes author fields from post and comment records |

Use `omit_author_fields` or `hash_author_ids` when you do not need author-level analysis.

### Limits And Reliability

Facebook pages can change often, and public visibility may vary by location, device, language, or current Facebook restrictions. Some groups or posts may return fewer results than expected.

The Actor handles common cases by:

- Skipping private or login-only groups
- Marking unavailable posts instead of stopping the whole run
- Recording when comments are hidden or limited
- Avoiding duplicate posts where possible
- Saving structured error records when enabled
- Using conservative crawling settings by default

For the cheapest runs, keep the default `lowest_cost` settings, use a small `maxPostsPerGroup`, keep `commentsMode` set to `none`, keep `includeMedia` off, and keep `blockHeavyResources` on. Turn on comments, media, OCR, downloads, or deeper scrolling only when you need richer data.

### Integrations

You can connect the results to:

- Google Sheets or Excel
- Slack alerts
- Make or Zapier workflows
- Airbyte, Keboola, or other data pipelines
- Databases and BI dashboards
- Custom webhooks
- AI agents and LLM workflows through Apify API or MCP-compatible setups

### FAQ

#### Does this Actor scrape private Facebook groups?

No. It only works with public Facebook groups and public content. It does not use credentials, cookies, login sessions, or private group access.

#### Do I need a Facebook account?

No. The Actor is designed for publicly available group content only.

#### Why did a group return zero posts?

The group may be private, empty, unavailable, region-restricted, temporarily blocked, or showing a login wall. Check the error dataset for the exact status recorded by the Actor.

#### Can I scrape all comments from a post?

Use `commentsMode` set to `expanded` or `all_best_effort` and increase `maxCommentsPerPost`. Facebook may still hide or limit comments in public views, so the Actor marks records when comments appear truncated.

#### Can I search for keywords inside groups?

Yes. Add a `searchQuery` to collect matching public posts where Facebook makes group search available.

#### Can I use this for recurring monitoring?

Yes. Create an Apify Task, enable `incrementalMode`, and run it on a schedule. You can also attach a webhook to send new results to another app.

#### Can I export the data to Excel or CSV?

Yes. Apify datasets can be downloaded in Excel, CSV, JSON, JSONL, XML, and HTML table formats.

#### Is it legal to scrape Facebook group data?

This Actor is intended for publicly available content only. Results may still contain personal data, so make sure you have a lawful reason to collect and process the data. If you are unsure, ask a legal professional.

### Troubleshooting

| Problem | What it usually means | What to try |
| --- | --- | --- |
| `not_public` | The group is private or not publicly visible | Use a public group URL |
| `login_required_or_blocked` | Facebook showed a login wall or blocked public access | Try fewer posts, lower concurrency, and keep proxy enabled |
| Few comments returned | Comments are hidden, collapsed, or limited in the public view | Increase `maxCommentsPerPost` or use expanded comments |
| Missing reaction breakdown | Facebook did not show detailed reactions publicly | Use total reactions as the fallback |
| Slow run | Deep comments, media, or large limits take longer | Reduce limits or disable advanced options |
| Duplicate posts | Pinned or cross-posted content appeared multiple times | Keep `deduplicatePosts` enabled |
| No results from keyword search | Group search may not be available publicly | Try a normal group scrape or a broader keyword |

### Responsible Use

Use this Actor for public Facebook group research, monitoring, and analysis. Do not use it to collect private data, bypass access restrictions, or process personal data without a legitimate reason.

The Actor is designed to fail clearly when content is private, unavailable, or blocked instead of attempting to access restricted information.

# Actor input Schema

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

Public Facebook group feed URLs or public group post permalink URLs. Private groups, credentials, cookies, and login-only content are not supported.

## `costMode` (type: `string`):

Choose the default cost profile. Lowest cost uses smaller limits and avoids optional enrichment unless you turn it on.

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

Upper limit of post records to extract from each group.

## `sortMode` (type: `string`):

Best-effort feed/search ordering. Facebook may ignore or hide some order modes in public views.

## `searchQuery` (type: `string`):

Optional keyword search inside each public group.

## `dateFrom` (type: `string`):

Optional ISO 8601 lower bound for post timestamps.

## `dateTo` (type: `string`):

Optional ISO 8601 upper bound for post timestamps.

## `commentsMode` (type: `string`):

Choose whether to skip comments, collect top visible comments, open post details for more comments, or collect deeper public comments on a best-effort basis.

## `maxCommentsPerPost` (type: `integer`):

Maximum number of visible public comments to collect for each post.

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

Best-effort expansion of public replies under visible comments.

## `commentSortMode` (type: `string`):

Preferred comment ordering when Facebook exposes comment sorting in the public view.

## `includeReactionBreakdown` (type: `boolean`):

Collect visible reaction counts such as like, love, care, haha, wow, sad, and angry when available.

## `includeSharesCount` (type: `boolean`):

Collect the public share count when it is visible on the post.

## `includeMedia` (type: `boolean`):

Collect metadata for visible images, videos, thumbnails, and link previews.

## `downloadMedia` (type: `boolean`):

Store public media files in the default key-value store when URLs are directly downloadable.

## `extractImageOcr` (type: `boolean`):

Optional OCR hook. Off by default because OCR is slower and may require provider configuration.

## `includeGroupMetadata` (type: `boolean`):

Collect public group title, URL, and group identifier when visible.

## `privacyMode` (type: `string`):

Choose whether to include public author fields, hash author identifiers, or omit author fields from the output.

## `outputMode` (type: `string`):

Choose whether comments stay nested inside post records or are also written to separate datasets for easier analysis.

## `includeErrorRecords` (type: `boolean`):

Write structured error records for private groups, login walls, unavailable posts, and failed requests.

## `incrementalMode` (type: `boolean`):

Emit only new or changed posts and persist fingerprints in the key-value store.

## `stateStoreKey` (type: `string`):

Key-value store record name used to save incremental monitoring state between runs.

## `deduplicatePosts` (type: `boolean`):

Avoid emitting duplicate posts found through pinned posts, repeated cards, or cross-posted links.

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

Maximum number of pages the crawler should process at the same time.

## `maxRequestRetries` (type: `integer`):

How many times to retry a failed page before writing an error record.

## `requestTimeoutSecs` (type: `integer`):

Maximum time allowed for each page request before it is treated as failed.

## `blockHeavyResources` (type: `boolean`):

Block images, videos, fonts, and stylesheets in the browser to reduce bandwidth, memory use, and run time.

## `maxScrollsPerGroup` (type: `integer`):

Maximum feed scroll attempts per group. Lower values are cheaper and faster but may collect fewer posts.

## `pageWaitMillis` (type: `integer`):

Short wait between scrolls or expansion clicks. Lower values reduce cost but may miss slowly loaded content.

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

Apify Proxy is recommended for reliability.

## `debugMode` (type: `boolean`):

Enable more detailed crawl diagnostics in logs and output records.

## `saveFailedPages` (type: `boolean`):

Stores failed HTML/screenshot snapshots to the key-value store when enabled.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/webscrapingandautomation"
    }
  ],
  "costMode": "lowest_cost",
  "maxPostsPerGroup": 25,
  "sortMode": "recent_activity",
  "commentsMode": "none",
  "maxCommentsPerPost": 0,
  "includeReplies": false,
  "commentSortMode": "top",
  "includeReactionBreakdown": false,
  "includeSharesCount": true,
  "includeMedia": true,
  "downloadMedia": false,
  "extractImageOcr": false,
  "includeGroupMetadata": true,
  "privacyMode": "include_public_author_fields",
  "outputMode": "posts_with_nested_comments",
  "includeErrorRecords": true,
  "incrementalMode": false,
  "stateStoreKey": "PUBLIC_FACEBOOK_GROUPS_STATE",
  "deduplicatePosts": true,
  "maxConcurrency": 1,
  "maxRequestRetries": 1,
  "requestTimeoutSecs": 60,
  "blockHeavyResources": true,
  "maxScrollsPerGroup": 3,
  "pageWaitMillis": 250,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "debugMode": false,
  "saveFailedPages": false
}
```

# Actor output Schema

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

No description

## `comments` (type: `string`):

No description

## `media` (type: `string`):

No description

## `errors` (type: `string`):

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("qaseemiqbal/facebook-group-data-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/webscrapingandautomation" }] }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Group Data Scraper",
        "description": "Extract posts, comments, engagement metrics, links, and media details from public Facebook groups. Monitor public community conversations, track brand or product mentions, research topics, and export structured Facebook group data to spreadsheets, dashboards, databases, webhooks, or AI workflows.",
        "version": "0.1",
        "x-build-id": "dS4PbQtskMh4tRK6T"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/qaseemiqbal~facebook-group-data-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-qaseemiqbal-facebook-group-data-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/qaseemiqbal~facebook-group-data-scraper/runs": {
            "post": {
                "operationId": "runs-sync-qaseemiqbal-facebook-group-data-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/qaseemiqbal~facebook-group-data-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-qaseemiqbal-facebook-group-data-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Public Facebook group URLs",
                        "type": "array",
                        "description": "Public Facebook group feed URLs or public group post permalink URLs. Private groups, credentials, cookies, and login-only content are not supported.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "costMode": {
                        "title": "Cost mode",
                        "enum": [
                            "lowest_cost",
                            "balanced",
                            "maximum_data"
                        ],
                        "type": "string",
                        "description": "Choose the default cost profile. Lowest cost uses smaller limits and avoids optional enrichment unless you turn it on.",
                        "default": "lowest_cost"
                    },
                    "maxPostsPerGroup": {
                        "title": "Maximum posts per group",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Upper limit of post records to extract from each group.",
                        "default": 25
                    },
                    "sortMode": {
                        "title": "Sort mode",
                        "enum": [
                            "recent_activity",
                            "new_posts",
                            "relevance"
                        ],
                        "type": "string",
                        "description": "Best-effort feed/search ordering. Facebook may ignore or hide some order modes in public views.",
                        "default": "recent_activity"
                    },
                    "searchQuery": {
                        "title": "Search query",
                        "type": "string",
                        "description": "Optional keyword search inside each public group."
                    },
                    "dateFrom": {
                        "title": "Date from",
                        "type": "string",
                        "description": "Optional ISO 8601 lower bound for post timestamps."
                    },
                    "dateTo": {
                        "title": "Date to",
                        "type": "string",
                        "description": "Optional ISO 8601 upper bound for post timestamps."
                    },
                    "commentsMode": {
                        "title": "Comments mode",
                        "enum": [
                            "none",
                            "top",
                            "expanded",
                            "all_best_effort"
                        ],
                        "type": "string",
                        "description": "Choose whether to skip comments, collect top visible comments, open post details for more comments, or collect deeper public comments on a best-effort basis.",
                        "default": "none"
                    },
                    "maxCommentsPerPost": {
                        "title": "Maximum comments per post",
                        "minimum": 0,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of visible public comments to collect for each post.",
                        "default": 0
                    },
                    "includeReplies": {
                        "title": "Include replies",
                        "type": "boolean",
                        "description": "Best-effort expansion of public replies under visible comments.",
                        "default": false
                    },
                    "commentSortMode": {
                        "title": "Comment sort mode",
                        "enum": [
                            "top",
                            "newest",
                            "oldest"
                        ],
                        "type": "string",
                        "description": "Preferred comment ordering when Facebook exposes comment sorting in the public view.",
                        "default": "top"
                    },
                    "includeReactionBreakdown": {
                        "title": "Include reaction breakdown",
                        "type": "boolean",
                        "description": "Collect visible reaction counts such as like, love, care, haha, wow, sad, and angry when available.",
                        "default": false
                    },
                    "includeSharesCount": {
                        "title": "Include shares count",
                        "type": "boolean",
                        "description": "Collect the public share count when it is visible on the post.",
                        "default": true
                    },
                    "includeMedia": {
                        "title": "Include media metadata",
                        "type": "boolean",
                        "description": "Collect metadata for visible images, videos, thumbnails, and link previews.",
                        "default": true
                    },
                    "downloadMedia": {
                        "title": "Download media",
                        "type": "boolean",
                        "description": "Store public media files in the default key-value store when URLs are directly downloadable.",
                        "default": false
                    },
                    "extractImageOcr": {
                        "title": "Extract image OCR",
                        "type": "boolean",
                        "description": "Optional OCR hook. Off by default because OCR is slower and may require provider configuration.",
                        "default": false
                    },
                    "includeGroupMetadata": {
                        "title": "Include group metadata",
                        "type": "boolean",
                        "description": "Collect public group title, URL, and group identifier when visible.",
                        "default": true
                    },
                    "privacyMode": {
                        "title": "Privacy mode",
                        "enum": [
                            "include_public_author_fields",
                            "hash_author_ids",
                            "omit_author_fields"
                        ],
                        "type": "string",
                        "description": "Choose whether to include public author fields, hash author identifiers, or omit author fields from the output.",
                        "default": "include_public_author_fields"
                    },
                    "outputMode": {
                        "title": "Output mode",
                        "enum": [
                            "posts_with_nested_comments",
                            "separate_datasets",
                            "flat_table"
                        ],
                        "type": "string",
                        "description": "Choose whether comments stay nested inside post records or are also written to separate datasets for easier analysis.",
                        "default": "posts_with_nested_comments"
                    },
                    "includeErrorRecords": {
                        "title": "Include error records",
                        "type": "boolean",
                        "description": "Write structured error records for private groups, login walls, unavailable posts, and failed requests.",
                        "default": true
                    },
                    "incrementalMode": {
                        "title": "Incremental monitoring mode",
                        "type": "boolean",
                        "description": "Emit only new or changed posts and persist fingerprints in the key-value store.",
                        "default": false
                    },
                    "stateStoreKey": {
                        "title": "State store key",
                        "type": "string",
                        "description": "Key-value store record name used to save incremental monitoring state between runs.",
                        "default": "PUBLIC_FACEBOOK_GROUPS_STATE"
                    },
                    "deduplicatePosts": {
                        "title": "Deduplicate posts",
                        "type": "boolean",
                        "description": "Avoid emitting duplicate posts found through pinned posts, repeated cards, or cross-posted links.",
                        "default": true
                    },
                    "maxConcurrency": {
                        "title": "Maximum concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum number of pages the crawler should process at the same time.",
                        "default": 1
                    },
                    "maxRequestRetries": {
                        "title": "Maximum request retries",
                        "minimum": 0,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many times to retry a failed page before writing an error record.",
                        "default": 1
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout seconds",
                        "minimum": 30,
                        "maximum": 600,
                        "type": "integer",
                        "description": "Maximum time allowed for each page request before it is treated as failed.",
                        "default": 60
                    },
                    "blockHeavyResources": {
                        "title": "Block heavy resources",
                        "type": "boolean",
                        "description": "Block images, videos, fonts, and stylesheets in the browser to reduce bandwidth, memory use, and run time.",
                        "default": true
                    },
                    "maxScrollsPerGroup": {
                        "title": "Maximum scrolls per group",
                        "minimum": 0,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum feed scroll attempts per group. Lower values are cheaper and faster but may collect fewer posts.",
                        "default": 3
                    },
                    "pageWaitMillis": {
                        "title": "Page wait milliseconds",
                        "minimum": 0,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Short wait between scrolls or expansion clicks. Lower values reduce cost but may miss slowly loaded content.",
                        "default": 250
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify Proxy is recommended for reliability.",
                        "default": {
                            "useApifyProxy": true
                        }
                    },
                    "debugMode": {
                        "title": "Debug mode",
                        "type": "boolean",
                        "description": "Enable more detailed crawl diagnostics in logs and output records.",
                        "default": false
                    },
                    "saveFailedPages": {
                        "title": "Save failed pages",
                        "type": "boolean",
                        "description": "Stores failed HTML/screenshot snapshots to the key-value store when enabled.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
