# Facebook Video Search Scraper (`automation-lab/facebook-video-search-scraper`) Actor

Find public Facebook Watch and Reel videos by keyword, with clean deduplicated records for social listening and creator research.

- **URL**: https://apify.com/automation-lab/facebook-video-search-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 Video Search Scraper

Discover public Facebook Watch and Reel videos by keyword.

Use it for social listening, creator research, campaign discovery, and trend tracking.

This actor collects only public anonymous search results.

### What does it do?

- Searches Facebook's public video search pages.
- Saves one deduplicated row per public video.
- Keeps the originating keyword on every row.
- Does not require Facebook credentials.

### Who is it for?

- Social-listening analysts monitoring topics.
- Creator agencies researching video formats.
- Brand teams tracking public campaigns.
- Researchers building repeatable discovery datasets.

### Why use it?

- Turn manual Watch searches into a dataset.
- Deduplicate by video ID and clean URL.
- Retain visible metadata with the search context.
- Export to CSV, JSON, Google Sheets, or an API workflow.

### What public data do I get?

| Field | Meaning |
| --- | --- |
| `query` | Keyword that found the video |
| `videoId` | Facebook public reel/watch ID |
| `url` | Clean public video URL |
| `title` | Visible video caption or title |
| `creator` | Visible page or creator label |
| `thumbnailUrl` | Public thumbnail URL where rendered |
| `duration` | Visible duration where rendered |
| engagement fields | Visible views, reactions, comments, shares |

### Quick start

1. Add one or more search keywords.
2. Keep the first `maxItems` value low.
3. Run the actor.
4. Export the default dataset.
5. Repeat on a schedule for monitoring.

### Input: video search keywords

`searchQueries` accepts a list of public Facebook video topics.

Use clear phrases such as `marketing`, `sustainable fashion`, or `creator economy`.

Each resulting row contains the query that discovered it.

### Input: maximum videos

`maxItems` caps all output rows across your queries.

Start with 10 to validate your workflow.

Increase the value only after reviewing sample output.

The maximum supported value is 500.

### Input: sorting

Choose `TOP` for Facebook's default public ordering.

Choose `RECENT` when Facebook exposes its public recent ordering.

Facebook can change its user-interface filters at any time.

### Input: advanced scrolling

`maxScrolls` bounds result-page scrolling per query.

Lower values reduce request time and cost.

Use a higher value only when you need more results.

### Output: identity and deduplication

The actor deduplicates public results by `videoId` and clean `url`.

Tracking both prevents duplicate cards from entering your dataset.

Use `videoId` as a stable key in downstream systems.

Use `url` for human review and linking.

### Output: visible metadata

Facebook may omit or vary fields by video, region, or UI experiment.

Unavailable public fields are returned as `null`.

Engagement values are preserved as visible text instead of guessed numbers.

This prevents accidental conversion of abbreviated UI values.

### Social listening workflow

- Search a campaign keyword every day.
- Store the dataset in your warehouse.
- Deduplicate on `videoId`.
- Compare new IDs against the prior run.
- Alert your team about newly discovered videos.

### Creator research workflow

- Search a niche or competitor topic.
- Sort public results as needed.
- Review creator labels and thumbnails.
- Group titles by hook or content pattern.
- Build a shortlist for manual analysis.

### Campaign discovery workflow

Search brand names, slogans, and campaign phrases.

Retain the original `query` for attribution.

Use the public URL to open the video for a human review.

Do not use this actor to access non-public content.

### Integrations

Send results to Google Sheets for a lightweight tracker.

Use Make, Zapier, or webhooks to notify analysts about new IDs.

Call the actor API from a data pipeline for daily snapshots.

Connect the dataset to an LLM only after applying your own review rules.

### API usage: Node.js

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/facebook-video-search-scraper').call({
  searchQueries: ['marketing'], maxItems: 10
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
````

### API usage: Python

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("automation-lab/facebook-video-search-scraper").call(run_input={
    "searchQueries": ["marketing"], "maxItems": 10
})
print(list(client.dataset(run["defaultDatasetId"]).iterate_items()))
```

### API usage: cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~facebook-video-search-scraper/runs?token=$APIFY_TOKEN" \
  -H 'content-type: application/json' \
  -d '{"searchQueries":["marketing"],"maxItems":10}'
```

### MCP

Use the scoped Apify MCP HTTP endpoint so your assistant exposes this actor's tools:

`https://mcp.apify.com?tools=automation-lab/facebook-video-search-scraper`

#### Claude Code

```bash
claude mcp add --transport http apify-facebook-videos \
  "https://mcp.apify.com?tools=automation-lab/facebook-video-search-scraper"
```

#### Claude Desktop, Cursor, or VS Code

