# 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, News
- **Features:** Limited permissions
- **Stats:** 25,367 total users, 65 monthly users, 100.0% 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/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 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 | No | `posts` (default), `pages`, `places`, `events`, `people`, `videos` or `global` (mixed) |
| `max_posts` | integer | No | Maximum number of results to return. Defaults to 10 |
| `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 |

One field is enough: everything except `query` has a sensible default, so the shortest working input is `{ "query": "cold brew" }`.

### 📊 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

**Search with a single field**

```json
{ "query": "cold brew" }
```

**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 `places` and `pages` searches, add a `location` (city and country) to focus a broad term like "restaurant" or "dentist" on one area instead of the whole of Facebook.
- 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. Defaults to posts.

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

Maximum number of results to return. Defaults to 10.

## `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(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 '{
  "query": "coffee"
}' |
apify call silentflow/facebook-search-scraper --silent --output-dataset

```

## MCP server setup

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