# Facebook Public Groups Scraper - Discussions, Posts & Leads (`madeingermany/facebook-public-group-posts-scraper`) Actor

\[Only $1.5💰] Scrape Facebook public group posts and comments extract text, dates, media URLs, author info, engagement metrics (likes/shares), and detailed comment threads. Perfect for social listening, market research, or tracking community trends. High-speed, stealthy, and requires no login

- **URL**: https://apify.com/madeingermany/facebook-public-group-posts-scraper.md
- **Developed by:** [Made In Germany](https://apify.com/madeingermany) (community)
- **Categories:** Social media
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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/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 Public Group Posts Scraper — Discussions & Buyer Leads

A lightning-fast, production-grade Apify Actor designed to scrape public Facebook group posts, comments, engagement statistics, and media attachments **without requiring login, cookies, or browser automation**.

Built on **Crawlee** and **got-scraping**, this Actor uses HTTP/2 TLS fingerprinting and Facebook's internal GraphQL endpoints to deliver rapid and reliable data extraction at a fraction of the cost of browser-based scrapers.

***

### 💰 Pricing (Pay-Per-Event)

This actor operates on a pay-as-you-go **Pay-Per-Event (PPE)** pricing model. You only pay for what you extract:

| Event Name | Purpose | Price (USD) | Description |
|---|---|---|---|
| **`apify-default-dataset-item`** | result | `$0.0015` | Single result in the default dataset. |
| **`additional-data`** | Additional data | `$0.0001` | Charged for additional data |
| **`apify-actor-start`** | Actor Start | `$0.008` | Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). |

***

### ⚡ Why Choose This Scraper Over Alternatives?

- **No Cookies or Login Required**: Zero risk of account bans. No need to export browser sessions or manage session expiration.
- **Pure HTTP Fast-Path**: Up to **10x faster and 80% cheaper** than Puppeteer or Playwright-based solutions.
- **Pay-Per-Event (PPE) Pricing**: Pay only for successful starts ($0.008) and extracted records ($0.0015) — no wasted compute units.
- **Rich Data Extraction**: Extracts post text, timestamps, authors, permalinks, likes, comments count, share count, and media URLs.
- **Advanced Filtering**: Filter results by keyword search, date ranges (`onlyPostsNewerThan`, `onlyPostsOlderThan`), or sorting options (`CHRONOLOGICAL`, `RECENT_ACTIVITY`, `TOP_POSTS`).
- **Residential Proxy Support**: Pre-configured for seamless rotating residential proxy integration on Apify.

***

### 📥 Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `startUrls` | Array | **Yes** | `[{"url": "https://www.facebook.com/groups/142828695744158/"}]` | Full URLs to public Facebook groups to scrape. |
| `searchQuery` | String | No | `"Public Group Posts"` | Keyword or phrase filter. Keep only posts containing these words. |
| `maxItems` | Integer | No | `50` | Maximum number of posts to scrape per run (up to 50,000). |
| `viewOption` | String | No | `"CHRONOLOGICAL"` | Feed sorting: `CHRONOLOGICAL`, `RECENT_ACTIVITY`, `TOP_POSTS`, `CHRONOLOGICAL_LISTINGS`. |
| `includeComments` | Boolean | No | `true` | Extract top in-feed comments for posts. |
| `fetchAllComments` | Boolean | No | `false` | Fetch full comments and replies for each post. |
| `onlyPostsNewerThan`| String | No | `null` | Absolute date (e.g. `2026-01-01`) or relative period (e.g. `30 days`). |
| `onlyPostsOlderThan`| String | No | `null` | Upper bound date window (e.g. `2026-06-01`). |
| `proxy` | Object | No | `{ "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }` | Apify Proxy configuration. |

#### Sample JSON Input

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/142828695744158/"
    }
  ],
  "searchQuery": "Public Group Posts",
  "maxItems": 10,
  "viewOption": "CHRONOLOGICAL",
  "includeComments": true,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

***

### 📤 Output Data

The scraper pushes structured JSON objects directly to your default Apify dataset.

#### Output Field Descriptions

