# Facebook Search Scraper (`parseforge/facebook-search-scraper`) Actor

Scrapes Facebook Search results for pages, groups, posts, or videos. Returns each result as a flat row with name, URL, type, and visible metadata. Export to CSV, JSON, Excel, or XML.

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

## Pricing

from $8.00 / 1,000 result items

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/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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### Facebook Search Scraper

**Scrape Facebook Search results for pages, groups, posts, and videos, up to a million per run.** Get structured data from public search listings without login or API key. Export to CSV, JSON, Excel, or XML.

Facebook Search data is locked behind a login wall and the official API only covers your own pages. This actor reads the public search listings directly, so you can collect pages, groups, posts, or videos for any query. Each result comes back as a flat row, ready for analysis.

| Who uses it | What they scrape Facebook for |
|---|---|
| Market researchers | Which brands and communities dominate a niche on Facebook |
| Lead generation teams | Find Facebook pages and groups that match an ideal customer profile |
| Content strategists | See which posts and videos get surfaced for a topic |
| OSINT analysts | Map public Facebook entities around a person, brand, or event |

### What it does

This Actor collects Facebook Search results for pages, groups, posts, or videos, and returns each result as a flat row.

- 🔍 **Search types:** pages, groups, posts, or videos, one type per run.
- 📋 **Multiple queries:** pass a list of search terms and get results for all of them in one dataset.
- ⚙️ **Result cap:** set a maximum number of results per run, from 1 to 1,000,000.
- 📤 **Export ready:** download as CSV, JSON, Excel, or XML from the Apify dataset.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Facebook data

**📈 Track brand presence.**

A market researcher runs weekly searches for a brand name across pages and groups to see which communities are growing and what competitors appear.

**🎯 Build lead lists.**

A sales team searches for industry keywords in pages and groups, then exports the results to enrich their CRM with Facebook company pages.

**🧠 Monitor topics.**

A content strategist searches posts and videos for a trending topic to understand what formats and angles get surfaced by Facebook Search.

**🕵️ Investigate entities.**

An OSINT analyst runs a person's name or an event keyword across all four search types to map related public pages, groups, and posts.

### Why choose this scraper

|  | What you get |
|---|---|
| **No login or API key** | Reads public search listings directly, so you skip OAuth and app registration |
| **One fixed schema** | Every result, whether a page, group, post, or video, lands in the same flat structure |
| **Bulk queries** | Run dozens or hundreds of search terms in a single actor run |
| **Scale on demand** | Collect up to a million results per run on Apify's infrastructure |

### How it compares

No other Store actor targets Facebook the same way, so the honest comparison is with the alternatives teams actually weigh.

| | Facebook Search Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When Facebook changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor with a list of search queries and pick one search type: pages, groups, posts, or videos. The maximum results setting caps how many rows you collect per run. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "queries": [
    "nike",
    "apple"
  ],
  "searchType": "pages",
  "maxItems": 10
}
```

A larger pull:

```json
{
  "queries": [
    "nike",
    "apple"
  ],
  "searchType": "pages",
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.018 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $1.80 |
| 1,000 results | $18.00 |
| 10,000 results | $180.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Facebook Search Scraper](https://apify.com/parseforge/facebook-search-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Facebook through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/facebook-search-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that your search query is not too specific. Try a broader term, or switch to a different search type like pages or groups.

**Why did the run stop before reaching my max results?**

Facebook may not have more results for that query and search type. The actor stops when the public listing is exhausted.

**Can I search for posts and pages in the same run?**

No. Each run uses one search type. Run the actor multiple times with different search types if you need multiple entity types.

**Why are some fields empty in my results?**

Facebook does not always show the same metadata for every result. Empty fields mean that information was not present in the public listing.

### FAQ

| Question | Answer |
|---|---|
| Do I need a Facebook account or API key? | No. This actor reads public Facebook Search listings without login or API credentials. |
| What search types can I scrape? | Pages, groups, posts, and videos. You choose one type per run. |
| Can I search for multiple queries at once? | Yes. Pass a list of search queries and the actor will collect results for each one in a single run. |
| How many results can I get? | You can set a maximum from 1 to 1,000,000 results per run. The actor stops when it reaches that cap or when no more results are available. |
| What data does each result include? | Each row includes the fields available in the public search listing, such as name, URL, type, and any visible metadata. The exact fields are shown in the sample output. |
| Can I export the data? | Yes. Download your dataset as CSV, JSON, Excel, or XML directly from Apify. |
| Is this legal? | You are responsible for complying with Facebook's terms of service and applicable laws. This actor only accesses publicly available search listings. |
| Can I schedule recurring runs? | Yes. Use Apify's scheduler to run this actor daily, weekly, or on any custom interval. |
| What if I get no results for a query? | Facebook may return no results for very specific or uncommon queries. Try a broader term or a different search type. |
| Can I scrape Facebook profiles or private content? | No. This actor only reads public search listings. It does not access profiles, private groups, or any content behind a login. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

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

List of search queries

## `searchType` (type: `string`):

Type of entity to search

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

Maximum number of results to collect per run.

## Actor input object example

```json
{
  "queries": [
    "nike",
    "apple"
  ],
  "searchType": "pages",
  "maxItems": 10
}
```

# Actor output Schema

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

Complete 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": [
        "nike",
        "apple"
    ],
    "searchType": "pages",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/facebook-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 = {
    "queries": [
        "nike",
        "apple",
    ],
    "searchType": "pages",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("parseforge/facebook-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 '{
  "queries": [
    "nike",
    "apple"
  ],
  "searchType": "pages",
  "maxItems": 10
}' |
apify call parseforge/facebook-search-scraper --silent --output-dataset

```

## MCP server setup

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