# Facebook Groups Scraper - Posts by Date (`icoe-man/facebook-groups-scraper`) Actor

Scrape posts from public Facebook groups with a date filter and optional comments and replies, plus the group's details for free. No login or cookies.

- **URL**: https://apify.com/icoe-man/facebook-groups-scraper.md
- **Developed by:** [Moshe Zaudi](https://apify.com/icoe-man) (community)
- **Categories:** Social media, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.60 / 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 - Posts by Date

Collect the latest posts of public Facebook groups, optionally only those **newer than a date**, with their comments and replies if you want them. Use it for community and market research, product feedback, social listening, trend tracking or AI datasets.

- Paste group links and get clean, flat JSON, CSV or Excel
- Up to 300 posts per group and 200 groups per run (live collection covers about 5,000 posts per run, or about 1,000 with comments)
- Only posts newer than a date, for example `7 days` or `2026-09-01`
- Optional comments and replies for every post, in the same run
- No Facebook login, no cookies and no proxies to manage

### Why this one

| | |
|---|---|
| Date filter | Only posts newer than a date, for example `7 days` |
| Free group details | One free `group` row per group with its name and member count |
| Comments in the same run | Optional comments and replies for every post |
| No start fee | You pay per post plus a small fee per group. Private groups are not charged |
| No login | No Facebook login, no cookies and no proxies to manage |

### What you get

```json
{
  "platform": "facebook",
  "type": "post",
  "id": "1300000000000001",
  "url": "https://www.facebook.com/1300000000000001",
  "section": "group",
  "postType": "text",
  "text": "Does anyone know a good tutorial for setting up a home telescope?",
  "language": "en",
  "createdAt": "2026-10-16T19:45:00.000Z",
  "author": { "id": "100000000000002", "username": "jane.doe", "name": "Jane Doe", "profileUrl": "https://www.facebook.com/jane.doe" },
  "reactionCount": 18,
  "reactions": { "like": 15, "love": 2, "care": 1, "haha": 0, "wow": 0, "sad": 0, "angry": 0 },
  "commentCount": 9,
  "shareCount": 0,
  "imageUrls": [],
  "videoUrl": null,
  "thumbnailUrl": null,
  "link": null,
  "hashtags": [],
  "mentionedProfileIds": [],
  "groupId": "700000000000001",
  "scrapedAt": "2026-10-17T16:09:00.000Z"
}
```

Each group also returns one free `group` row with its name, member count and, when the group has one, its description. With **Include comments** on, each post's comments and replies follow as `comment` and `reply` rows, linked by `postId`. Only public groups can be collected.

### How to use it

1. Add one or more group links, such as `https://www.facebook.com/groups/766064070108194`. A link to a post inside a group works too.
2. Set **Max posts per group** and, if you like, **Only posts newer than**.
3. Optional: turn on **Include comments** and choose how many per post.
4. Run it. Posts we collected recently arrive instantly. New groups take 1-5 minutes each, and up to 3 groups are processed in parallel.

Calling it from an AI agent or with a short timeout? Start the run asynchronously and fetch the dataset when it finishes, or turn on **Previously collected data only** for an instant answer.

### Pricing

Pay only for what you get:

| | Free | Starter | Scale | Business |
|---|---|---|---|---|
| Per 1,000 posts | $4.00 | $3.50 | $3.00 | $2.60 |
| Per 1,000 comments | $1.25 | $1.05 | $0.90 | $0.75 |
| Per post with comments | $0.005 | $0.005 | $0.005 | $0.005 |
| Per group processed | $0.025 | $0.025 | $0.025 | $0.025 |

The group fee is charged once for every group we collect successfully, and the group details row is free. With **Include comments** on, every post also carries the per-post comment fee, even when it has no comments. Groups that cannot be collected, such as private ones, are not charged.

**Example:** 500 posts from 10 groups on the Starter plan cost 500 × $0.0035 + 10 × $0.025 = **$2.00**. Adding up to 10 comments per post (5,000 comments) adds 5,000 × $0.00105 + 500 × $0.005 = **$7.75**.

Use **Maximum cost per run** in the run options to cap your spend. The Actor stops cleanly at that limit.

**Free plan:** you get previously collected posts plus a small live allowance each day. Any paid Apify plan removes the limit.

### FAQ

#### Is scraping Facebook groups legal?

This Actor collects publicly visible posts from public groups only. Group posts are written by private people and are personal data under laws such as GDPR, so only collect what you have a legitimate reason to process, and consult your lawyer if unsure.

#### How fresh is the data?

The input form starts **Reuse data collected within** at 24 hours, so you get posts we collected within the last day instantly, or a fresh collection. API calls that leave it out also use 24 hours. Higher values reuse older collected data (up to 720 hours). Set it to 0 to always collect live. If a group cannot be collected live right now (for example because the run's live limit or the free plan's daily allowance is used up), you get any posts we collected before, with a note in `OUTPUT`. With 0, such groups are only reported in `OUTPUT`.

#### Can I use it via API, Make, Zapier or n8n?

Yes. Use the Apify API or any Apify integration. Each run's results are in its default dataset, and `OUTPUT` in the key-value store has a per-group summary.

#### Can I collect private groups?

No. Only public groups can be collected. Private groups are skipped and not charged.

#### Why did a group return fewer posts than I asked for?

**Max posts per group** is a maximum. A date filter, or a group with fewer recent posts, returns less. A very large request for one group (many posts, each with many comments) is trimmed to the latest posts that fit: about 270 posts at 100 comments per post, or 58 at 500. `OUTPUT` then shows a note starting with "Large request".

#### How many groups fit in one run?

Up to 200. Live collection is capped per run: about 145 new groups at 25 posts each, or about 37 at 25 posts with 24 comments each. Further groups get previously collected data, which may be older, or are marked limited in `OUTPUT`, so split bigger lists across runs. Live collection is also capped per account each day, at about two such runs.

#### Can I use it from an AI agent or MCP server?

Yes. Connect the Apify MCP server at mcp.apify.com, or call the Apify API. New groups can take minutes, so start long runs asynchronously and fetch the dataset when the run finishes. For an instant answer, turn on **Previously collected data only**.

#### Why did I get no results?

Common reasons: the group is private or was deleted, it has no posts newer than your date, the free plan's daily live allowance is used up, or the run reached your **Maximum cost per run**. The run's `OUTPUT` record in the key-value store shows the status of every group, with a note when something went wrong, and lists any skipped input with the reason.

### Related Actors

- [Facebook Posts Scraper - Pages & Date Range](https://apify.com/icoe-man/facebook-posts-scraper)
- [Facebook Posts Search Scraper - Bulk Keywords](https://apify.com/icoe-man/facebook-posts-search-scraper)
- [Facebook Comments Scraper - Reaction Breakdown](https://apify.com/icoe-man/facebook-comments-scraper)
- [Facebook Reels Scraper - Video URLs & Engagement](https://apify.com/icoe-man/facebook-reels-scraper)
- [Social Media Comments Scraper - FB, IG, TikTok, Reddit](https://apify.com/icoe-man/social-media-comments-scraper)
- [Reddit Scraper - Posts & Comment Threads](https://apify.com/icoe-man/reddit-scraper)
- [Reddit Comments Scraper - Full Threads & Depth](https://apify.com/icoe-man/reddit-comments-scraper)
- [Instagram Comments Scraper - Profiles & Date Range](https://apify.com/icoe-man/instagram-comments-scraper)
- [TikTok Comments Scraper - Profiles & Date Range](https://apify.com/icoe-man/tiktok-comments-scraper)

**Something is wrong?** Open an issue in the Issues tab. We usually respond within 24 hours.

# Actor input Schema

## `groupUrls` (type: `array`):

Links to public Facebook groups, e.g. https://www.facebook.com/groups/766064070108194, or just the group id, one per line. Up to 200 per run.

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

How many of each group's latest posts to collect. Each post is billed, plus a small fee per group.

## `onlyNewerThan` (type: `string`):

Skip posts published before this date. Use a date like 2026-01-31 or a relative value like "7 days". Leave empty for no date limit.

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

Also collect the comments of every post. Each comment is billed, plus a small fee per post whose comments we collect.

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

How many comments (and replies, if enabled) to collect per post when Include comments is on. Up to 24 is fastest. Above 80, a large request collects fewer posts per group, e.g. about 270 at 100 or 58 at 500 (the run's OUTPUT notes it).

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

Also collect replies to comments when Include comments is on. Replies count toward the comment limit.

## `maxDataAgeHours` (type: `integer`):

If we collected these posts within this many hours, you get them instantly at the same price. Use 0 to always collect fresh data.

## `cacheOnly` (type: `boolean`):

Return only posts we already collected, without waiting for live collection. Useful for AI agents with short timeouts.

## Actor input object example

```json
{
  "groupUrls": [
    "https://www.facebook.com/groups/766064070108194"
  ],
  "maxPostsPerGroup": 5,
  "includeComments": false,
  "maxCommentsPerPost": 24,
  "includeReplies": false,
  "maxDataAgeHours": 24,
  "cacheOnly": false
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "groupUrls": [
        "https://www.facebook.com/groups/766064070108194"
    ],
    "maxPostsPerGroup": 5,
    "maxDataAgeHours": 24
};

// Run the Actor and wait for it to finish
const run = await client.actor("icoe-man/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 = {
    "groupUrls": ["https://www.facebook.com/groups/766064070108194"],
    "maxPostsPerGroup": 5,
    "maxDataAgeHours": 24,
}

# Run the Actor and wait for it to finish
run = client.actor("icoe-man/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 '{
  "groupUrls": [
    "https://www.facebook.com/groups/766064070108194"
  ],
  "maxPostsPerGroup": 5,
  "maxDataAgeHours": 24
}' |
apify call icoe-man/facebook-groups-scraper --silent --output-dataset

```

## MCP server setup

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