# Facebook Post Search Scraper - Posts by Keyword, No Login (`headply/facebook-post-search-scraper`) Actor

Search public Facebook posts by keyword: text, author, time, reactions, comments, shares and media. Top or most recent posts. Track brand mentions on a schedule and get only new posts. No login, no cookies.

- **URL**: https://apify.com/headply/facebook-post-search-scraper.md
- **Developed by:** [Mayowa Ogedengbe](https://apify.com/headply) (community)
- **Categories:** Social media
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.75 / 1,000 post scrapeds

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 Post Search Scraper - Posts by Keyword, No Login

Search **public Facebook posts by keyword** and export each one: text, author, time, reactions, comments, shares,
photos and video links. Get Facebook's **top posts** or the **most recent posts**, and put it on a schedule to receive
**only new posts** for your brand, product or topic.

### Why people use it

- ✅ **No Facebook account, no login, no cookies.**
- 🔎 **Keyword search across public posts** from pages, public groups and profiles, several keywords per run.
- 🆕 **Top or Recent.** Facebook's ranking, or the newest posts first (the last day or two for busy keywords).
- 🔔 **Brand-mention alerts.** On a schedule it returns only posts you haven't received yet, at a lower price.
- 💸 **From $1.75 per 1,000 posts.**

### Quick start

1. Add words or phrases to **Keywords**, for example `electric cars`, your brand name or a hashtag.
2. Pick **Sort**: *Top posts* or *Recent posts*.
3. Set **Max posts per keyword** (e.g. 50).
4. Press **Start**.

You can also paste a Facebook post search link (`https://www.facebook.com/search/posts/?q=…`).

### What you get for each post

| Field | Example |
|---|---|
| `text` | "EVs had the most to gain from the gas cars' continued decline, with some experts estimating that electric cars will dominate by 2030." |
| `authorName`, `authorUrl` | `InsideEVs`, `https://www.facebook.com/InsideeVs` |
| `createdAt` | `2026-10-06T19:07:17.000Z` |
| `reactionCount`, `commentCount`, `shareCount` | `1137`, `659`, `113` |
| `postType` | `photo` (also `text`, `link`, `video`, `reel`) |
| `media` | photo and video links of the post |
| `url` | `https://www.facebook.com/InsideeVs/posts/pfbid02QXzi3d…` |
| `source` | `{ "kind": "post-search", "target": "electric cars" }` |

In a test of 478 posts across 5 keywords, text, author, time, link, reactions, comments and shares were filled for
every post. Download as JSON, CSV, Excel or HTML, or browse the **Posts, reels & videos** table.

### Pricing

Prices drop on higher Apify plans.

| What | Price per 1,000 (Free plan → Gold and above) |
|---|---|
| Post | **$2.50** → $1.75 |
| New post since your last run (tracking) | $1.00 → $0.70 |
| Each keyword checked on a repeat tracking run | $0.002 per check |
| Each run | $0.001 |

1,000 posts ≈ **$2.50**. Tracking 5 keywords daily with ~20 new posts per keyword a day ≈ **$3.00 a month for new
posts plus $0.30 for checks and $0.03 for runs**.

### Track brand mentions

Add your keywords, choose **Recent posts**, switch on **Only new since last run**, then **Schedule** the task (hourly
or daily). Send new posts to Slack, Google Sheets or a dashboard with n8n, Make or Zapier (Apify node → *Run an Actor
and get dataset*). The *API* tab has code examples, for example:

```bash
curl -X POST "https://api.apify.com/v2/acts/headply~facebook-post-search-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "content-type: application/json" \
  -d '{"searchQueries":["electric cars"],"searchSort":"recent","maxItemsPerTarget":50}'
```

### Good to know

- Facebook shows a **limited number of posts per search**, usually 20 to 100 per keyword. Use more specific keywords
  or *Recent posts* on a schedule to keep collecting new ones over time.
- Only **public** posts appear. Posts from private groups and friends-only posts are never included.
- *Top posts* follows Facebook's relevance ranking and can include older posts; *Recent posts* is newest first.
- Facebook rounds some very large totals for logged-out visitors, so a post with more than 10,000 reactions can show
  exactly `10000`. Photo and video links expire after some hours.

### More Facebook tools

- [Facebook Video Search Scraper](https://apify.com/headply/facebook-video-search-scraper): videos and reels by keyword.
- [Facebook Posts Scraper](https://apify.com/headply/facebook-posts-scraper): the full history of a page.
- [Facebook Groups Scraper](https://apify.com/headply/facebook-groups-scraper): posts from public groups.
- [Facebook Reels Scraper](https://apify.com/headply/facebook-reels-scraper): all reels of a page.
- [Facebook Marketplace Scraper](https://apify.com/headply/facebook-marketplace-scraper): listings and prices.

Something not working as expected? Open the **Issues** tab and we'll take a look.

# Actor input Schema

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

One post search per line: a brand, product, topic, name or hashtag. Each keyword is searched across public Facebook posts.

## `searchSort` (type: `string`):

"Top posts" returns what Facebook ranks highest for the keyword. "Recent posts" returns the newest posts and is the best choice for schedules and brand-mention alerts.

## `maxItemsPerTarget` (type: `integer`):

Upper bound for each keyword. Facebook itself shows a limited number of posts per search (usually 20-100), so a keyword may return fewer; use "Recent posts" on a schedule to keep collecting new ones.

## `contentType` (type: `string`):

Filter page and group posts by type. Filtered-out posts are never charged. ("Page reels" mode always keeps reels only.)

## `onlyNewSinceLastRun` (type: `boolean`):

For schedules. Returns and bills only items not delivered by an earlier run with the same monitor name. The first run delivers the latest items at the standard price; later runs return only new items, at the lower new-item price. For Marketplace, "new" means listed after the previous run. Repeat runs also bill a small fee per page, group or search checked, because the check costs the same whether or not anything is new.

## `monitorName` (type: `string`):

Label for this schedule's memory. Runs with the same name share memory; use one name per schedule or client. Change it to start fresh.

## `startUrls` (type: `array`):

Any mix of Facebook links, one per line: pages (https://www.facebook.com/nasa), public groups (https://www.facebook.com/groups/ReactJSDevelopers), Marketplace searches (https://www.facebook.com/marketplace/nyc/search?query=bike\&maxPrice=300) and video searches (https://www.facebook.com/search/videos/?q=spacex). Each link is detected and scraped the right way.

## `pages` (type: `array`):

Page or public profile names or links: nasa, @nasa, https://www.facebook.com/nasa or profile.php?id=… links. Returns the newest posts first.

## `groups` (type: `array`):

Public group names, ids or links (ReactJSDevelopers or https://www.facebook.com/groups/ReactJSDevelopers). Private groups cannot be read without login and return nothing.

## `mode` (type: `string`):

Decides how keywords are used and what an empty run returns. "Post search" (this Actor's default) turns keywords into post searches; "Marketplace listings" turns them into Marketplace searches; the other modes turn them into video & reel searches. Links in "Facebook URLs" are always recognized automatically.

## `enrichReels` (type: `boolean`):

Open each reel to add its duration, a direct video file URL and the comment count when the feed lacks them. One extra request per reel; no extra charge.

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

City as it appears in Marketplace links: facebook.com/marketplace/<this>/… (e.g. nyc, la, chicago, london, sydney, or a numeric location id). Open Marketplace in a browser, pick the city, and copy that part of the link.

## `category` (type: `string`):

Optional. Browse a whole category instead of searching, e.g. vehicles, electronics, furniture, propertyrentals. Used only when no keywords are given.

## `minPrice` (type: `integer`):

Marketplace only. Lowest price, in the location's currency.

## `maxPrice` (type: `integer`):

Marketplace only. Highest price, in the location's currency.

## `daysSinceListed` (type: `string`):

Marketplace only. Keep listings posted within this window.

## `itemCondition` (type: `string`):

Marketplace only.

## `maxConcurrency` (type: `integer`):

Pages, groups and searches processed in parallel.

## `maxRequestRetries` (type: `integer`):

A target that fails is retried on a fresh connection up to this many times; items already delivered are never repeated or re-charged.

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

Leave as is. Facebook only serves public pages, groups and Marketplace in full to residential addresses, so that is the default.

## Actor input object example

```json
{
  "searchQueries": [
    "electric cars"
  ],
  "searchSort": "top",
  "maxItemsPerTarget": 20,
  "contentType": "all",
  "onlyNewSinceLastRun": false,
  "monitorName": "default",
  "mode": "postSearch",
  "enrichReels": false,
  "location": "nyc",
  "daysSinceListed": "any",
  "itemCondition": "any",
  "maxConcurrency": 5,
  "maxRequestRetries": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with every post, reel, video and listing from this run.

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

Counts per page, group or search, skipped inputs, items skipped as already delivered, request success ratio and bandwidth.

# 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": [
        "electric cars"
    ],
    "maxItemsPerTarget": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("headply/facebook-post-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": ["electric cars"],
    "maxItemsPerTarget": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("headply/facebook-post-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 '{
  "searchQueries": [
    "electric cars"
  ],
  "maxItemsPerTarget": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call headply/facebook-post-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,headply/facebook-post-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/231AqeB72ZKedhroq/builds/Bv7kFZuHQdgy7Vmdz/openapi.json
