# Facebook Groups Search & Directory Scraper (`alpha-scraper/facebook-groups-search-directory-scraper`) Actor

\[ 1k/1.49$ ] Facebook Groups Search & Directory Scraper finds public Facebook groups by keyword, topic or location and returns a directory record per group: ID, name, URL, privacy, members, description, category and locations. Known groups are read directly. No login.

- **URL**: https://apify.com/alpha-scraper/facebook-groups-search-directory-scraper.md
- **Developed by:** [Alpha Scraper](https://apify.com/alpha-scraper) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 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.
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 Search & Directory Scraper

**Facebook Groups Search & Directory Scraper** finds public Facebook groups for a keyword, topic or location and returns one directory record per group. Each Facebook group record has the group id, name, link, privacy, member count, description, category, locations, cover photo and more. Facebook Groups Search & Directory Scraper also reads groups you already know straight from their public About page.

Facebook Groups Search & Directory Scraper works without a Facebook account, a login or an API key. Facebook's own group search and directory need a login, so Facebook Groups Search & Directory Scraper matches keywords by trying likely group vanity URLs. It finds well-named Facebook groups, not every group on a topic, and the output says so honestly.

> **📌 At a glance**
>
> - **Input:** keywords, known Facebook groups (slug, id or URL), and an optional location
> - **Output:** one directory record per Facebook group, most relevant first, plus one search status record
> - **Filters:** `minRelevance` for keyword matches and `includePrivate` for private groups
> - **Control:** `maxItems` caps the group records, and `maxProbes` caps the tries per keyword

Community managers, marketers, researchers and sales teams use Facebook Groups Search & Directory Scraper to build lists of Facebook groups for a niche. Every Facebook group comes back in the same JSON structure, so the list is easy to filter and export.

### 🔹 Facebook Groups Search & Directory Scraper – Key Features

Facebook Groups Search & Directory Scraper combines keyword discovery with direct group lookup.

- **Keyword discovery:** Facebook Groups Search & Directory Scraper turns a keyword into likely vanity URLs and keeps the groups that really match.
- **Direct lookup:** Facebook Groups Search & Directory Scraper turns groups you already know into full records from their public About page.
- **Location boost:** Facebook Groups Search & Directory Scraper ranks Facebook groups that mention your city or country higher.
- **Relevance score:** every keyword match has a `relevance` value from 0 to 1.
- **Two discovery methods:** vanity URL probing and a hashtag check, which you can switch on or off.
- **Private group control:** keep private groups, which show only their public About card, or drop them.
- **Transparent status:** a final record explains the method used and the limits of Facebook group discovery.
- **Duplicate removal:** a group found twice is returned once, with every matching keyword listed.

> **✅ Why use this Actor**
>
> Facebook Groups Search & Directory Scraper saves the manual work of opening Facebook groups one by one. It reads each Facebook group About page for you and returns consistent fields for JSON, CSV or Excel export.

### 🔍 What Data Does Facebook Groups Search & Directory Scraper Extract?

Each dataset item describes one Facebook group. The table groups the fields by purpose.

| Group | Fields | What you get |
|---|---|---|
| Identity | `groupId`, `name`, `url`, `vanity` | Facebook group id, title, link and vanity name |
| Access | `privacy`, `visibility` | Public or private and how visible the group is |
| Size | `memberCount`, `memberCountText`, `postsLastMonth` | Members as a number and as shown, plus recent posting activity |
| Content | `description`, `category`, `categories`, `locations`, `createdDate`, `tabs` | About text, topics, places, creation date and group tabs |
| Images | `coverPhotoUrl`, `profilePictureUrl` | Public cover and profile pictures |
| Discovery | `discoveredVia`, `matchedQueries`, `relevance` | How the Facebook group was found and how well it matches |
| Record | `number`, `type`, `status`, `scrapedAt` | Position, record type, read status and collection time |

The `status` field is `ok` for a group that was read. A group that cannot be read gets `not_available_logged_out`, which means it does not exist, was removed or needs a login.

### 🚀 How to Use Facebook Groups Search & Directory Scraper

Running Facebook Groups Search & Directory Scraper takes a few steps in Apify Console.

- **Step 1 – Open the Actor:** start Facebook Groups Search & Directory Scraper from the Apify Store and go to the Input tab.
- **Step 2 – Add keywords:** enter topics in `queries`, such as `python` or `yoga berlin`.
- **Step 3 – Add known groups:** use `groups` or `startUrls` for Facebook groups you already know.
- **Step 4 – Tune the search:** set `location`, `methods`, `minRelevance` and `includePrivate` if needed.
- **Step 5 – Set limits:** choose `maxItems` for group records and `maxProbes` for tries per keyword.
- **Step 6 – Run and export:** start the Actor, then download the Facebook group list as JSON, CSV or Excel.

> **💡 Tip:** the input is prefilled with the sample keyword `python`. Replace it before you run Facebook Groups Search & Directory Scraper on your own topic.

### 📥 Facebook Groups Search & Directory Scraper Input

Facebook Groups Search & Directory Scraper has nine input fields. All are optional, but you need at least one keyword, group or start URL.

| Field | Type | Description |
|---|---|---|
| `queries` | array | Keywords, topics or `topic + city`. Prefilled with `python`. |
| `groups` | array | Known Facebook groups as a vanity slug, numeric id or group URL. Each becomes a full record, public or private. Default: empty. |
| `startUrls` | array | Group URLs such as `https://www.facebook.com/groups/bitcoin`, handled like `groups`. Default: empty. |
| `location` | string | Optional city or country. It adds location-flavoured guesses and ranks matching groups higher. |
| `methods` | array | `slugProbe` (vanity URL probing) and/or `hashtag` (hashtag check). Default: both. |
| `minRelevance` | number | Minimum score from 0 to 1 for groups found by `slugProbe`. Default: 0.5. |
| `includePrivate` | boolean | Keep private groups, which expose only their public About card. Default: on. |
| `maxProbes` | integer | Candidate group URLs opened per keyword. Minimum 1, maximum 150, default 40. |
| `maxItems` | integer | Maximum group records in total, most relevant first. Minimum 1, default 30. |

The relevance score reflects how many keyword words appear in the group name, vanity URL, description, categories and locations, and name matches count more. Groups from `groups`, `startUrls` and the hashtag check are not filtered by `minRelevance`.

Here is a sample input for Facebook Groups Search & Directory Scraper that looks for hiking groups near one city:

```json
{
  "queries": ["hiking"],
  "groups": [],
  "startUrls": [],
  "location": "Denver",
  "methods": ["slugProbe", "hashtag"],
  "minRelevance": 0.6,
  "includePrivate": false,
  "maxProbes": 60,
  "maxItems": 25
}
```

### 📤 Facebook Groups Search & Directory Scraper Output

Facebook Groups Search & Directory Scraper writes one record per Facebook group to the default dataset, followed by one search status record. This group record uses synthetic values:

```json
{
  "number": 1,
  "type": "group",
  "groupId": "100000000000001",
  "name": "Sample Hiking Club",
  "url": "https://www.facebook.com/groups/samplehikingclub/",
  "vanity": "samplehikingclub",
  "privacy": "Public",
  "visibility": "Visible",
  "memberCount": 48200,
  "memberCountText": "48.2K members",
  "description": "A friendly group for trail tips and weekend hikes.",
  "category": "Outdoors",
  "categories": ["Outdoors", "Sports"],
  "locations": [{ "id": "100000000000002", "name": "Denver, Colorado" }],
  "createdDate": "2019-03-14",
  "postsLastMonth": 120,
  "coverPhotoUrl": "https://example.com/cover.jpg",
  "profilePictureUrl": "https://example.com/profile.jpg",
  "tabs": ["ABOUT", "POSTS", "MEMBERS"],
  "discoveredVia": "slugProbe:samplehikingclub",
  "matchedQueries": ["hiking"],
  "relevance": 1,
  "status": "ok",
  "scrapedAt": "2026-11-07T10:30:00.000Z"
}
```

The last record of every run is a search status record:

```json
{
  "type": "searchStatus",
  "status": "partial",
  "queries": ["hiking"],
  "location": "Denver",
  "groupsReturned": 14,
  "stats": { "directInputs": 0, "directOk": 0, "probed": 60, "probeHits": 18, "hashtagGroups": 0, "privateSkipped": 2, "probeRequests": 60 },
  "methodsUsed": ["hashtag", "slugProbe"],
  "message": "Facebook's group search and directory require a login; results come from direct inputs, vanity-slug probing and hashtag posts only, so they are NOT a complete list of groups for the topic.",
  "scrapedAt": "2026-11-07T10:30:00.000Z"
}
```

#### 🧾 Output field guide

- `groupId`, `name`, `url` and `vanity` identify the Facebook group.
- `privacy` and `visibility` describe access, and `memberCount` is the numeric member total.
- `categories`, `locations`, `createdDate` and `postsLastMonth` describe the topic, place and activity.
- `discoveredVia` shows `direct`, `slugProbe:<slug>` or `hashtag:#<tag>`, and `matchedQueries` lists the matching keywords.
- `relevance` is `null` for direct inputs, which are not scored.
- `searchStatus.status` is `ok`, `partial`, `no_results` or `blocked_login_wall`.
- `stats` counts direct inputs read, groups probed, matches found and private groups skipped.
- `blockedSurfaces` lists the Facebook group pages that need a login, and `message` explains the limit.

### 🌍 How to Find Facebook Groups by Location with Facebook Groups Search & Directory Scraper

Type a topic in `queries` and a city or country in `location`. Facebook Groups Search & Directory Scraper adds location-flavoured guesses to the keyword list and ranks Facebook groups that mention the place higher.

You can also write the place into the keyword, such as `yoga berlin`. Raise `minRelevance` to keep only close matches, or lower it to see more Facebook group candidates.

### 🔗 How to Get Facebook Group Details from Known Groups with Facebook Groups Search & Directory Scraper

If you already have group names, put them in `groups` as a slug, id or URL. Facebook Groups Search & Directory Scraper reads each public About page and returns a full record, including private groups, which show only their public About card.

A group that cannot be read still gets a record with `status` set to `not_available_logged_out`, so you can see which inputs failed.

### 🎯 Facebook Groups Search & Directory Scraper Use Cases

Facebook Groups Search & Directory Scraper fits many research and outreach workflows.

- **Community research:** use Facebook Groups Search & Directory Scraper to list Facebook groups in a niche with member counts and descriptions.
- **Audience discovery:** find where your customers talk, by topic and city.
- **Competitor mapping:** see which Facebook communities exist around rival brands with Facebook Groups Search & Directory Scraper.
- **Influencer and admin outreach:** identify large Facebook groups worth a partnership.
- **Market sizing:** compare member counts across groups in a category.
- **Directory building:** keep a clean list from Facebook Groups Search & Directory Scraper with Facebook group links, topics and locations.

### 💰 Pricing

Facebook Groups Search & Directory Scraper runs on the Apify platform. The current pricing is shown on the Actor page in the Apify Store, and your cost depends on the number of results and the resources used by the run.

> **💡 Cost tip:** start with `maxItems` at 10 and `maxProbes` at 20. Raise the limits after you check the relevance of the first Facebook groups.

### 💡 Tips and Best Practices

- **Use clear keywords:** well-named groups match well, so try the words a group would use in its name.
- **Add known groups:** pass any Facebook groups you already know to Facebook Groups Search & Directory Scraper in `groups` for direct lookups.
- **Check relevance:** sort by `relevance` and `memberCount` to find the strongest matches first.
- **Try several phrasings:** separate keywords find different Facebook groups, and a Facebook group page may use another word for the same topic.
- **Clear the sample keyword:** remove `python` if you only want your own topics.
- **Check nulls:** a `null` field means Facebook did not show the value, not that Facebook Groups Search & Directory Scraper failed.
- **Read the status record:** it explains why a keyword search is not a complete list.

> **⚠️ Important:** only collect data you are allowed to use. Facebook group pages can contain personal data, so follow Facebook's terms and the privacy rules that apply to you, such as GDPR. This Actor is not affiliated with or endorsed by Meta.

### ❓ Frequently Asked Questions

#### 🔎 What is Facebook Groups Search & Directory Scraper?

Facebook Groups Search & Directory Scraper is an Apify Actor that finds public Facebook groups by keyword or location and reads known groups from their About page.

#### 🧭 How do I find Facebook groups by keyword?

Enter a keyword in `queries`, set `maxItems` and start the run. Facebook Groups Search & Directory Scraper tries likely vanity URLs and returns the groups that match.

#### 🧩 Does Facebook Groups Search & Directory Scraper list every Facebook group on a topic?

No. Facebook's own group search needs a login, so Facebook Groups Search & Directory Scraper finds well-named groups only. The search status record states this limit.

#### 🔗 Can I scrape details of a specific Facebook group?

Yes. Add the slug, id or URL to `groups` or `startUrls`. Facebook Groups Search & Directory Scraper returns a full directory record from the public About page.

#### 🔒 Can I scrape private Facebook groups?

Only their public About card. Private groups expose no posts or members, and `includePrivate` lets you keep or drop them.

#### 🔐 Does Facebook Groups Search & Directory Scraper need a Facebook login?

No. Facebook Groups Search & Directory Scraper reads publicly visible content, so no account, cookies or API key are required.

#### 📦 What data does Facebook Groups Search & Directory Scraper return?

Each record includes ids, links, privacy, member count, description, categories, locations, pictures and how the group was found.

#### 📍 Can I search Facebook groups in a city?

Yes. Set `location` or write the city in the keyword, and Facebook Groups Search & Directory Scraper ranks matching groups higher.

#### 🔢 How many Facebook groups can I get?

Set `maxItems` to the number you need. Facebook Groups Search & Directory Scraper stops earlier when fewer relevant Facebook groups are found.

#### ⚖️ Is it legal to scrape Facebook groups?

Facebook Groups Search & Directory Scraper collects public Facebook content only. You are responsible for how you use it, so check Facebook's terms, local laws and privacy rules.

### 📞 Support

If you have questions, ideas for new fields or a keyword that returns too few groups, send the keyword and the input you used.

- Contact me by email: alphascraper69@gmail.com

# Actor input Schema

## `queries` (type: `array`):

Keywords, topics or 'topic + city'. Groups are found by probing likely vanity URLs and the /hashtag/<keyword> page, so this finds well-named groups, not every group on a topic.

## `groups` (type: `array`):

Groups you already know: vanity slug, numeric id or group URL. Each one becomes a full directory record from its public About page (works for public and private groups).

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

Group URLs, e.g. https://www.facebook.com/groups/bitcoin. Handled like 'Groups'.

## `location` (type: `string`):

Optional city or country. Adds location-flavoured vanity URLs to the probe list and ranks groups that mention it higher.

## `methods` (type: `array`):

How 'Search keywords' are turned into groups. Vanity URL probing opens likely group URLs; hashtag check looks at the public post Facebook shows for /hashtag/<keyword> (rarely yields anything). 'Groups' and 'Start URLs' are always read directly.

## `minRelevance` (type: `number`):

Minimum relevance score (0 to 1) for groups found by vanity URL probing. The score reflects how many keyword words appear in the group's name, vanity URL, description, categories and locations (name matches count more). Direct inputs and hashtag results are not filtered.

## `includePrivate` (type: `boolean`):

Keep private groups in the results. They only expose their public About card (no posts or members). When off, private groups are dropped.

## `maxProbes` (type: `integer`):

Maximum number of candidate group URLs opened per keyword by vanity URL probing (one request each, hard cap 150).

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

Maximum number of group records to return in total across all keywords and direct inputs, most relevant first. Groups that could not be read and a final search-status record are added on top.

## Actor input object example

```json
{
  "queries": [
    "python"
  ],
  "groups": [],
  "startUrls": [],
  "methods": [
    "slugProbe",
    "hashtag"
  ],
  "minRelevance": 0.5,
  "includePrivate": false,
  "maxProbes": 40,
  "maxItems": 15
}
```

# Actor output Schema

## `results` (type: `string`):

Structured records extracted by Facebook Groups Search & Directory Scraper and stored in the run's default dataset.

# 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 = {
    "queries": [
        "python"
    ],
    "maxItems": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("alpha-scraper/facebook-groups-search-directory-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 = {
    "queries": ["python"],
    "maxItems": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("alpha-scraper/facebook-groups-search-directory-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 '{
  "queries": [
    "python"
  ],
  "maxItems": 15
}' |
apify call alpha-scraper/facebook-groups-search-directory-scraper --silent --output-dataset

```

## MCP server setup

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