Add this HTTP server to your MCP configuration, then restart or reload your client:

```json
{
  "mcpServers": {
    "apify-facebook-videos": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=automation-lab/facebook-video-search-scraper"
    }
  }
}
```

Example prompts: “Find 25 public Facebook videos about sustainable fashion.” and “Create a deduplicated public Facebook marketing-video dataset.”

### Reliability notes

Facebook controls the public UI and may change selectors or available fields.

The actor uses a browser session and conservative collection limits.

A result page with no visible public rows completes with no output.

It never attempts to defeat a login, checkpoint, or CAPTCHA.

### Legality and responsible use

Only collect public information you are entitled to access.

Respect Facebook terms, applicable laws, and your internal privacy policy.

Do not use output to identify, profile, or contact individuals unlawfully.

Do not use this actor for private or authenticated content.

### Troubleshooting

#### Why are some fields null?

Facebook does not show every metadata field on every public result card.

The actor returns null rather than fabricate a value.

#### Why did I get fewer results than requested?

Public search availability varies by keyword, region, and Facebook UI changes.

Try a more specific keyword or lower the requested number.

#### Why did a run return zero rows?

Facebook may not expose anonymous results for that query at that time.

The actor does not log in or bypass access controls.

### FAQ

#### Does it need a Facebook account?

No. It is designed for anonymous public Watch/Reel search pages.

#### Can I scrape private groups or private profiles?

No. This actor intentionally excludes private and authenticated content.

#### Are engagement numbers guaranteed?

No. They are included only when Facebook visibly renders them.

### Related scrapers

For public Facebook advertising workflows, see related tools at [Automation Lab](https://apify.com/automation-lab/).

For other social research tasks, browse [Automation Lab actors](https://apify.com/automation-lab/).

Choose a source-specific actor when your workflow needs a different public surface.

### Pricing: How much does it cost to scrape Facebook videos?

This actor uses pay-per-event pricing.

Each run has a small start charge and each saved public video is charged separately.

Tier discounts are applied by Apify account tier.

Review the live Apify pricing panel before running large collections.

### Data retention

Your output is stored in the Apify dataset for the retention period of your plan.

Export or integrate records if you need longer-term history.

Use `scrapedAt` to distinguish repeated monitoring runs.

### Support

Include the input, run ID, and a short description when reporting an issue.

Do not share credentials because this actor does not use them.

A sample output row helps diagnose public UI changes.

### Changelog

See [the actor changelog](.actor/CHANGELOG.md) for user-visible release notes.

# Actor input Schema

## `searchQueries` (type: `array`):

One or more public Facebook video topics to discover.

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

Total deduplicated video records to save across all keywords.

## `sortBy` (type: `string`):

Use Facebook's available public ordering when supported.

## `maxScrolls` (type: `integer`):

Advanced: bounds pagination attempts per keyword. Leave low for inexpensive runs.

## Actor input object example

```json
{
  "searchQueries": [
    "marketing"
  ],
  "maxItems": 10,
  "sortBy": "TOP",
  "maxScrolls": 8
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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 = {
    "searchQueries": [
        "marketing"
    ],
    "maxItems": 10,
    "sortBy": "TOP",
    "maxScrolls": 8
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/facebook-video-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 = {
    "searchQueries": ["marketing"],
    "maxItems": 10,
    "sortBy": "TOP",
    "maxScrolls": 8,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/facebook-video-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 '{
  "searchQueries": [
    "marketing"
  ],
  "maxItems": 10,
  "sortBy": "TOP",
  "maxScrolls": 8
}' |
apify call automation-lab/facebook-video-search-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Video Search Scraper",
        "description": "Find public Facebook Watch and Reel videos by keyword, with clean deduplicated records for social listening and creator research.",
        "version": "0.1",
        "x-build-id": "Eu3PPeFGXWkPinJXM"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~facebook-video-search-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-facebook-video-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/automation-lab~facebook-video-search-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-facebook-video-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/automation-lab~facebook-video-search-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-facebook-video-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": [
                    "searchQueries"
                ],
                "properties": {
                    "searchQueries": {
                        "title": "🔎 Video search keywords",
                        "minItems": 1,
                        "type": "array",
                        "description": "One or more public Facebook video topics to discover.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Maximum videos",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Total deduplicated video records to save across all keywords.",
                        "default": 10
                    },
                    "sortBy": {
                        "title": "Sort public results",
                        "enum": [
                            "TOP",
                            "RECENT"
                        ],
                        "type": "string",
                        "description": "Use Facebook's available public ordering when supported.",
                        "default": "TOP"
                    },
                    "maxScrolls": {
                        "title": "Maximum result-page scrolls",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Advanced: bounds pagination attempts per keyword. Leave low for inexpensive runs.",
                        "default": 8
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
