# Facebook Groups Search Scraper (`fetch_cat/facebook-groups-search-scraper`) Actor

Discover publicly indexed Facebook groups by keyword and optional location. Export canonical group URLs, names, search ranks, snippets, and visible group metadata.

- **URL**: https://apify.com/fetch\_cat/facebook-groups-search-scraper.md
- **Developed by:** [Hanna Nosova](https://apify.com/fetch_cat) (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 $0.02 / 1,000 group results

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/platform/actors/running/actors-in-store#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

## Scrape Facebook Groups — Facebook Groups Search Scraper

Use this Facebook groups search scraper as a Facebook group finder scraper for publicly discoverable communities in a topic or local market. Enter keywords and optional locations, then export canonical group URLs, names, member counts when shown, privacy labels, descriptions, activity text, and search rank. Run it as a Facebook groups search API from your own workflows.

Use the dataset for community research, partnership prospecting, audience discovery, market mapping, or building a reviewed outreach list. The Actor searches only publicly discoverable results; it does not log in, scrape group posts, or expose member data.

### Example input

```json
{
  "keywords": ["tesla owners", "photography"],
  "locations": ["United States"],
  "maxGroupsPerQuery": 10
}
```

### Example output

```json
{
  "query": "tesla owners United States",
  "rank": 1,
  "matchedLocation": "United States",
  "sourceType": "keyword_search",
  "groupId": "teslamotorsclub",
  "groupName": "Tesla Motors Club",
  "groupUrl": "https://www.facebook.com/groups/teslamotorsclub/",
  "descriptionSnippet": "A community for Tesla owners and enthusiasts...",
  "discoverabilityText": "Anyone can find this group",
  "profilePictureUrl": "https://scontent.xx.fbcdn.net/group.jpg",
  "privacyLabel": "Public",
  "memberCountText": "128K members",
  "memberCount": 128000,
  "postFrequencyText": "10 posts a day",
  "postsPerDay": 10,
  "postsPerMonth": 300,
  "groupType": "Group",
  "viewerJoinState": "CAN_JOIN",
  "collectedAt": "2026-08-10T12:00:00.000Z"
}
```

Fields unavailable in a public result are returned as `null`, never guessed.

### Input settings

| Field | Type | Description |
|---|---|---|
| `keywords` | string\[] | One to 20 topics, niches, brands, or community phrases. |
| `locations` | string\[] | Optional cities, regions, or countries. Every location is combined with every keyword. |
| `maxGroupsPerQuery` | integer | Maximum groups saved per keyword/location query, from 1 to 100. |

### Output fields

| Field | Description |
|---|---|
| `query`, `rank` | Exact keyword/location query and 1-based result position. |
| `matchedLocation` | Requested location refinement, or `null`; never presented as the group's location. |
| `sourceType` | Stable `keyword_search` provenance. |
| `groupId`, `groupName`, `groupUrl` | Public group identity and canonical URL. |
| `descriptionSnippet`, `discoverabilityText` | Public descriptive and discoverability text when visible. |
| `profilePictureUrl` | Public group image URL when visible. |
| `privacyLabel` | Public visibility label when displayed; private content is never accessed. |
| `memberCountText`, `memberCount` | Original public size label and normalized integer. |
| `postFrequencyText`, `postsPerDay`, `postsPerMonth` | Original activity phrase and conservative normalized rates. |
| `groupType`, `viewerJoinState` | Public entity and join-state labels when supplied. |
| `collectedAt` | ISO timestamp of collection. |

### Input recipes

**Find local professional communities**

```json
{"keywords":["startup founders","digital marketing"],"locations":["London"],"maxGroupsPerQuery":20}
```

**Map hobby communities across locations**

```json
{"keywords":["landscape photography"],"locations":["New York","California"],"maxGroupsPerQuery":30}
```

### Pricing

Pay per event: a small Actor start fee plus each group result saved. The run charges no result event for failed queries or duplicates. Current prices are shown in the Apify Console before a run starts.

### Tips and limits

- Use specific phrases for more relevant groups.
- Add locations only when geography matters; locations create a query cross-product.
- Results depend on what is publicly indexed at collection time. Profile, member, privacy, discoverability, and activity fields are `null` when a public source does not expose them.
- Duplicate canonical group URLs are saved once per run, preserving their first query and rank.
- A query may legitimately return no public groups. Login walls, challenges, and private-only content are rejected rather than represented as scraped data.
- Respect Facebook's terms, privacy rights, and applicable law. Review results before outreach or automated decisions.

### API

```bash
curl -X POST "https://api.apify.com/v2/acts/anna/facebook-groups-search-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keywords":["startup founders"],"locations":["Berlin"],"maxGroupsPerQuery":10}'
```

Use the Apify API client from JavaScript or Python with Actor ID `anna/facebook-groups-search-scraper`. Results are available from the run's default dataset and can be exported as JSON, CSV, Excel, XML, or RSS.

### MCP and integrations

Connect AI tools through [Apify MCP](https://mcp.apify.com/?tools=anna/facebook-groups-search-scraper). You can also send datasets to Google Sheets, webhooks, Make, Zapier, or n8n using Apify integrations.

### FAQ

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

You can export the query and rank, canonical group ID and URL, group name, description snippet, privacy and member details when publicly visible, activity values when available, and collection time.

#### How much does it cost to use Facebook Groups Search Scraper?

Pricing is pay per event: a small start fee plus one result charge for each saved group. The Apify run page shows the exact charge as the run progresses.

#### Does this scrape posts or group members?

No. It discovers public group result metadata only. For a different workflow, use a dedicated known-group content Actor where access and authorization permit it.

#### Can I export public Facebook group URLs and member counts?

Yes. Every row includes a canonical URL, and it includes the member count whenever that value appears in the public result.

#### How do I search Facebook groups by location through an API?

Pass one or more values in `locations` with your `keywords`, using the REST API or an Apify client. The Actor combines every keyword and location.

#### Can it discover private groups?

It may report a publicly indexed group carrying a Private label, but it never logs in or accesses private content.

#### Why is a member count missing?

The public result did not expose a reliable count. Optional values are omitted rather than guessed.

#### Can I run it through the API or an AI agent?

Yes. Use the REST API, Apify clients, schedules, webhooks, or the MCP endpoint above.

#### What happens when one query fails?

Completed output is preserved. Other queries continue within the shared run deadline; an all-query technical failure fails the run instead of returning misleading success.

### Related Actors

- [Facebook Groups Scraper](https://apify.com/anna/facebook-groups-scraper) — content extraction for known group URLs
- [Facebook Pages Scraper](https://apify.com/anna/facebook-pages-scraper)
- [Facebook Posts Scraper](https://apify.com/anna/facebook-posts-scraper)
- [LinkedIn Company Scraper](https://apify.com/anna/linkedin-company-scraper)
- [Instagram Profile Scraper](https://apify.com/anna/instagram-profile-scraper)

### Support

Open an issue from the Actor's Apify Console page with the input, run ID, expected behavior, and a public example. Do not include credentials, cookies, or personal data.

# Actor input Schema

## `keywords` (type: `array`):

Topics, niches, brands, or community terms to search.

## `locations` (type: `array`):

Locality qualifiers such as cities, regions, or countries. Each is combined with every keyword.

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

Maximum public group results saved for each keyword/location query.

## Actor input object example

```json
{
  "keywords": [
    "tesla owners"
  ],
  "locations": [
    "United States"
  ],
  "maxGroupsPerQuery": 10
}
```

# Actor output Schema

## `overview` (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 = {
    "keywords": [
        "tesla owners"
    ],
    "locations": [
        "United States"
    ],
    "maxGroupsPerQuery": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("fetch_cat/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 = {
    "keywords": ["tesla owners"],
    "locations": ["United States"],
    "maxGroupsPerQuery": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("fetch_cat/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 '{
  "keywords": [
    "tesla owners"
  ],
  "locations": [
    "United States"
  ],
  "maxGroupsPerQuery": 10
}' |
apify call fetch_cat/facebook-groups-search-scraper --silent --output-dataset

```

## MCP server setup

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