# Facebook Groups Search Scraper — Member Size & Activity Metrics (`scrapeflow/facebook-groups-search-scraper`) Actor

Facebook Groups Search Scraper — Member Size & Activity Metrics helps you extract group data from Facebook search results fast perfect for lead gen, market research, and community insights. ⚡ Gather names, URLs & more efficiently. Automate outreach with confidence!

- **URL**: https://apify.com/scrapeflow/facebook-groups-search-scraper.md
- **Developed by:** [ScrapeFlow](https://apify.com/scrapeflow) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 38 total users, 16 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

### Facebook Groups Search Scraper — Member Size & Activity Metrics

Facebook Groups Search Scraper — Member Size & Activity Metrics finds public Facebook groups by keyword or direct link and turns each one into a ranked row: `memberCount`, `postsLastMonth`, `postsLastDay`, an activity score (posts per month per 1,000 members), a growth proxy (`membersPerDaySinceCreation`) and `groupAgeDays` — plus a per-keyword rollup written to the run's key-value store. It's built for community managers scouting where to post, agencies sizing niches for clients, and researchers benchmarking group activity at scale. Every number comes straight off the group's own public About page.

### What is Facebook Groups Search Scraper?

Facebook Groups Search Scraper — Member Size & Activity Metrics is an Apify Actor that reads a public Facebook group's About page once and returns a typed row describing its size, its posting activity, and how fast it's growing. Give it keywords, direct group URLs, or a mix of both, and it measures every group it can reach, ranks them, and writes one row per group to the dataset.

No Facebook account or login is required. The Actor reads each group's About page logged out, the same page any anonymous visitor sees.

- 🔍 Discovers groups two ways — keyword search or direct `facebook.com/groups/...` links — mixed freely in one input list
- 👥 Returns real numeric metrics (`memberCount`, `postsLastDay`, `postsLastMonth`), not just Facebook's rounded prose
- ⚡ Computes an activity score (`postsPerMonthPer1kMembers`) so a small, busy group isn't buried under a large, quiet one
- 🏆 Ranks every group by the metric you choose (`rankBy`) and can shortlist just the top N per keyword (`topGroupsLimit`)
- 🕒 Captures `groupAgeDays` and `createdAt` from the group's own creation timestamp
- 📤 Exports as JSON, CSV or Excel straight from the Apify dataset, or reads live through the Apify API

### What data can I extract with Facebook Groups Search Scraper?

Every measured group produces one dataset row carrying its identity, its size and activity numbers, and the query that found it.

| Field | Example Value | Use Case |
| ----- | ----- | ----- |
| `query` | `"real estate investing"` | Which keyword (or `direct_urls`) found this group |
| `rank` | `1` | Position under the chosen `rankBy` metric; `null` if unrankable |
| `rankBy` | `"activityScore"` | Which metric produced the rank |
| `id` | `"123456789012345"` | Facebook's internal group ID |
| `name` | `"Real Estate Investing for Beginners"` | Group name |
| `url` | `"https://www.facebook.com/groups/realestateinvestingforbeginners/"` | Canonical group link |
| `visibility` | `"Public"` | Read from the group's real privacy label; `null` when Facebook doesn't expose one |
| `memberCount` | `84213` | Exact member count, parsed to an integer |
| `memberCountText` | `"84,213 members"` | The raw text Facebook rendered, before parsing |
| `memberInfo` | `"84,213 members"` | Legacy prose column, kept for backward compatibility |
| `postsLastDay` | `22` | Posts in the last day |
| `postsLastMonth` | `640` | Posts in the last month |
| `postFrequency` | `"21.3 posts a day"` | Legacy prose derived from the two post counts |
| `postsPerMonthPer1kMembers` | `7.601` | Activity score — posts/month per 1,000 members |
| `membersPerDaySinceCreation` | `18.435` | Growth proxy — members gained per day since creation |
| `groupAgeDays` | `4568` | Days since the group was created |
| `createdAt` | `"2013-11-02T00:00:00Z"` | Group creation timestamp, decoded from Facebook's own epoch |
| `newMembersText` | `"312 new members this week"` | Facebook's own recent-growth sentence |
| `profilePictureUri` | `"https://scontent.xx.fbcdn.net/v/t39.../group.jpg"` | Group cover/profile image URL |
| `type` | `"Group"` | Constant entity type |
| `scrapedAt` | `"2026-07-26T09:14:02Z"` | When the row was collected |

#### Size and activity fields

`memberCount`, `postsLastDay` and `postsLastMonth` are the raw numbers behind Facebook's rounded prose. `postsPerMonthPer1kMembers` normalizes discussion volume by size, so a 2,000-member group posting daily can outrank a dormant group with ten times the members — this is the field community managers and agencies sort on to find where to actually post. `membersPerDaySinceCreation` and `groupAgeDays` add a growth and maturity signal: a young group growing fast reads very differently from an old group that has plateaued, even at the same member count.

#### Targeting fields

`query` tells you which keyword or direct URL produced the row, so a multi-keyword run stays segmented in one dataset. `rank` and `rankBy` show where a group sits under whichever metric you chose. `visibility` lets you separate public groups (fully measurable) from private ones (which may withhold member or post counts). `id` and `url` are the stable keys to re-fetch or deduplicate a group across runs.

### Why not build this yourself?

Facebook does not publish a public group-directory or group-search API, so there's no documented endpoint to page through for "groups matching this keyword." Anyone building this from scratch has to replicate what this Actor already does: query a public search index for group links (which returns a signed, rate-limited token you must extract and resend on every page), then fetch each group's About page and parse the member count, post counts and privacy label out of Facebook's embedded page data rather than the visible HTML — because none of that is in a simple, stable selector.

The harder part is staying up. Facebook serves login-redirected or thin About pages back with a plain HTTP 200, so a naive scraper reads a healthy status code and silently records nulls or garbage. This Actor checks for the actual data container in the payload before trusting a 200, rotates to a fresh IP when it isn't there, and escalates the connection tier (direct → datacenter → residential) when rotation alone doesn't clear it. That retry and detection ladder — not the initial HTTP request — is what a from-scratch build actually costs.

### How to use data extracted from Facebook groups?

🏢 **Community managers and group admins** scouting where to post or partner paste a handful of niche keywords into `groupQueries`, set `rankBy` to `activityScore`, and get back the busiest groups relative to their size — the ones where a post is actually likely to be seen, rather than the largest group that's gone quiet.

📊 **Agencies** running the same audit for multiple clients repeat one `groupQueries` list per niche on a schedule, and diff `memberCount` and `postsLastMonth` for the same `id` run over run to show a client whether a group they're active in is growing or stalling.

🔬 **Market researchers** mapping a category's group landscape use `topGroupsLimit` to keep only the top few groups per keyword across dozens of keywords, then compare `medianGroupSize` and `medianActivityScore` from the per-keyword summary records to see which sub-niches are actually active versus just large.

🤖 **AI agents and automated pipelines** call the Actor as a tool to answer "which Facebook groups for X are worth engaging with right now" — feeding `name`, `memberCount` and `postsPerMonthPer1kMembers` straight into a ranking or outreach step without any HTML parsing on the agent's side.

### ⬇️ Input

Every parameter is optional — the schema marks nothing as required — but at least one keyword or group URL must be supplied for the Actor to do anything.

| Parameter | Required | Type | Description | Example Value |
| ----- | ----- | ----- | ----- | ----- |
| `groupQueries` | No | array | One entry per line: a keyword (matching groups are discovered, then measured) or a full group URL (measured directly, never capped). The base Actor's `startUrls` key is still accepted. | `["bmw", "vegan recipes"]` |
| `maxGroupsPerQuery` | No | integer | Upper bound on how many discovered groups are measured per keyword (1–500, default `10`). Direct group links are always measured and are not counted against this. The base Actor's `maxItems` key is still accepted. | `10` |
| `rankBy` | No | string, enum: `activityScore`, `postsPerMonth`, `members` | The metric the `rank` column is computed from, highest first. Groups where the chosen metric is unavailable stay unranked (`rank: null`) instead of being ranked on a fabricated zero. Default `activityScore`. | `"activityScore"` |
| `topGroupsLimit` | No | integer | Keep only the highest-ranked N groups per keyword (0–500). `0` (default) keeps every group, ranked. | `0` |
| `proxyConfiguration` | No | object | Apify Proxy settings. Recommended: **RESIDENTIAL**. The Actor detects login-redirected and thin About pages (which Facebook serves with HTTP 200) and automatically retries them on a fresh IP. | `{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}` |

#### Example input

```json
{
  "groupQueries": [
    "vegan recipes",
    "https://www.facebook.com/groups/cheapmealideas/"
  ],
  "maxGroupsPerQuery": 10,
  "rankBy": "activityScore",
  "topGroupsLimit": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  }
}
```

⚠️ **Discovery is thin by design.** Facebook exposes no public group directory, so keyword discovery routinely returns fewer groups than `maxGroupsPerQuery` asks for — the run log states the real number found for every term, and that shortfall is a property of Facebook's own search coverage, not an Actor error. Direct group URLs don't have this problem: they're always measured, and every one you supply counts.

**Common pitfall:** if a run input carries both a legacy key and its replacement — `startUrls` alongside `groupQueries`, or `maxItems` alongside `maxGroupsPerQuery` — the legacy key wins. This lets base-Actor JSON run unchanged, but it means a stray leftover `maxItems` from an old input will silently override a new `maxGroupsPerQuery` value you just set.

### ⬆️ Output

Typed JSON, one row per measured group, ranked. Export as JSON, CSV or Excel, or read the dataset through the Apify API.

#### Example output

```json
{
  "query": "vegan recipes",
  "rank": 1,
  "rankBy": "activityScore",
  "id": "1381552605319248",
  "name": "Cheap Meal Ideas",
  "url": "https://www.facebook.com/groups/cheapmealideas/",
  "visibility": "Public",
  "memberCount": 1224338,
  "memberCountText": "1,224,338 total members",
  "memberInfo": "1,224,338 total members",
  "postsLastDay": 26,
  "postsLastMonth": 731,
  "postFrequency": "24.4 posts a day",
  "postsPerMonthPer1kMembers": 0.597,
  "membersPerDaySinceCreation": 291.53,
  "groupAgeDays": 4200,
  "createdAt": "2014-11-28T00:00:00Z",
  "newMembersText": "4.3K in the last month",
  "profilePictureUri": "https://scontent.xx.fbcdn.net/v/t39.30808-6/example.jpg",
  "type": "Group",
  "scrapedAt": "2026-07-26T09:14:02Z"
}
```

The dataset's default table view surfaces 20 of these 21 fields; `memberCountText` is written to every row but isn't in the default view — switch to JSON, CSV or Excel export to see it alongside `memberCount`.

Every pushed row is charged under the `row_result` event. A group that can't be read at all — blocked, a thin or login-redirected page, no matching group data — is never pushed as a row and is never charged; it's tallied by reason in the run log instead (for example `login_redirect`, `thin_payload`, `no_container`, `no_match`).

Each keyword (and the `direct_urls` batch, if used) also writes a summary record to the run's key-value store under `SUMMARY-<keyword>`: `query`, `runId`, `generatedAt`, `rankBy`, `groupCount`, `publicGroups`, `privateGroups`, `unknownPrivacyGroups`, `totalReachableMembers`, `medianGroupSize`, `largestGroupSize`, `smallestGroupSize`, `sampleSize`, `medianPostsLastMonth`, `postsSampleSize`, `medianActivityScore`, `activityScoreSampleSize`, `topGroupName`, `topGroupUrl`, `memberCountCoverage`, `postsLastMonthCoverage` and `activityScoreCoverage`. A `RUN-SUMMARY` record indexes the whole run: `runId`, `generatedAt`, `rankBy`, `topGroupsLimit`, `maxGroupsPerQuery`, `queries`, `totalGroups` and `summaryKeys`.

### How do you filter and target specific groups?

Three inputs control precision here, and they stack.

**Keyword vs. direct URL** is the first fork. A keyword is for discovery — you don't know the group's URL yet, and Facebook's own search coverage decides how many candidates surface. A direct group URL skips discovery entirely: it's measured every time, uncapped by `maxGroupsPerQuery`, which makes it the reliable choice once you already have a shortlist of groups you care about.

**`maxGroupsPerQuery`** is the volume control for keyword discovery only (1–500, default 10) — raise it when a broad keyword needs a bigger candidate pool, lower it to keep a run fast when you only need a handful of leads per term.

**`rankBy` + `topGroupsLimit`** control what "best" means and how much of it you keep. Pick `activityScore` to surface small, engaged communities; `postsPerMonth` for raw discussion volume regardless of size; `members` for raw reach. Set `topGroupsLimit` above zero to keep only the top N per keyword — but note that a group with `rank: null` (its chosen metric is missing) is dropped entirely when a shortlist is requested, since it can't be compared to the ranked groups. Leave `topGroupsLimit` at `0` to keep the full list, ranked groups first, unranked ones appended after.

```json
{ "groupQueries": ["home renovation"], "rankBy": "members", "maxGroupsPerQuery": 50 }
```

```json
{ "groupQueries": ["https://www.facebook.com/groups/cheapmealideas/", "https://www.facebook.com/groups/realestateinvestingforbeginners/"], "rankBy": "activityScore" }
```

```json
{ "groupQueries": ["forex trading"], "rankBy": "postsPerMonth", "maxGroupsPerQuery": 100, "topGroupsLimit": 10 }
```

### ▶️ Want to try other Facebook scrapers?

| Scraper Name | What it extracts |
| ----- | ----- |
| Facebook Group Profile Scraper | Deeper per-group profile detail beyond size and activity |
| Facebook Group Engagement Analyzer | Engagement analysis of a group's own posts |
| Facebook Pages Scraper With Ad Library Activity | Facebook Pages plus their Ad Library activity |
| Facebook Search Scraper By Hashtag | Facebook content discovery by hashtag |
| Skool Group Scraper Pay Per Events | The same discover-and-measure pattern, for Skool communities |

### How to extract Facebook group data programmatically

Facebook Groups Search Scraper runs on Apify, so it's one authenticated call away from any language that can make an HTTP request.

#### Python example

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")

run = client.actor("<YOUR_USERNAME>/facebook-groups-search-scraper-size-activity-report").call(run_input={
    "groupQueries": ["vegan recipes", "real estate investing"],
    "rankBy": "activityScore",
    "topGroupsLimit": 10,
})

for group in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(group["name"], group["memberCount"], group["postsPerMonthPer1kMembers"])
```

#### Export to spreadsheets or CRM

Download the dataset as CSV or Excel directly from the Apify Console, or pull it via the API — `name`, `url`, `memberCount`, `postsLastMonth` and `postsPerMonthPer1kMembers` map straight into spreadsheet columns for a group-shortlist or outreach-tracking sheet with no reshaping needed.

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

Yes. This Actor collects aggregate, group-level statistics — member count, post volume, activity score — that a group's own public About page already displays to any anonymous visitor. It does not access member lists, private posts, or anything behind a login.

Group size and posting-activity figures are business and community records, not personal data about an individual, so the personal-data regimes that govern profile or member scraping do not attach to this output in the same way. What does apply is contractual: Facebook's terms of service, and any local database or unfair-competition rules covering systematic reuse of a compiled dataset.

Consult legal counsel for commercial applications involving bulk storage or resale of this data.

### ❓ FAQ

#### What happens when a keyword search finds no matching groups?

The run logs a warning for that term (`No group links found for '<term>'. Skipping.`) and moves on to the next keyword or direct URL — it does not fail the run. Facebook exposes no public group directory, so a narrow or unusual keyword can legitimately surface zero groups.

#### Can I get exact member counts and post volume, not just Facebook's own rounded text?

Yes. `memberCount`, `postsLastDay` and `postsLastMonth` are parsed integers, not prose. The original text Facebook rendered is kept too, in `memberCountText` and the legacy `memberInfo` / `postFrequency` columns, for anyone who wants both.

#### How accurate is the member and activity data?

The Actor returns exactly what Facebook's own About page reports at request time — it does not independently recount members or posts. Accuracy therefore depends on how current Facebook's own figures are. Re-run periodically if you need to track change over time; `scrapedAt` timestamps every row so you can tell how fresh a figure is.

#### How many groups can I measure per run?

For keyword discovery, `maxGroupsPerQuery` caps each keyword at 1–500 groups (default 10) — and discovery frequently returns fewer than the cap, since Facebook has no public group directory to page through exhaustively. Direct group URLs have no such cap: every URL you supply is measured, in addition to whatever keyword discovery finds.

#### How do `rankBy` and `topGroupsLimit` interact?

`rankBy` decides which metric produces the rank; `topGroupsLimit` decides how many top-ranked groups you keep. If a group's chosen metric is missing, it gets `rank: null` — and when `topGroupsLimit` is set above zero, those unranked groups are excluded from the shortlist entirely, because there's no honest way to compare them to the ranked ones.

#### What happens to groups that fail to load?

They're not pushed to the dataset and you're not charged for them. Login-redirected pages, thin payloads, and groups whose About page doesn't match at all are each counted by reason in the run log (`login_redirect`, `thin_payload`, `no_container`, `no_match`, and so on) rather than appearing as a fabricated or empty row.

#### Does Facebook Groups Search Scraper work with Claude, ChatGPT and AI agent frameworks?

Yes. It's callable as a standard HTTP endpoint through the Apify API, so any agent framework that can make a request — LangChain, CrewAI, n8n, or a hand-written tool definition — can invoke it and receive typed JSON directly.

#### How does Facebook Groups Search Scraper compare to other Facebook group scrapers?

Checked on the Apify Store on 2026-07-26: `easyapi/facebook-groups-search-scraper` documents the same keyword-to-group-list shape, but its output stays at prose fields (`memberInfo`, `postFrequency`) plus a `viewerJoinState` field — this Actor parses the real integers behind that prose (`memberCount`, `postsLastMonth`), computes an activity score and growth proxy from them, and deliberately removes the equivalent join-state field rather than shipping it as a constant. `curious_coder/facebook-post-scraper` targets posts rather than groups and documents optional cookie-based login for expanded access; this Actor never requires a Facebook account or cookies. `memo23/skool-members-scraper` covers the same discovery-and-measure pattern on Skool rather than Facebook, and documents required login cookies plus a monitoring mode for tracking newly discovered groups — a feature this Actor does not have.

#### Can I use Facebook Groups Search Scraper without a Facebook account or developer API key?

Yes. No Facebook account, login, cookie or developer key of any kind. The Actor reads each group's public About page logged out. The only credential you need is your Apify token.

### Conclusion

Facebook Groups Search Scraper — Member Size & Activity Metrics turns a keyword or a group link into a ranked, typed row of real numbers — member count, post volume, activity score, growth — instead of Facebook's own rounded prose. It's built for anyone who needs to shortlist or benchmark Facebook groups without joining each one by hand: community managers, agencies, and researchers alike. Start a run from the Apify Console or call it through the Apify API to get your first ranked report.

# Actor input Schema

## `groupQueries` (type: `array`):

One entry per line.

🔤 **Keyword** — e.g. `bmw`, `real estate investing`. Matching groups are discovered, then measured.

🔗 **Group URL** — e.g. `https://www.facebook.com/groups/cheapmealideas/`. Measured directly, never capped.

⚠️ **Discovery is thin by design.** Facebook does not expose a public group directory, so keyword discovery routinely returns fewer groups than your cap. The log states the real number found for every term.

The original `startUrls` key from the base Actor is still accepted.

## `maxGroupsPerQuery` (type: `integer`):

Upper bound on how many discovered groups are measured for each keyword (1–500). Direct group links are always measured and are not counted against this. Default is 10. Accepts the base Actor's `maxItems` key too.

## `rankBy` (type: `string`):

The metric the `rank` column is computed from, highest first.

• **Activity score** — `postsPerMonthPer1kMembers`: posts in the last month per 1,000 members. Surfaces small, busy communities that raw size hides.
• **Posts last month** — raw `postsLastMonth`. Pure volume of discussion.
• **Members** — raw `memberCount`. Pure reach.

Groups where the chosen metric is unavailable stay unranked (`rank: null`) instead of being ranked on a fabricated zero.

## `topGroupsLimit` (type: `integer`):

Keep only the highest-ranked N groups per keyword in the output table. Example: `topGroupsLimit=5` with 18 measured groups returns the 5 best-scoring ones. Set to `0` (default) to keep every group, ranked.

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

Recommended: Apify Proxy with the **RESIDENTIAL** group. The Actor detects login-redirected and thin About pages (which Facebook serves with HTTP 200) and automatically retries them on a fresh IP.

## Actor input object example

```json
{
  "groupQueries": [
    "bmw",
    "vegan recipes"
  ],
  "maxGroupsPerQuery": 10,
  "rankBy": "activityScore",
  "topGroupsLimit": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "groupQueries": [
        "bmw",
        "vegan recipes"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapeflow/facebook-groups-search-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 = {
    "groupQueries": [
        "bmw",
        "vegan recipes",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapeflow/facebook-groups-search-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 '{
  "groupQueries": [
    "bmw",
    "vegan recipes"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call scrapeflow/facebook-groups-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapeflow/facebook-groups-search-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/RKymTHaa8rgTCq4fU/builds/kIgkpTAOWfvsLb6Wo/openapi.json
