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

Scrape public Facebook Groups: posts, authors, timestamps, reactions with a per-reaction breakdown, comment and share counts, photos, videos, links and group details. Many groups per run, a per-group limit, date cutoff and Facebook's Newest/Top feeds. Private groups are reported, never accessed.

- **URL**: https://apify.com/coregent/facebook-groups-scraper.md
- **Developed by:** [Delowar Munna](https://apify.com/coregent) (community)
- **Stats:** 1 total users, 1 monthly users, 93.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 group post 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 Groups Scraper

![Facebook Groups Scraper](https://github.com/coregentdevspace/facebook-groups-scraper-assets/blob/main/thumbnail-facebook-groups-scraper.png)

Scrape **public Facebook Groups** and get one clean row per post: text, author, timestamp,
reactions with a per-reaction breakdown, comment and share counts, photos, videos, link cards and
the group it came from. Read many groups in one run, set a limit per group, stop at a date, and choose
Facebook's **Newest** or **Top** feed. **You never provide a Facebook login, cookies or a session.**

***

### Quick start

1. Paste one or more public group URLs into **Facebook Group URLs**.
2. Set **Maximum posts per group**.
3. Leave **Proxy configuration** on its default, Apify Residential — it is required for Facebook groups
   and included in the price.
4. Run.

```json
{
  "startUrls": [{ "url": "https://www.facebook.com/groups/javascript.developers/" }],
  "resultsLimit": 100
}
```

Every run also writes a `RUN_SUMMARY` record to the key-value store with a status for **each
group**, and — if Facebook refused or failed any request — a `RETRY_INPUT` record you can run as-is.

***

### What it scrapes

| Per post | Per group (on every row) |
|---|---|
| Post ID and canonical URL | Group ID, name, slug and URL |
| Text | Privacy (`PUBLIC`) |
| Created time | Member count (see note below) |
| Author: ID, name, profile URL, picture | Description, cover image, locations (optional) |
| Anonymous-participant flag | |
| Reactions, comments, shares | |
| Reaction breakdown: like, love, care, haha, wow, sad, angry | |
| Photos (with size and Facebook's alt text), videos, link cards | |
| The post it shares, if any | |
| Top-comment preview (optional) | |

Flat columns (`groupName`, `authorName`, `reactionsCount`, `reactionLikeCount`, …) sit beside the
structured objects, so a CSV export opens cleanly in a spreadsheet.

***

### Which URLs work

```
https://www.facebook.com/groups/javascript.developers/     a group by slug
https://www.facebook.com/groups/874728723021553            a group by numeric ID
https://web.facebook.com/groups/bitcoin                    web. host
https://m.facebook.com/groups/bitcoin                      mobile host
facebook.com/groups/bitcoin/?ref=share                     tracking parameters are ignored
https://www.facebook.com/groups/bitcoin/about              trailing sections are ignored
```

These are **rejected, with a reason in the log**:

| Input | Why |
|---|---|
| `facebook.com/nasa` | A Page, not a group — use **Facebook Posts Scraper** for Pages and profiles |
| `facebook.com/groups/x/posts/123` | A single group post — supply the group itself |
| `facebook.com/groups/feed` | Facebook's own groups interface, not a group |
| `example.com/…` | Not a Facebook URL |

***

### Input examples

**Several groups, newest posts from the last 30 days:**

```json
{
  "startUrls": [
    { "url": "https://www.facebook.com/groups/javascript.developers/" },
    { "url": "https://www.facebook.com/groups/874728723021553" }
  ],
  "resultsLimit": 500,
  "sort": "NEWEST",
  "postsNewerThan": "30 days",
  "includeGroupDetails": true,
  "includeTopComments": false
}
```

**Popular discussions only, with the comment preview:**

```json
{
  "startUrls": [{ "url": "https://www.facebook.com/groups/bitcoin" }],
  "resultsLimit": 50,
  "sort": "TOP",
  "minReactions": 10,
  "includeTopComments": true
}
```

`postsNewerThan` takes a date (`2026-10-01`, `2026-10-01T00:00:00Z`) or a period counted back from
now (`24 hours`, `7 days`, `2 weeks`, `3 months`, `1 year`).

***

### Output

![Group posts table view](https://github.com/coregentdevspace/facebook-groups-scraper-assets/blob/main/facebook-groups-scraper-output-group-post-table-view.png)

The **Group posts** table above is one of four views; the full data is easiest to read as JSON. Every
sample below is a **real record** from a run of this Actor on a public group (6 October 2026), with
two edits for this page: individual members' names, IDs and profile links are replaced with
placeholders, and long Facebook image URLs are shortened. Group names, post text and every count are
as returned.

**`null` means Facebook did not publish the value — never zero.** A `0` is a published zero.

#### One complete record

Every field a row carries — the post, its author, engagement, media, link cards, the `group` object,
and the flat CSV columns at the end. This post had no reactions, so its breakdown is `null`; the
Engagement view below shows one that has one.

```json
{
  "type": "group_post",
  "postId": "3632018510279711",
  "postUrl": "https://www.facebook.com/groups/javascriptdevelopers/permalink/3632018510279711/",
  "text": "**A lighter framework doesn't mean a lighter feature set.**\n\nVue.js gives teams a gentle learning curve without sacrificing performance or flexibility.\n\n- Component-based, reactive UIs built for fast iteration\n- Easy integration with existing backend systems and APIs\n- Scalable architecture for growing single-page applications\n\nWe build custom projects from scratch and support migrations, and our Vue.js consulting helps teams choose the right state management and tooling before development starts. Clean, maintainable frontend code is our standard.\n\nLearn more: [https://mobisoftinfotech.com/services/vue-js-development-company?utm_source=facebook&utm_medium=community&utm_campaign=vue-js-development-company](https://mobisoftinfotech.com/services/vue-js-development-company?utm_source=facebook&utm_medium=community&utm_campaign=vue-js-development-company)\n\n#VueJsDevelopment #FrontendEngineering #webdevelopment #TechConsulting #JavaScriptFrameworks #VueJSDesign #vuejs",
  "createdAt": "2026-09-16T04:37:07.000Z",
  "postType": "link",
  "author": {
    "id": "100000000000001",
    "name": "Group Member 1",
    "url": "https://www.facebook.com/group.member.1",
    "profilePictureUrl": "https://scontent.feoh14-1.fna.fbcdn.net/v/…/359479521_848246963386214_2890803815784130742_n.jpg?…",
    "isAnonymous": false
  },
  "engagement": {
    "reactions": 0,
    "comments": 0,
    "shares": 0,
    "reactionBreakdown": null
  },
  "media": [],
  "externalLinks": [
    {
      "url": "https://mobisoftinfotech.com/services/vue-js-development-company?utm_source=facebook&utm_medium=community&utm_campaign=vue-js-development-company",
      "domain": "mobisoftinfotech.com",
      "title": "Vue.js Development Company | Vue.js Consulting Services",
      "description": "Expert Vue.js development company offering custom Vue.js development, consulting services, and scalable web application solutions for startups & enterprises.",
      "thumbnail": "https://external.feoh8-1.fna.fbcdn.net/emg1/v/…/8978232051750922306?…"
    }
  ],
  "topComments": [],
  "sharedPost": null,
  "group": {
    "id": "197988240349439",
    "name": "[JS] Javascript developers",
    "slug": "javascript.developers",
    "url": "https://www.facebook.com/groups/javascript.developers/",
    "privacy": "PUBLIC",
    "memberCount": 15000,
    "memberCountText": "15.0K members",
    "description": "This group is ment for posting new ideas, dev tools and anything related to javascript development.",
    "coverImageUrl": "https://scontent-phl2-1.xx.fbcdn.net/v/…/44983283_1044575012368939_4290949478648643584_n.jpg?…",
    "locations": []
  },
  "inputUrl": "https://www.facebook.com/groups/javascript.developers/",
  "scrapedAt": "2026-10-06T04:22:51.271Z",
  "groupId": "197988240349439",
  "groupName": "[JS] Javascript developers",
  "groupUrl": "https://www.facebook.com/groups/javascript.developers/",
  "authorId": "100000000000001",
  "authorName": "Group Member 1",
  "authorUrl": "https://www.facebook.com/group.member.1",
  "isAnonymousAuthor": false,
  "reactionsCount": 0,
  "commentsCount": 0,
  "sharesCount": 0,
  "reactionLikeCount": null,
  "reactionLoveCount": null,
  "reactionCareCount": null,
  "reactionHahaCount": null,
  "reactionWowCount": null,
  "reactionSadCount": null,
  "reactionAngryCount": null
}
```

#### Engagement view

Flat counts, ready for a spreadsheet. The per-reaction columns add up to `reactionsCount`; when
Facebook publishes a breakdown that does not account for the total, the missing types are left blank
rather than guessed as 0.

```json
{
  "postUrl": "https://www.facebook.com/groups/javascriptdevelopers/permalink/3635118149969747/",
  "createdAt": "2026-09-19T06:00:16.000Z",
  "groupName": "[JS] Javascript developers",
  "authorName": "Group Member 2",
  "reactionsCount": 1,
  "commentsCount": 0,
  "sharesCount": 0,
  "reactionLikeCount": 1,
  "reactionLoveCount": 0,
  "reactionCareCount": 0,
  "reactionHahaCount": 0,
  "reactionWowCount": 0,
  "reactionSadCount": 0,
  "reactionAngryCount": 0
}
```

#### Media & links view

Photos (with size and Facebook's alt text), videos (duration), link cards (title, description,
thumbnail) and the post a share points to.

```json
{
  "postUrl": "https://www.facebook.com/groups/javascriptdevelopers/permalink/3636188893196006/",
  "createdAt": "2026-09-23T05:51:50.000Z",
  "groupName": "[JS] Javascript developers",
  "postType": "video",
  "media": [
    {
      "type": "video",
      "url": "https://www.facebook.com/100000000000002/videos/1352395623381585/?idorvanity=197988240349439",
      "thumbnailUrl": "https://scontent.feoh14-1.fna.fbcdn.net/v/…/797515438_1449406367112910_6028551311177152025_n.jpg?…",
      "videoUrl": null,
      "durationSeconds": 54,
      "id": "1352395623381585"
    }
  ],
  "externalLinks": [
    {
      "url": "http://Higgsfield.ai/",
      "domain": "higgsfield.ai",
      "title": null,
      "description": null,
      "thumbnail": null
    }
  ],
  "sharedPost": null,
  "text": "AI Character Swap Tutorial: Kisi Bhi Video Me Apne Aap Ko Replace Karo! 🤯\n.\nKya aap bhi kisi viral movie scene ya video me khud ko replace karna chahte hain? 🤖✨ Is video me dekhiye kaise aap Higgsfield AI (Genjutsu) aur ChatGPT ki madad se ek perfect Character Sheet prompt banakar scene recreation kar sakte hain!\nSteps covered in this video:\nCharacter Sheet Prompt kaise banayein.\nCustom Outfit/Clothing instruction kaise set karein.\nHiggsfield.ai Genjutsu tool se video recreation process.\nVideo pasand aayi ho toh Like, Share aur Follow/Subscribe karna mat bhoolna! 🚀\n.\n#AITutorial #HiggsfieldAI #Genjutsu #CharacterSwap #AIEditing #VideoEditingTutorial #ContentCreator #DigitalSkills #TechShorts #AIMagic #AIVideoGeneration"
}
```

#### Top comments view

Filled when **Include top-comment preview** is on — the few comments Facebook already sends with each
post, at no extra cost. (This sample is from a different run with the preview switched on.) For
complete threads and replies, pass `postUrl` to **Facebook Comments Scraper**.

```json
{
  "postUrl": "https://www.facebook.com/groups/javascriptdevelopers/permalink/3596056727209223/",
  "groupName": "[JS] Javascript developers",
  "authorName": "Group Member 3",
  "commentsCount": 2,
  "topComments": [
    {
      "id": "3596092757205620",
      "text": "Essaie vous même pour voir",
      "createdAt": "2026-08-14T09:25:41.000Z",
      "author": {
        "id": "100000000000003",
        "name": "Group Member 3",
        "url": "https://www.facebook.com/group.member.3",
        "isAnonymous": false
      },
      "replyCount": 0
    },
    {
      "id": "3596093130538916",
      "text": "@highlight",
      "createdAt": "2026-08-14T09:26:07.000Z",
      "author": {
        "id": "100000000000003",
        "name": "Group Member 3",
        "url": "https://www.facebook.com/group.member.3",
        "isAnonymous": false
      },
      "replyCount": 0
    }
  ],
  "text": "Salut les dev c'est déjà possible de faire des maquettes avec ChatGPT #dev #development #chatgptprompts #UIUXDesigner #webdevelopment"
}
```

***

### FAQ

#### Does the group need to be public?

Yes. Only groups whose posts anyone can see are supported. A **private** group is reported in
`RUN_SUMMARY` as `PRIVATE_OR_LOGIN_REQUIRED` with whatever Facebook shows publicly about it (name,
member count) — the Actor never tries to get inside it, and does not bypass membership controls.

#### Do I need a Facebook login or cookies?

No. The Actor reads only what Facebook shows a logged-out visitor, and never asks for credentials,
cookies, a session or a token.

#### Can I scrape several groups at once?

Yes — as many as you like. They are read in parallel, posts within each group in order. One group
failing never stops the others; each gets its own status in `RUN_SUMMARY`.

#### Can I filter by date?

Yes, with **Posts newer than**. With the **Newest** feed the Actor stops reading a group as soon as it
passes your cutoff, rather than fetching older posts to throw away.

#### What sorting modes are supported?

- **Newest** — Facebook's chronological group feed.
- **Top** — Facebook's default ranked feed, which lifts a few older high-engagement posts to the top.

Both are Facebook's own ordering; the Actor never re-sorts what it collected. **Recent activity** is
not offered: read logged out it came back in exactly the **Top** order, so it could not be shown to
work.

#### What data comes back for each post?

See [What it scrapes](#what-it-scrapes) and the [samples](#output). Anonymous posts come back
as `"authorName": "Anonymous participant"`, `"isAnonymousAuthor": true`, with author ID and URL left
empty — the Actor never tries to identify an anonymous poster.

#### Are comments included?

The **comment count** always is. Switch on **Include top-comment preview** to also get the few top
comments Facebook already sends with each post — text, commenter, time and reply count. It costs no
extra requests and is not charged.

#### How do I get full comments and replies?

Pass the returned `postUrl` values to **Coregent Facebook Comments Scraper**, which is built for
complete threads and replies.

#### Why might I get fewer posts than Facebook shows?

- The group has fewer posts than your limit, or your date cutoff or filters removed some.
- Facebook can refuse or fail a request part-way through a group. The posts collected up to that
  point are complete, the group is marked `PARTIAL_RESULT`, and it is written to `RETRY_INPUT`.
- Facebook counts some items as posts that it does not show a logged-out visitor.

#### How long does a large group take?

The first ~50 posts of a group come back in one request. After that Facebook serves 3 posts per
request, so 500 posts from one group is roughly 150 further requests — a few minutes. Several groups
run in parallel, so 10 groups × 100 posts takes about as long as one group of 100.

#### Is the member count exact?

Facebook shows a logged-out visitor only a rounded figure such as "93.5K members". `memberCount` is
that figure as a number (93500), and `memberCountText` keeps the original wording so nobody mistakes
it for an exact count.

#### How is pricing calculated?

You pay a small fee per **public group read** — opening a group's feed costs the same whatever it
yields — plus a fee per **group post delivered**. You are **not** charged for group details, the
top-comment preview, pagination, retries, private, missing or unavailable groups, duplicates, or posts
your filters removed. If filters or a date range match very few posts, a group stops early rather than
reading far past them; the log says so.
Live rates are on the **Pricing** tab — this README deliberately doesn't quote figures.

#### Can I schedule runs?

Yes. Use an Apify **Schedule** with **Posts newer than** set to your interval (for example `24 hours`
on a daily schedule) to collect only new posts each time.

#### Can I use it through the API or MCP?

Yes. Like every Apify Actor it can be started through the Apify API, the JavaScript and Python
clients, integrations (Make, Zapier, n8n and others) and Apify's MCP server for AI agents. The
**API** tab on the Actor's page has ready-made snippets.

***

### 🚦 Proxy policy

**Apify Residential proxy is used by default, and you pay nothing extra for it** — its bandwidth is
included in the price.

Residential is required, not a premium option: Facebook refuses public groups to datacenter addresses.
Tested from Apify datacenter, every group page redirected to the login screen and the group feed was
refused on the first request. From residential addresses the same groups returned every post asked
for.

So if you switch the proxy to datacenter, or turn it off, the Actor uses Apify Residential anyway and
says so in the log — otherwise the run would return nothing.

To route through your own provider instead, supply it in the proxy editor's **Custom proxy URLs**
field — that traffic goes through your account and is honoured in full:

```
http://user:pass@proxy.iproyal.com:12321
http://user:pass@proxy.brightdata.com:22225
http://user:pass@proxy.oxylabs.io:7777
```

***

### Group statuses in `RUN_SUMMARY`

| Status | Meaning |
|---|---|
| `SUCCESS` | Read to your limit, your date cutoff, or the end of the feed |
| `NO_POSTS` | The group is readable but returned no posts |
| `PARTIAL_RESULT` | Some posts collected, then Facebook refused or failed a request |
| `PRIVATE_OR_LOGIN_REQUIRED` | A private group — not supported |
| `GROUP_NOT_FOUND` | Deleted, renamed, or never existed |
| `GROUP_UNAVAILABLE` | The page loaded but carried no readable feed |
| `RATE_LIMITED` / `BLOCKED` | Facebook refused before any post was collected |
| `TEMPORARY_FACEBOOK_ERROR` | A Facebook server error that retries did not clear |

Invalid URLs are listed under `invalidByReason` and never reach the crawler.

***

### Related Actors

- **Facebook Posts Scraper** — posts from Facebook Pages and profiles.
- **Facebook Comments Scraper** — full comment threads and replies for any post URL.
- **Facebook Pages Leads Scraper** — business contact details from Facebook Pages.
- **Facebook Ads Library Scraper** — ads from Meta's Ad Library.

***

### Privacy and compliance

This Actor is unofficial and is not affiliated with, endorsed by or sponsored by Meta or Facebook.

- It extracts only content visible to a logged-out visitor of a **public** group.
- Private and member-only groups are not supported, and membership controls are never bypassed.
- Anonymous participants are never de-anonymized.
- Public posts can still contain personal data. You are responsible for processing the results
  lawfully (for example under GDPR or CCPA), and should collect only data you have a legitimate reason
  to process.

# Actor input Schema

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

One or more PUBLIC Facebook Group URLs, e.g. https://www.facebook.com/groups/{group}. Slugs and numeric IDs both work, on www., web. and m.facebook.com; tracking parameters and trailing paths such as /about are ignored. Private or member-only groups are not supported and are reported as PRIVATE_OR_LOGIN_REQUIRED. Page, profile and single-post URLs are rejected with a reason.

## `resultsLimit` (type: `integer`):

Maximum number of posts to save PER GROUP — not across the whole run. Up to about 50 come back in the first request; beyond that Facebook serves 3 posts per page, so large limits take proportionally longer. You are charged only for posts you receive.

## `sort` (type: `string`):

Which Facebook group feed to read. 'Newest' is Facebook's own chronological group feed. 'Top' is Facebook's default ranked feed, which lifts a few older high-engagement posts to the top. Both are Facebook's ordering, not a re-sort by this Actor. 'Recent activity' is not offered: logged out it returned exactly the 'Top' order, so it could not be shown to work.

## `postsNewerThan` (type: `string`):

Only return posts published after this point. A date (2026-10-01 or 2026-10-01T00:00:00Z) or a period counted back from now: 24 hours, 7 days, 2 weeks, 3 months, 1 year. With 'Newest' the Actor stops reading a group as soon as it passes the cutoff instead of fetching old posts to throw away.

## `includeGroupDetails` (type: `boolean`):

Add the group's public description, member-count text, cover image and locations to every row's `group` object. Group ID, name, slug, URL, privacy and member count are always included. Free either way.

## `includeTopComments` (type: `boolean`):

Add the few top comments Facebook already ships with each post in the group feed (text, commenter, time, reply count). No extra requests and no extra charge. This is a preview, not the full thread — for every comment and reply, pass the returned postUrl values to coregent/facebook-comments-scraper.

## `minReactions` (type: `integer`):

Only return posts with at least this many reactions. 0 = no filter. A post whose count Facebook did not publish is kept, not dropped. Filtered-out posts are never charged.

## `minComments` (type: `integer`):

Only return posts with at least this many comments. 0 = no filter. Filtered-out posts are never charged.

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

Apify RESIDENTIAL proxy is used by default, and its bandwidth is included in the per-post price — you pay nothing extra for it. Facebook refuses public groups to datacenter addresses (measured: the group page redirects to login), so a datacenter or no-proxy setting is switched to residential automatically. To use your own provider instead, supply Custom proxy URLs.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/javascript.developers/"
    }
  ],
  "resultsLimit": 20,
  "sort": "NEWEST",
  "postsNewerThan": "",
  "includeGroupDetails": true,
  "includeTopComments": false,
  "minReactions": 0,
  "minComments": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `engagement` (type: `string`):

No description

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

No description

## `comments` (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/javascript.developers/"
        }
    ],
    "resultsLimit": 20,
    "sort": "NEWEST",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("coregent/facebook-groups-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.facebook.com/groups/javascript.developers/" }],
    "resultsLimit": 20,
    "sort": "NEWEST",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("coregent/facebook-groups-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/javascript.developers/"
    }
  ],
  "resultsLimit": 20,
  "sort": "NEWEST",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call coregent/facebook-groups-scraper --silent --output-dataset

```

## MCP server setup

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