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

Effortlessly search and extract data from Facebook groups. This actor automates group discovery based on keywords, collecting detailed information such as group name, URL, member count, and post frequency. Ideal for market research, community engagement, and trend analysis.

- **URL**: https://apify.com/easyapi/facebook-groups-search-scraper.md
- **Developed by:** [EasyApi](https://apify.com/easyapi) (community)
- **Categories:** Social media
- **Stats:** 2,306 total users, 246 monthly users, 100.0% runs succeeded, 38 bookmarks
- **User rating**: 1.83 out of 5 stars

## Pricing

from $2.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?

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 Scraper

Effortlessly scrape and extract data from Facebook groups search results.

### Features

- 🔍 Search for Facebook groups based on keywords
- 📊 Extract detailed information about each group
- 🔢 Set a custom limit for the number of results
- 🚀 Uses browser automation to handle dynamic content
- 🛡️ Incorporates anti-detection measures for reliable scraping

### Description

The Facebook Groups Search Scraper is a powerful tool designed to automate the process of searching and extracting data from Facebook groups. It navigates through Facebook's group search results, scrolling and loading more content as needed, to collect comprehensive information about each group matching your search criteria.

### Input Parameters

| Field | Type | Description |
| --- | --- | --- |
| `searchQuery` | String | The keyword(s) to search for Facebook groups |
| `maxItems` | Integer | Maximum number of groups to scrape (default: 100, max: 5000) |

### Output

The actor provides detailed information for each Facebook group, including:

- Group ID
- Group name
- Group URL
- Profile picture URL
- Visibility status
- Member information
- Post frequency
- Group type
- Viewer's join state

### Use Cases

- Market research: Identify and analyze groups related to specific products or interests
- Community engagement: Find relevant groups for outreach or partnership opportunities
- Competitive analysis: Track groups in your industry or niche
- Trend spotting: Discover popular topics and discussions within specific communities

#### Input Example

A full explanation of an input example in JSON.

```
{
  "maxItems": 100,
  "searchQuery": "tesla"
}
```

#### Output sample

The results will be wrapped into a dataset which you can always find in the **Storage** tab. Here's an excerpt from the data you'd get if you apply the input parameters above:

And here is the same data but in JSON. You can choose in which format to download your data: JSON, JSONL, Excel spreadsheet, HTML table, CSV, or XML.

```
[
  {
    "id": "609454194511881",
    "name": "Tesla model y accessories 3.0",
    "url": "https://www.facebook.com/groups/609454194511881/",
    "profilePictureUri": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-6/369260375_224474087233226_4569397410258598398_n.jpg?stp=c120.0.720.720a_dst-jpg_s168x128&_nc_cat=104&ccb=1-7&_nc_sid=33e84f&_nc_ohc=TZRKrtBgOwYQ7kNvgF7vVBV&_nc_ht=scontent-iad3-1.xx&_nc_gid=AKlvzaWfT8ojjgXTdSP7e2K&oh=00_AYC4JM6umbd84x5v0o0WpWLnTBr4IdAg6hGhxfIJcHDTtw&oe=67083810",
    "visibility": "Public",
    "memberInfo": "21K members",
    "postFrequency": "4 posts a day",
    "type": "Group",
    "viewerJoinState": "CAN_JOIN"
  },
  {
    "id": "108780073105582",
    "name": "Tampa Bay Tesla Club",
    "url": "https://www.facebook.com/groups/TampaBayTeslaClub/",
    "profilePictureUri": "https://scontent-iad3-1.xx.fbcdn.net/v/t39.30808-6/274518532_10224246295898986_4160009039258704607_n.jpg?stp=c230.0.360.360a_dst-jpg_s168x128&_nc_cat=107&ccb=1-7&_nc_sid=33e84f&_nc_ohc=cQ3ATTt_pMYQ7kNvgEryjzG&_nc_ht=scontent-iad3-1.xx&_nc_gid=AKlvzaWfT8ojjgXTdSP7e2K&oh=00_AYAQcengFngXf4Tl1993NHN5zdln5Ev7ITAmQzOOBForVg&oe=67080D6A",
    "visibility": "Public",
    "memberInfo": "9.4K members",
    "postFrequency": "9 posts a day",
    "type": "Group",
    "viewerJoinState": "CAN_JOIN"
  },
  ...
]
```

# Actor input Schema

## `searchQuery` (type: `string`):

The keyword you want to search for Facebook groups.

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

The maximum number of items to scrape. The actor will stop when this limit is reached.

## Actor input object example

```json
{
  "searchQuery": "tesla",
  "maxItems": 10
}
```

# 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 = {
    "searchQuery": "tesla"
};

// Run the Actor and wait for it to finish
const run = await client.actor("easyapi/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 = { "searchQuery": "tesla" }

# Run the Actor and wait for it to finish
run = client.actor("easyapi/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 '{
  "searchQuery": "tesla"
}' |
apify call easyapi/facebook-groups-search-scraper --silent --output-dataset

```

## MCP server setup

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