# Facebook Content Search Extractor (`crawl_craft/facebook-content-search-extractor`) Actor

Search Facebook by keyword and extract public videos, reels, posts, pages, groups, people and events. Get views, reactions by type, comments, shares, publisher, followers, hashtags and links as clean JSON. Bulk keywords, live results, no account or cookies needed.

- **URL**: https://apify.com/crawl_craft/facebook-content-search-extractor.md
- **Developed by:** [Crawl Craft](https://apify.com/crawl_craft) (community)
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 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.
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

### 🚀 What is Facebook Content Search Extractor?

Facebook Content Search Extractor is an Apify Actor and Facebook search scraper that turns keywords into public Facebook videos, reels, posts, pages, groups, people and events. Each result comes back as structured data, including views, reactions, comments, shares and publisher details when available, and no Facebook login is needed.

- 🔎 **Bulk keywords:** a bulk Facebook keyword search takes one keyword or search link per line, and the maximum applies across all of them.
- 🎞️ **Videos and reels with the most data:** the Facebook video search scraper side returns views, reactions, comments and shares.
- 🎯 **Filters:** narrow results by date, place and excluded words, or list the newest first.
- ⚡ **Live results:** rows are saved while the run is still going, so you can start using them at once.
- 🔓 **No login:** Facebook search without login works because only public content is collected.
- 🧭 **One tool for every type:** the Facebook keyword scraper covers videos, reels, posts, pages, groups, people and events in the same run.

Click **Try for free**, add a keyword and press **Start**.

### 📊 What data can you extract from Facebook search?

The Facebook search extractor returns one dataset row per result, and you can export the dataset as JSON, CSV or Excel. This Facebook search data extractor uses the same field names for every content type, and a field is empty (`null`) when Facebook does not show it for a result.

| Field | Description | Example |
|---|---|---|
| `post_id` | Numeric ID of the post, video or reel when one is available. | 1752571836871534 |
| `type` | What the result is: reel, video, post, page, group, people or event. | reel |
| `url` | Public Facebook link of the result. | https://www.facebook.com/reel/1997158407638598/ |
| `message` | Caption or text of the post, video or reel. | Best coffee in town #coffee |
| `title` | Title shown for the result. | Coffee Shop - Home |
| `name` | Name of the page, person, group or event. | The Rise Coffee Bar |
| `description` | Short description of the page, person, group or event. | Specialty coffee in Charleston |
| `timestamp` | Publish time as a Unix timestamp (seconds). | 1792075032 |
| `created_at` | Publish time as an ISO 8601 UTC date-time. | 2026-10-15T14:37:12Z |
| `comments_count` | Number of comments. | 3 |
| `reactions_count` | Total number of reactions. | 825 |
| `reshare_count` | Number of shares. | 4 |
| `views_count` | Number of video or reel views. | 41186 |
| `reactions` | Counts per reaction: like, love, care, haha, wow, sad, angry. | {"like": 806, "love": 16} |
| `author` | Who published it: id, name, url and profile picture. | {"id": "100063562027709", "name": "Makeitlina"} |
| `image` | Thumbnail image: uri, width, height and id. | {"uri": "https://example.com/thumb.jpg"} |
| `video` | Video details: id, url, sd_url, hd_url, duration_ms, width, height, thumbnail. | {"id": "1997158407638598"} |
| `hashtags` | Hashtags found in the text. | \["#coffee"] |
| `mentions` | People, pages or groups mentioned in the text. | \["@Rise Coffee"] |
| `privacy` | Audience of the post when shown, for example Public. | Public |
| `page_id` | ID or handle of the page or person. | TheRiseCoffeeBar |
| `group_id` | ID or handle of the group. | coffeelovers |
| `event_id` | ID of the event. | 1234567890 |
| `followers_count` | Number of followers. | 95200 |
| `likes_count` | Number of page likes. | 809 |
| `members_count` | Number of group members. | 12000 |
| `talking_about_count` | Number of people talking about the page. | 120 |
| `were_here_count` | Number of check-ins. | 340 |
| `location` | Where an event takes place. | Dhaka, Bangladesh |
| `organizer` | Who organizes the event. | Barista Society |
| `starts_on` | Event start date (YYYY-MM-DD). | 2025-05-08 |
| `category` | Page category when available. | Coffee Shop |
| `phone` | Public phone number when available. | +1 843 555 0100 |
| `profile_picture_url` | Profile or cover picture link. | https://example.com/pic.jpg |
| `detail_level` | How much was read: full, card, search_hit or detailed. | full |
| `source` | Which part of the Actor found the result: video_search or web_search. | video_search |
| `search_query` | The keyword that produced the result. | coffee shop |
| `rank` | Position of the result for its keyword. | 1 |
| `scraped_at` | When the result was collected (UTC). | 2026-10-17T10:00:00Z |

#### What you get for each content type

- **Videos and reels:** the Facebook reels scraper results include `views_count`, `reactions_count`, `reactions`, `comments_count`, `reshare_count`, `author`, `hashtags` and `image`.
- **Videos in detail:** the Facebook video scraper output adds a `video` object with playable links and sizes, plus a thumbnail.
- **Posts:** Facebook post search scraper rows carry `message`, `title`, `created_at`, `author`, `hashtags`, `mentions` and `privacy`.
- **Pages and people:** Facebook page search scraper rows add `followers_count`, `likes_count`, `talking_about_count`, `were_here_count`, `category` and `phone`.
- **People:** Facebook people search scraper rows use the same name, description and profile fields as pages.
- **Groups:** Facebook groups search scraper rows include `members_count` and `group_id`.
- **Events:** Facebook events search scraper rows include `location`, `organizer`, `starts_on` and `event_id`.

Switch on **Add page details** to fill more of these fields for pages, groups, people and events.

### 💡 Use cases for Facebook search data

- **Brand monitoring:** Facebook brand mention monitoring is easier when you combine keywords, date filters and excluded words, then read `message`, `hashtags` and `author`.
- **Video performance research:** Facebook video views and reactions data (`views_count`, `reactions`, `reshare_count`) show which videos land for a topic.
- **Reels research:** Facebook reels views by keyword come back in `views_count`, so you can compare reels across several keywords.
- **Trend spotting:** sort by most recent to follow Facebook trending videos by keyword in your own reports.
- **Competitor analysis:** Facebook competitor content research compares the pages, videos and posts that appear for the same keywords.
- **Local lead lists:** Facebook local business leads come from pages with `category`, `phone` and `followers_count` when Facebook shows them, and the **Place** input narrows the search to one area.
- **Community discovery:** you can find Facebook groups by keyword and rank them by `members_count`.
- **Event discovery:** you can find Facebook events by keyword and read the place, organizer and start date.
- **People and page discovery:** find Facebook people by keyword, or scrape Facebook pages by keyword to collect names, followers and links.
- **Analytics and AI pipelines:** structured JSON rows are ready for dashboards, research notebooks and AI workflows.

### 🛠️ How to scrape Facebook search results

1. Create a free Apify account.
2. Open Facebook Content Search Extractor.
3. Add keywords or Facebook search links under **Keywords or search links**, one per line.
4. Choose a **Content type**: posts, pages, groups, people, events or videos and reels.
5. Set **Maximum results** and any filters such as dates, place or excluded words.
6. Click **Start** and watch results appear in the Output tab.
7. Download the dataset as JSON, CSV or Excel.

#### Scrape Facebook videos by keyword

To scrape Facebook videos by keyword, set `searchType` to `videos` and add your keywords to `urls`. Reels are included in this content type.

#### Search Facebook posts by keyword

To search Facebook posts by keyword, leave `searchType` on `posts`. You can also paste a Facebook search link, and a link that names a section such as videos, pages, groups, people, events or posts uses that section for that line.

#### Filter Facebook search by date

To filter Facebook search by date, set `dateFrom` and `dateTo`, either as calendar dates or as relative periods such as 7 days, 2 weeks or 3 months back from today. Dates apply to posts and videos, and they are ignored for the other types because those results carry no date.

#### Run a Facebook hashtag search

The Facebook hashtag search scraper accepts a hashtag link such as `https://www.facebook.com/hashtag/coffee` and treats it as a keyword that starts with a hash sign.

### 💰 How much does it cost to scrape Facebook search results?

Facebook Content Search Extractor uses pay-per-event pricing. Each result you receive is one **Results** event, priced from $5 per 1,000 results on the Free plan and lower on higher tiers.

| Apify plan tier | Price per 1,000 results |
|---|---|
| Free | $5 |
| Bronze | $4.5 |
| Silver | $4 |
| Gold / Platinum / Diamond | $3.5 |

A small Actor Start event of $0.00005 per run start also applies. See the Pricing tab for current rates.

### ⬇️ Input

Facebook Content Search Extractor needs one input: `urls`, a list of keywords or Facebook search links, one per line. Everything else is optional.

![Facebook search scraper input form with keywords and content type](IMAGE_URL_PLACEHOLDER "facebook-content-search-extractor-input-form.png")

See the Input tab for every option.

| Parameter | What it does |
|---|---|
| `urls` | Keywords or Facebook search links, one per line (required). |
| `searchType` | posts, pages, groups, people, events or videos (videos include reels). |
| `location` | Optional place name added to every search, for example Dhaka. |
| `maxItems` | Total results across all keywords. Use 0 for as many as are available. |
| `sort` | `relevance` or `recent`. |
| `dateFrom` / `dateTo` | Keep results published inside this window (UTC). |
| `excludeTerms` | Drop results that mention any of these words. |
| `includeDetails` | Open each result's public page to add followers, likes, views, reactions, category and phone where available. |
| `proxyConfiguration` | Optional. Leave it as it is for automatic handling. |

```json
{
  "urls": ["coffee shop"],
  "searchType": "videos",
  "maxItems": 10
}
```

💡 Keep `maxItems` low for a first test run.

⚠️ Switching on `includeDetails` makes each run slower.

### ⬆️ Output

The scraped results are shown as a dataset in the **Storage** tab. The table view is for convenience and doesn't show **all the fields**. The Output tab also has a view for each section: all results, videos and reels, posts, engagement, pages and people, groups, events and media.

![Facebook search results scraper output table with views and reactions](IMAGE_URL_PLACEHOLDER "facebook-content-search-extractor-output-table.png")

You can download the dataset in these formats:

- **CSV:** export Facebook search results to CSV for spreadsheets.
- **Excel:** save Facebook search results to Excel workbooks.
- **JSON:** convert Facebook search results to JSON for code and APIs.

Example output for the input above, built from the example values in the dataset schema (not a captured run):

```json
{
  "post_id": "1752571836871534",
  "type": "reel",
  "url": "https://www.facebook.com/reel/1997158407638598/",
  "message": "Best coffee in town #coffee",
  "timestamp": 1792075032,
  "created_at": "2026-10-15T14:37:12Z",
  "comments_count": 3,
  "reactions_count": 825,
  "reshare_count": 4,
  "views_count": 41186,
  "reactions": { "like": 806, "love": 16 },
  "author": { "id": "100063562027709", "name": "Makeitlina" },
  "video": { "id": "1997158407638598" },
  "hashtags": ["#coffee"],
  "detail_level": "full",
  "source": "video_search",
  "search_query": "coffee shop",
  "rank": 1,
  "scraped_at": "2026-10-17T10:00:00Z"
}
```

#### Searches table and run summary

A free **Searches** table has one row per keyword or search link, with the fields `query`, `searchType`, `status`, `results`, `examined`, `error` and `stoppedBecause`. A `SUMMARY` record in the key-value store holds the totals for the run.

### ⚠️ Limitations and error handling

- The Facebook search results scraper collects only public content. Private groups, private profiles and anything behind a login are not included.
- Not every field exists for every result, so some fields are `null`.
- If you set a spending limit for the run, the run stops cleanly when it is reached and keeps the results already saved.
- Dates apply to posts and videos only.
- A run can return fewer results than you asked for when a keyword has few public matches or your filters remove some. The log and the Searches table show how many results were looked at and why the run ended.

The `status` field in the Searches table tells you how each keyword went:

| Status | Meaning | What to do |
|---|---|---|
| `ok` | Results were saved for the keyword. | Nothing. Open the dataset. |
| `no_results` | Nothing matched the keyword and your filters. | Try other keywords or looser filters. |
| `skipped` | The result limit was reached before the keyword was searched. | Raise `maxItems` or run it again on its own. |
| `failed` | Nothing could be collected, and `error` says what went wrong. | Check the keyword or link and run it again. |

### 🔌 Integrating Facebook Content Search Extractor with other apps

You can start Facebook Content Search Extractor from the [Apify API](https://docs.apify.com/api/v2), so it works like a Facebook search API inside your own code. Use [Apify schedules](https://docs.apify.com/platform/schedules) to repeat a search on a timer, which gives you a recurring Facebook search crawler without extra setup.

The [Apify integrations](https://docs.apify.com/platform/integrations) connect finished runs to spreadsheets, automation apps and webhooks, so this Facebook search tool can feed the places where your team already works. AI agents can also find and run the Actor through the Apify MCP server. See the API tab for ready-made code snippets.

### 🔗 More Apify Actors by crawl_craft

| Actor | What it extracts | When to use it |
|---|---|---|
| [Facebook Posts Search Scraper](https://apify.com/crawl_craft/facebook-posts-search-scraper) | Public posts by keyword or hashtag with reactions breakdown, comments, shares, media and top comments | Use it when you only need posts with engagement filters. |
| [TikTok Video Scraper](https://apify.com/crawl_craft/tiktok-video-scraper) | TikTok video stats, captions, hashtags and author data from video URLs | Use it when your video research moves from Facebook to TikTok. |
| [TikTok User Search Scraper](https://apify.com/crawl_craft/tiktok-user-search-scraper) | TikTok creator profiles from a keyword search | Use it when you want creators for a keyword on TikTok. |
| [Telegram Scraper](https://apify.com/crawl_craft/telegram-scraper) | Messages, views, reactions and subscriber counts from public Telegram channels | Use it when you track public channels instead of Facebook. |

### ⚖️ Is it legal to scrape Facebook?

Whether it is legal to scrape Facebook depends on what you collect and how you use it. This Facebook public content scraper only collects content that is publicly visible on Facebook and does not sign in to private areas.

Results may still contain personal data, so collect it only with a legitimate reason and consider GDPR (Regulation (EU) 2016/679) and Facebook's terms. Consult a lawyer if you are unsure. For background, read Apify's posts on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/) and [ethical web scraping](https://blog.apify.com/ethical-web-scraping/).

### ❓ FAQ

#### How much does Facebook Content Search Extractor cost?

You pay for each result received, from $5 per 1,000 results on the Free plan down to $3.5 on the highest tiers, plus a tiny Actor Start event. See the Pricing tab for current rates.

#### Do I need a Facebook account or login?

No. Only public content that any visitor can see is collected, so you need just an Apify account.

#### How many results can I get?

Set `maxItems` to the number you want, or 0 for as many as are available.

#### Can this Facebook content scraper collect private pages or profiles?

No. Facebook Content Search Extractor returns public content only.

#### Which content type returns the most data?

Videos and reels, with views, a reaction breakdown, comments and shares. Posts, pages, groups, people and events return what is publicly visible for each.

#### Why are some fields null?

Facebook does not show every field for every result. Switch on **Add page details** to fill more fields for pages, groups, people and events.

#### Do I need proxies?

No. Leave the Proxy setting as it is, and the Actor handles the connection for you.

#### Can I use it through the API or an MCP server?

Yes. Start runs with the Apify API or from an AI agent through the Apify MCP server, and read the dataset when the run finishes.

#### Can I search many keywords at once?

Yes. Add one keyword or link per line. The `maxItems` limit applies across all of them.

### 💬 Your feedback

Found a bug or want a new field? Open a ticket in the Issues tab of this Actor. For a custom solution, write to hello.crawlcraft@gmail.com.

# Actor input Schema

## `urls` (type: `array`):

One keyword or Facebook search link per line, e.g. coffee shop or https://www.facebook.com/search/videos/?q=coffee. Bulk input is supported; add as many as you need. A link that names a section (videos, pages, groups, people, events, posts) uses that section for that line.

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

What to look for. Videos include reels and come with the most data (views, reactions, comments, shares). The other types return public posts, pages, groups, people or events.

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

Optional place name added to every search, e.g. Dhaka. Leave empty to search everywhere.

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

Total number of results to collect across all keywords. Use 0 for as many as are available.

## `sort` (type: `string`):

Relevance keeps the order of the search. Recent favours newer content and lists the newest first within each batch.

## `dateFrom` (type: `string`):

Only keep results published on or after this date (UTC). Pick a calendar date, or switch to relative and enter a period such as 7 days, 2 weeks or 3 months back from today. Applies to posts and videos. Leave empty for no start date.

## `dateTo` (type: `string`):

Only keep results published on or before this date (UTC). Pick a calendar date, or switch to relative and enter a period such as 1 week back from today. Leave empty for no end date.

## `excludeTerms` (type: `array`):

Drop results that mention any of these words, e.g. giveaway or sale. Leave empty to keep everything.

## `includeDetails` (type: `boolean`):

Open each result's public page to add followers, likes, views, reactions, category and phone where available. Slower, but richer for pages, groups, people and events.

## `proxyConfiguration` (type: `object`):

Choose how the Actor connects. The default works for most runs.

## Actor input object example

```json
{
  "urls": [
    "coffee shop"
  ],
  "searchType": "videos",
  "maxItems": 10,
  "sort": "relevance",
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Every collected result, overview view.

## `videos` (type: `string`):

Videos and reels with views, reactions, comments, shares and publisher.

## `posts` (type: `string`):

Public posts with text, date, publisher and hashtags.

## `engagement` (type: `string`):

Views, reactions, comments and shares side by side.

## `pagesPeople` (type: `string`):

Pages and public profiles with followers, likes and contact details.

## `groups` (type: `string`):

Groups with member counts and descriptions.

## `events` (type: `string`):

Events with place, organizer and start date.

## `media` (type: `string`):

Thumbnails and playable video links.

## `searches` (type: `string`):

One row per keyword or search link, with its status and result count.

## `summary` (type: `string`):

Totals for the run.

# 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 = {
    "urls": [
        "coffee shop"
    ],
    "searchType": "videos",
    "maxItems": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawl_craft/facebook-content-search-extractor").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 = {
    "urls": ["coffee shop"],
    "searchType": "videos",
    "maxItems": 10,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("crawl_craft/facebook-content-search-extractor").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 '{
  "urls": [
    "coffee shop"
  ],
  "searchType": "videos",
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call crawl_craft/facebook-content-search-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawl_craft/facebook-content-search-extractor"
        }
    }
}
```

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/DbwLndsJtQyAskEJo/builds/Hsb3IxoJneG2yuWYN/openapi.json