| Field | Type | Description |
|---|---|---|
| `postId` | String | Unique identifier of the Facebook post. |
| `authorName` | String | Display name of the post author. |
| `authorId` | String | Numeric Facebook ID of the author (when available). |
| `authorUrl` | String | Direct profile URL of the author. |
| `postText` | String | Full textual content of the post. |
| `timestamp` | String | ISO 8601 creation timestamp of the post. |
| `likesCount` | Integer | Total number of reactions / likes. |
| `commentsCount` | Integer | Total number of comments. |
| `sharesCount` | Integer | Total number of shares. |
| `postUrl` | String | Direct permalink to the post. |
| `groupId` | String | Numeric or slug identifier of the group. |
| `groupName` | String | Display name of the Facebook group. |
| `groupUrl` | String | Canonical URL of the Facebook group. |
| `media` | Array | Array of attached media objects with image or video URLs. |
| `topComments` | Array | Array of comments extracted from the feed. |
| `isMarketplaceListing` | Boolean | `true` if the post is a buy/sell marketplace item. |
| `scrapedAt` | String | ISO 8601 timestamp when the data was scraped. |

#### Sample JSON Output

```json
{
  "postId": "142828695744158_100293847290",
  "authorName": "David Miller",
  "authorId": "100078945612",
  "authorUrl": "https://www.facebook.com/user.100078945612",
  "postText": "Welcome to our community! Discussing Public Group Posts and the latest group updates for all members.",
  "timestamp": "2026-09-27T02:00:00.000Z",
  "likesCount": 42,
  "commentsCount": 18,
  "sharesCount": 6,
  "postUrl": "https://www.facebook.com/groups/142828695744158/posts/142828695744158_100293847290/",
  "groupId": "142828695744158",
  "groupName": "Public Group 142828695744158",
  "groupUrl": "https://www.facebook.com/groups/142828695744158/",
  "media": [
    {
      "type": "Photo",
      "url": "https://scontent.xx.fbcdn.net/v/t39.30808-6/sample_media_1.jpg"
    }
  ],
  "topComments": [
    {
      "commentId": "c_142828695744158_100293847290_1",
      "authorName": "Alex Rivera",
      "commentText": "Thanks for sharing this, really helpful!",
      "timestamp": "2026-09-27T02:00:00.000Z"
    }
  ],
  "isMarketplaceListing": false,
  "scrapedAt": "2026-09-28T02:30:00.000Z"
}
```

***

### 🎯 Use Cases

- **Social Listening**: Monitor conversations, sentiments, and trending topics across public Facebook communities.
- **Market Research**: Extract user feedback, product reviews, and niche discussions.
- **Lead Generation & Networking**: Identify active contributors, experts, and community members.
- **Content Aggregation**: Feed community posts into content hubs, analytics pipelines, or AI models.

***

### 🔍 SEO & Discovery Tags

`facebook-scraper`, `facebook-group-posts`, `facebook-comments`, `social-media-scraper`, `facebook-feed`, `no-cookies`, `crawlee`, `apify-actor`

# Actor input Schema

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

Full URLs to public Facebook groups you want to scrape.

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

Optional keyword or phrase filter to keep only posts containing these words.

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

Maximum number of posts to scrape per run.

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

How to sort posts in the group feed.

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

If enabled, extracts top comments available directly within the group feed stream.

## `fetchAllComments` (type: `boolean`):

If enabled, fetches comments and replies for each post.

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

Filter posts newer than this date (e.g. 2026-01-01 or 30 days).

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

Filter posts older than this date (e.g. 2026-06-01).

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

Apify Proxy settings. Built-in residential proxies are recommended for Facebook scraping.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/142828695744158/"
    }
  ],
  "searchQuery": "Public Group Posts",
  "maxItems": 50,
  "viewOption": "CHRONOLOGICAL",
  "includeComments": true,
  "fetchAllComments": false,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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/142828695744158/"
        }
    ],
    "searchQuery": "Public Group Posts",
    "maxItems": 50,
    "proxy": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("madeingermany/facebook-public-group-posts-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/142828695744158/" }],
    "searchQuery": "Public Group Posts",
    "maxItems": 50,
    "proxy": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("madeingermany/facebook-public-group-posts-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/142828695744158/"
    }
  ],
  "searchQuery": "Public Group Posts",
  "maxItems": 50,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call madeingermany/facebook-public-group-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,madeingermany/facebook-public-group-posts-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/7PX1ULBoaPsckbAxr/builds/mepK98bbRpPeDqG7a/openapi.json
