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

Search Facebook by keyword and export posts, pages, places, events and people as clean structured data. Get text, author, reactions breakdown, comment and share counts, images, videos, links and timestamps. No login. Six search types in one actor. For lead generation, social listening, research.

- **URL**: https://apify.com/silentflow/facebook-search-scraper.md
- **Developed by:** [SilentFlow](https://apify.com/silentflow) (community)
- **Categories:** Social media, Lead generation
- **Stats:** 7 total users, 2 monthly users, 94.3% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.90 / 1,000 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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 Search Scraper

by [SilentFlow](https://apify.com/silentflow)

Search Facebook the way a person would, and get the results back as clean, structured data. Type a keyword, pick what you want (posts, pages, places, events, people, videos or a mixed feed), and export every result with author, engagement counts, timestamps and links. No login, no manual copy and paste.

### How it works

![How it works](https://api.apify.com/v2/key-value-stores/pLC8tqaTfXvZgmVKC/records/how-it-works-v2.png)

1. Enter a search query and choose a result type: posts, pages, places, events, people, videos or global.
2. Run the actor. It collects results page by page and returns them as a ready-to-use dataset you can export to JSON, CSV or Excel.

### ✨ Why teams choose this over other Facebook search scrapers

- 🔓 **No login and no account required.** Point it at a keyword and go. You never share a Facebook account or risk one, because results come from public search only.
- 🎯 **Seven search types in one actor.** Posts, pages, places, events, people, videos and a mixed global feed, all from the same simple input. No other Facebook search scraper covers this many.
- 📊 **Real engagement, not just text.** Every post comes with a full reactions breakdown (like, love, haha, wow, sad, angry, care) plus comment and share counts, so you can rank by what actually performs.
- 🔁 **Built to keep working.** The actor adapts automatically when Facebook changes things behind the scenes, so your runs keep returning data instead of breaking.
- ⚡ **Fast and cheap.** Results come back in seconds and you pay per result, never for idle compute time.
- 🧹 **Clean, flat fields.** Author, message, counts, timestamp and URL are ready for a spreadsheet or a database with zero cleanup.

### 🎯 What you can do with Facebook search data

| Team | What they build |
|------|-----------------|
| **Lead generation** | Prospect lists of pages and places around a topic or location, with links and names ready for outreach |
| **Social listening** | Track what people post about a brand, product or event and sort by reactions to find what resonates |
| **Market research** | Map the businesses and communities active around a keyword or in a specific city |
| **PR and comms** | Catch mentions early and measure how far a post spread using share and comment counts |
| **Content teams** | Find the highest-engagement posts on a topic to model new content on what already works |
| **Recruiting and local ops** | Discover local groups, pages and places relevant to a market before you expand into it |

### 📥 Input parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `query` | string | Yes | What to search for, for example a keyword, brand or topic |
| `search_type` | string | Yes | `posts`, `pages`, `places`, `events`, `people`, `videos` or `global` (mixed) |
| `max_posts` | integer | Yes | Maximum number of results to return |
| `recent_posts` | boolean | No | Sort posts by most recent instead of relevance |
| `location` | string | No | Focus the search on a place. For best results include city and country |
| `start_date` | string | No | Only posts on or after this date. Format: YYYY-MM-DD |
| `end_date` | string | No | Only posts on or before this date. Format: YYYY-MM-DD |

### 📊 Output data

#### Post result

```json
{
  "post_id": "3692084947600966",
  "url": "https://www.facebook.com/groups/2308607455948729/permalink/3692084947600966/",
  "message": "I had the opportunity to stop by Fowl Retrievers recently and wanted to give them a shoutout...",
  "author": {
    "id": "100094594673792",
    "name": "Daddy Doo Care",
    "url": "https://www.facebook.com/people/Daddy-Doo-Care/100094594673792/",
    "profile_picture_url": "https://scontent.xx.fbcdn.net/..."
  },
  "timestamp": 1782401935,
  "reactions_count": 60,
  "comments_count": 13,
  "reshare_count": 19,
  "reactions": { "like": 49, "love": 10, "haha": 0, "wow": 0, "sad": 0, "angry": 0, "care": 1 },
  "type": "post",
  "image": "https://scontent.xx.fbcdn.net/...",
  "video": "https://www.facebook.com/watch/?v=4611732049098555",
  "video_thumbnail": "https://scontent.xx.fbcdn.net/...",
  "album_preview": ["https://scontent.xx.fbcdn.net/...", "https://scontent.xx.fbcdn.net/..."],
  "external_url": "https://example.com/shared-link",
  "comments_id": "ZmVlZGJhY2s6MzY5MjA4NDk0NzYwMDk2Ng==",
  "shares_id": "ZmVlZGJhY2s6MzY5MjA4NDk0NzYwMDk2Ng==",
  "associated_group_id": "2308607455948729"
}
````

#### Page or place result

```json
{
  "id": "100064826019420",
  "name": "Coffee Coffee",
  "url": "https://www.facebook.com/minthusunshine",
  "category": "Coffee shop",
  "description": "Freshly roasted, locally loved.",
  "verified": false,
  "profile_picture_url": "https://scontent.xx.fbcdn.net/...",
  "type": "page"
}
```

### 🗂️ Data fields

| Group | Fields |
|-------|--------|
| **Post** | `post_id`, `url`, `message`, `timestamp`, `type` |
| **Author** | `author.id`, `author.name`, `author.url`, `author.profile_picture_url` |
| **Engagement** | `reactions_count`, `comments_count`, `reshare_count`, `reactions` (like, love, haha, wow, sad, angry, care) |
| **Media and links** | `image`, `video`, `video_thumbnail`, `video_view_count`, `album_preview`, `external_url` |
| **Context and reshares** | `author_title` (group or page the post appears in), `message_rich` (mentions, hashtags and links inside the text), `attached_post` (the original post when it is a share) |
| **Follow-up IDs** | `comments_id`, `shares_id`, `associated_group_id` |
| **Page / place** | `id`, `name`, `url`, `category`, `description`, `verified`, `profile_picture_url`, `type` |

### 🚀 Examples

**Find recent posts about a product**

```json
{ "query": "cold brew", "search_type": "posts", "max_posts": 50, "recent_posts": true }
```

**Build a list of pages around a topic**

```json
{ "query": "specialty coffee", "search_type": "pages", "max_posts": 100 }
```

**Find places in a city**

```json
{ "query": "coffee", "search_type": "places", "max_posts": 50, "location": "Austin, United States" }
```

**Posts in a date range**

```json
{ "query": "product launch", "search_type": "posts", "max_posts": 40, "start_date": "2026-01-01", "end_date": "2026-03-31" }
```

**Discover events by keyword**

```json
{ "query": "music festival", "search_type": "events", "max_posts": 50 }
```

### 💻 Integrations

Connect the results to the tools you already use with Apify integrations: Make, Zapier, n8n, Google Sheets, Slack, or your own app through the Apify API. Schedule runs to keep a topic or location continuously monitored, and push new results straight into your CRM or data warehouse.

### 📈 Performance

Results come back in seconds. Each run pages through the results until it reaches your `max_posts` limit, so cost and runtime scale with exactly how much data you ask for and nothing more.

### 💡 Tips for best results

- Use specific queries. "cold brew coffee austin" returns tighter results than "coffee".
- Turn on `recent_posts` when you care about what is happening now rather than all-time relevance.
- For broad category words in `places` and `pages` search (for example "restaurant", "bar", "dentist"), add a `location`. Facebook needs a place to search within for generic categories, so without a location they return nothing, while specific terms like "pizza" or "coffee" work on their own.
- Use `global` when you want a quick mixed snapshot, and a specific type when you want volume of one kind.
- Set `max_posts` to what you actually need. Smaller runs finish faster and cost less.

### ❓ FAQ

**Do I need a Facebook account or login?**
No. The actor only uses public search, so you never provide credentials.

**Which search types are supported?**
Posts, pages, places, events, people, videos, and a mixed global feed.

**Can I filter posts by date?**
Yes. Use `start_date` and `end_date` in `YYYY-MM-DD` format, and turn on `recent_posts` to sort by newest.

**What engagement data do I get?**
For posts you get total reactions, a per-type reactions breakdown, comment count and share count.

**In what formats can I export?**
JSON, CSV, and Excel, plus the Apify API for programmatic access.

### 📬 Support

Maintained by [SilentFlow](https://apify.com/silentflow). Have a request or want another Facebook data type added? Let us know and we will consider it for a future update.

# Actor input Schema

## `query` (type: `string`):

What to search for on Facebook, for example a keyword, brand or topic.

## `search_type` (type: `string`):

Which kind of results to return.

## `max_posts` (type: `integer`):

Maximum number of results to return.

## `recent_posts` (type: `boolean`):

Sort posts by most recent instead of relevance.

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

Optional location to focus the search. For best results include both city and country.

## `start_date` (type: `string`):

Only posts created on or after this date. Format: YYYY-MM-DD.

## `end_date` (type: `string`):

Only posts created on or before this date. Format: YYYY-MM-DD.

## Actor input object example

```json
{
  "query": "coffee",
  "search_type": "posts",
  "max_posts": 10,
  "recent_posts": false
}
```

# Actor output Schema

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

All results collected in this run. Export as JSON, CSV, or Excel from the 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 = {
    "query": "coffee"
};

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

# Run the Actor and wait for it to finish
run = client.actor("silentflow/facebook-search-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "coffee"
}' |
apify call silentflow/facebook-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=silentflow/facebook-search-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Search Scraper",
        "description": "Search Facebook by keyword and export posts, pages, places, events and people as clean structured data. Get text, author, reactions breakdown, comment and share counts, images, videos, links and timestamps. No login. Six search types in one actor. For lead generation, social listening, research.",
        "version": "1.0",
        "x-build-id": "WsbLEqHfm0PwIfx93"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/silentflow~facebook-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-silentflow-facebook-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/silentflow~facebook-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-silentflow-facebook-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/silentflow~facebook-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-silentflow-facebook-search-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "query",
                    "search_type",
                    "max_posts"
                ],
                "properties": {
                    "query": {
                        "title": "Search query",
                        "type": "string",
                        "description": "What to search for on Facebook, for example a keyword, brand or topic."
                    },
                    "search_type": {
                        "title": "Search type",
                        "enum": [
                            "posts",
                            "pages",
                            "places",
                            "events",
                            "people",
                            "videos",
                            "global"
                        ],
                        "type": "string",
                        "description": "Which kind of results to return.",
                        "default": "posts"
                    },
                    "max_posts": {
                        "title": "Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of results to return.",
                        "default": 10
                    },
                    "recent_posts": {
                        "title": "Recent first",
                        "type": "boolean",
                        "description": "Sort posts by most recent instead of relevance.",
                        "default": false
                    },
                    "location": {
                        "title": "Location",
                        "type": "string",
                        "description": "Optional location to focus the search. For best results include both city and country."
                    },
                    "start_date": {
                        "title": "Date from",
                        "type": "string",
                        "description": "Only posts created on or after this date. Format: YYYY-MM-DD."
                    },
                    "end_date": {
                        "title": "Date to",
                        "type": "string",
                        "description": "Only posts created on or before this date. Format: YYYY-MM-DD."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
