# 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,378 total users, 70 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.
- 📇 **Page leads with contacts, not just names.** Turn on `page_details` for a pages or places search and each result comes back with what the page publishes: email, phone, website, address with coordinates, category, intro, followers, rating and price range. On a real run of 48 pages (dentists, coffee shops and yoga studios in Austin and London), 44 carried at least one contact: 36 an address, 29 a phone, 29 a website, 23 an email.
- 🗺️ **Several keywords and locations in one run.** Give a list of queries and a list of locations, and every query is searched in every location: 3 queries in 2 cities made 6 searches and 48 unique pages in 25 seconds. A result found twice is returned, and counted, once.
- 🎯 **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 email, phone, website and address 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, or `queries` | What to search for, for example a keyword, brand or topic |
| `queries` | array | No | More search queries. Each one is searched on its own, in every location |
| `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. With several queries or locations, the maximum for each search |
| `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 |
| `locations` | array | No | More locations. Every query runs in every location, so 2 queries in 3 locations make 6 searches |
| `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 |
| `page_details` | boolean | No | For `pages` and `places`: add the contacts and details each page publishes (email, phone, website, address, followers, rating). Off by default |

One field is enough: everything except `query` has a sensible default, so the shortest working input is `{ "query": "cold brew" }`. When a run makes several searches, each result also carries `search_query` and `search_location`, so you know which search found it.

### 📊 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"
}
```

#### Page lead (with `page_details` on)

The same row, completed with what the page publishes. Every field below is always present, and empty (`null`) when the page does not publish it.

```json
{
  "id": "100063689196205",
  "name": "Austin Laser Dentist - Helen Ragsdale DDS",
  "url": "https://www.facebook.com/AustinLaserDentistry",
  "category": "Cosmetic Dentist",
  "description": "Welcome to Austin Laser Dentist's Facebook page! Dr. Helen Ragsdale provides the full spectrum of dental services...",
  "verified": false,
  "profile_picture_url": "https://scontent.xx.fbcdn.net/...",
  "type": "page",
  "categories": ["Cosmetic Dentist"],
  "intro": "Welcome to Austin Laser Dentist's Facebook page! Dr. Helen Ragsdale provides the full spectrum of dental services...",
  "email": "appointment@austinlaserdentist.com",
  "phone": "+1 512-346-4690",
  "whatsapp": null,
  "website": "https://www.austinlaserdentist.com/",
  "websites": ["https://www.austinlaserdentist.com/"],
  "social_links": [],
  "address": "11615 Angus Rd, Ste 101, Austin, TX, United States, Texas",
  "latitude": 30.413785,
  "longitude": -97.743549,
  "followers": 538,
  "followings": 20,
  "rating": "96% recommend (74 reviews)",
  "recommend_percent": 96,
  "rating_count": 74,
  "price_range": "$$",
  "business_hours": "Closed now",
  "business_services": null,
  "cover_photo_url": "https://scontent.xx.fbcdn.net/...",
  "ad_library_id": "111542492211989",
  "ad_library_url": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=ALL&view_all_page_id=111542492211989"
}
```

### 🗂️ 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`, `video_duration` (seconds, on videos and reels), `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` |
| **Page contacts** (`page_details`) | `email`, `phone`, `whatsapp`, `website`, `websites`, `social_links` (Instagram, YouTube and other accounts the page links) |
| **Page location** (`page_details`) | `address`, `latitude`, `longitude` |
| **Page profile** (`page_details`) | `categories`, `intro`, `followers`, `followings`, `cover_photo_url`, `price_range`, `business_hours` (open or closed at the time of the run), `business_services` |
| **Page reviews** (`page_details`) | `rating` (as Facebook words it), `recommend_percent`, `rating_count` |
| **Page ads** (`page_details`) | `ad_library_id`, `ad_library_url` (the page's entry in the Ad Library) |
| **Search** (runs with several searches) | `search_query`, `search_location` |

### 🚀 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 }
```

**Build a list of leads with contacts**

```json
{ "query": "dentist", "search_type": "pages", "location": "Austin", "max_posts": 50, "page_details": true }
```

**Several keywords in several cities**

```json
{ "queries": ["dentist", "orthodontist"], "locations": ["Austin", "Dallas", "Houston"], "search_type": "pages", "max_posts": 30, "page_details": true }
```

**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.
- Turn on `page_details` only when you need contacts: a run with details takes a little longer (10 pages with details took 3 to 5 seconds in our tests).
- Follower counts above a thousand are rounded the way Facebook shows them (`1.6K` becomes 1600).
- 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.

**Can I get emails and phone numbers of pages?**
Yes. Set `search_type` to `pages` or `places` and turn on `page_details`. You get the email, phone, website and address each page chose to publish. A page that publishes none comes back with those fields empty.

**Can I search several keywords or cities at once?**
Yes. Use `queries` and `locations`. Every query is searched in every location, `max_posts` applies to each search, and duplicates across searches are removed.

**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.

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

Search several keywords in one run, for example <code>dentist</code>, <code>orthodontist</code>, <code>dental clinic</code>. Each query is searched on its own, in every location you give, and a result found twice is returned once.

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

Which kind of results to return. Defaults to posts.

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

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

## `locations` (type: `array`):

Run every query in several places, for example <code>Austin, United States</code> and <code>Dallas, United States</code>. Two queries in three locations make six searches.

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

Maximum number of results to return. Defaults to 10. With several queries or locations, this is the maximum for each search.

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

Sort posts by most recent instead of relevance.

## `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.

## `page_details` (type: `boolean`):

For <b>Pages</b> and <b>Places</b> searches, open each result and add what the page publishes: email, phone, website, address with coordinates, category, intro, followers, rating and review count, price range, opening status and links to its other social accounts. Off by default: turn it on when you need leads rather than a list of names. Runs take longer, and a page that publishes no contact comes back with empty contact fields.

## Actor input object example

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

# Actor output Schema

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

All results collected in this run. Export as JSON, CSV, or Excel from the dataset.

## `pageLeads` (type: `string`):

Pages and places with the contacts they publish: email, phone, website, address and followers. Filled when Page details is on.

# 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/HnwFLkLlzYNWlXJUs/openapi.json
