# Facebook Posts Search Scraper - Keyword Search, No Login (`neverempty/facebook-posts-search-scraper`) Actor

Search public Facebook posts by keyword without login or cookies: text, date, reactions, comment and share counts, author, images and links, one row per post. Several keywords per run, date ranges, top or recent posts first. Pay per post only.

- **URL**: https://apify.com/neverempty/facebook-posts-search-scraper.md
- **Developed by:** [NeverEmpty](https://apify.com/neverempty) (community)
- **Categories:** Social media, Marketing, News
- **Features:** Limited permissions
- **Stats:** 7 total users, 4 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.49 / 1,000 post returneds

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

Search public Facebook posts by keyword, phrase or hashtag, and get each post as a row with its text, date, reaction counts, comments and shares. Export to CSV, Excel or JSON, or call it through the Apify API to monitor brand mentions and topics on Facebook, with no login, no cookies and no Facebook account.

Each row also gives video views, the author, the group, images and links. Search several terms in one run, sort by top or latest, and set a date range at no extra charge. You pay only per post returned.

### What it does

- **Searches public posts by keyword.** Give it words, phrases or hashtags, including non-English text, such as `electric cars`, `#travel` or `ラーメン`. Each term is searched on its own.
- **Returns the numbers Facebook shows for a post.** Reactions with each reaction type, comments, shares and, for videos, views.
- **Sorts by top or latest.** `top` reads the posts Facebook ranks first for the term. `latest` prioritizes recent posts. The months are read from the newest one back.
- **Reads deeper, month by month.** After Facebook's own list, the search goes back month by month, which usually finds many more posts than one plain search. With a date range, only the months in it are read, and posts outside the range are not returned or charged.
- **Gives each post once.** A post found for two of your terms is returned once.
- **Charges only for posts that mention your term.** A post is returned when its text, author, group or co-authors contain the longest word of your term and at least half of its other words. Posts that do not mention it are left out and not charged.
- **Explains empty results in a free row.** If a term returns nothing or stops early, a free note row tells you why.

### What you can use it for

- Track what people post about your brand, product or competitors.
- Watch a topic or hashtag every day: set `startDate` and `endDate` both to `yesterday` and run it once a day.
- Collect public posts on a subject for market research, news monitoring, academic research and AI datasets.
- Find top-ranked posts on a topic in a given month, then sort them by reactions in your spreadsheet.

### How to use it

1. Add one or more terms under **Search terms**.
2. Choose **Sort by**, set **Posts per search term**, and add a date range if you want one.
3. Press **Start**, then export the results as CSV, Excel, JSON or through the API.

**Input options**

| Option | What it does |
|---|---|
| `searchTerms` | Words, phrases or hashtags, one per line. Up to 200 per run |
| `sortBy` | `top` or `latest`. Top posts is used when empty |
| `maxPostsPerTerm` | Most posts to return for each term, up to 2000. Facebook shows a limited number of posts per search, so a term can return fewer. If empty, 50 |
| `startDate` | Only posts from this date on: a date such as `2026-01-31` (YYYY-MM-DD, from midnight UTC), `today`, `yesterday`, or a period back from now such as `7 days` or `3 months` |
| `endDate` | Only posts up to this date: a date such as `2026-03-31` (that whole day is included), `today`, `yesterday`, or a period back from now such as `1 year` |

Dates and periods are whole UTC days: a period is rounded to the start of its day, so `7 days` starts at midnight UTC seven days ago.

Example input:

```json
{
  "searchTerms": ["electric cars", "#travel"],
  "sortBy": "top",
  "maxPostsPerTerm": 100,
  "startDate": "2026-01-01",
  "endDate": "2026-06-30"
}
```

### What you get

```json
{
  "dataType": "post",
  "searchTerm": "electric cars",
  "postId": "1234567890",
  "url": "https://www.facebook.com/example/posts/1234567890",
  "time": "2026-10-30T14:05:00.000Z",
  "timestamp": 1793369100,
  "text": "Example post text",
  "likes": 1520,
  "reactions": [{ "type": "Like", "count": 1204 }, { "type": "Love", "count": 280 }],
  "comments": 64,
  "shares": 31,
  "videoViews": null,
  "isVideo": false,
  "thumbnail": "https://example.com/image.jpg",
  "link": "https://example.org/article",
  "media": [{ "type": "photo", "id": "111", "url": "https://example.com/image.jpg", "width": 1080, "height": 1080, "videoUrl": null }],
  "sharedPostUrl": null,
  "authorName": "Example Page",
  "authorUrl": "https://www.facebook.com/example",
  "coAuthors": null,
  "groupName": null,
  "groupUrl": null
}
```

`likes` is the total of all reactions. A value Facebook does not show is `null`, never a guess. `groupName` and `groupUrl` are filled when the post was written in a public group. Image and video addresses are temporary links from Facebook and stop working after some days, so download what you want to keep.

Rows with `"dataType": "note"` are free. They appear when a term has no results, reached your limit, repeated an earlier term, was empty, could not be read, or ended early, and when Facebook answered a term only with posts that do not mention it. Each carries a `reason`, the `input` it is about and a `message` that says what happened.

### What does it cost?

You pay per post returned. There is no start fee, and date filters, sorting and the free note rows cost nothing.

| Apify plan | Per 1,000 posts |
|---|---|
| Free | $2.49 |
| Bronze | $2.19 |
| Silver | $1.89 |
| Gold and above | $1.49 |

You pay only the per-post price above. There is no start fee. Set a maximum total charge on the run, and the Actor stops there and says so in the last row.

### Frequently asked questions

**How do I search Facebook posts by keyword without logging in?**
Type your words under **Search terms** and press **Start**. No account or cookies are needed.

**How many posts do I get for one search term?**
Facebook shows a limited number of posts for one search, so the count depends on how much is posted about the term. The Actor reads Facebook's own list and then goes back month by month. In our tests a busy term gave about 60 to 140 posts for each month, and a quiet term can give only a few.

**How do I get only new posts about a topic every day?**
Set `startDate` and `endDate` both to `yesterday` and schedule the Actor once a day, after midnight UTC. Each run searches one full UTC day, so runs do not overlap and the same day is not charged twice. Facebook may show only part of the posts of a very busy day. Posts outside the range are not returned or charged.

**Can I search hashtags or non-English words?**
Yes. Hashtags such as `#travel` and text in Japanese or Spanish work the same way as English words.

**Which posts count as mentioning my term?**
A post counts when its text, author name, group name or co-authors contain the longest word of your term and at least half of the other words, each at the start of a word, so `review` does not match inside `preview`. A word of 6 letters or more also matches without its last 2 letters, so `recipes` finds `recipe`. Small words such as `the`, `in` or `how` are not needed, and the words written together count too: `#dogtraining` counts for `dog training`. Japanese, Chinese, Korean and Thai words are found anywhere in the text. The post's link is not read.

**Can I search posts from a past month?**
Yes. Set `startDate` and `endDate`, for example `2025-03-01` and `2025-03-31`.

**Does it give comment text?**
It gives the number of comments for each post, not the comments themselves.

**Can I use it from my own code or an AI agent?**
Yes. Start it through the Apify API or the Apify MCP server, and read the rows as JSON.

### Good to know

- **Personal data is your responsibility.** Posts can name or show people. Emails and phone numbers in post text are masked, `wa.me`, `mailto:` and `tel:` links are left empty, and profile addresses that carry a personal number are left out, but names and other details stay. The usual Facebook rules and privacy laws such as GDPR apply to how you use the data.
- The Actor returns what Facebook shows a visitor who is not logged in. Posts shared only with friends or in private groups are not part of the search.
- Search results depend on Facebook's own ranking, so the same term can give a somewhat different set of posts on another day.
- Facebook sometimes refuses a request. The Actor tries again, and a term it could not read gets a free `unreadable` or `incomplete` row. If most requests are refused, the run stops and the last row lists the terms not finished.
- A term ends after three months in a row gave no new post, and a free row says so.
- If 25 search terms in a row return no post, the run stops to save cost, and a free row lists the terms not searched.
- If a run reaches its time limit or maximum charge, the last row lists the terms not finished (`notFinishedTerms`). To continue, resurrect (restart) the same run from the Apify Console; posts it already returned are not charged again. A new run starts over and charges for every post it returns.

### Thanks for using this Actor

We build these tools for people who run them every day, and we improve them from what users tell us.

- **Missing a field, or need another filter?** Tell us in the **Issues** tab. If the data is there, we add it.
- **Found a bug or a wrong value?** Post the run ID in the **Issues** tab. Wrong data is the thing we fix first.

If this Actor saved you time, a short review helps other people find it.

# Actor input Schema

## `searchTerms` (type: `array`):

Words, phrases or hashtags to search public Facebook posts for, one per line, for example electric cars, #travel or ラーメン. Each term is searched on its own. Up to 200 terms per run.

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

"top" reads the posts Facebook ranks first for the term. "latest" prioritizes recent posts. The months are read from the newest one back. Top posts is used when empty.

## `maxPostsPerTerm` (type: `integer`):

The most posts to return for each search term, up to 2000. Facebook shows a limited number of posts per search, so a term can return fewer; after Facebook's own list the search goes back month by month, which usually goes deeper. The form starts at 20 to keep a first test small; if the field is left empty, 50 is used.

## `startDate` (type: `string`):

Keep posts from this date on. Use a date like 2026-01-31 (YYYY-MM-DD, read as midnight UTC), today, yesterday, or a period back from now such as "7 days" or "3 months". Periods are rounded to whole UTC days. Posts left out are not charged. Leave empty for no start limit.

## `endDate` (type: `string`):

Keep posts up to this date. Use a date like 2026-03-31 (YYYY-MM-DD, that whole day is included), today, yesterday, or a period back from now such as "1 year" (posts up to one year ago). For a daily run, set both dates to yesterday. Posts left out are not charged. Leave empty for no end limit.

## Actor input object example

```json
{
  "searchTerms": [
    "electric cars"
  ],
  "maxPostsPerTerm": 20
}
```

# Actor output Schema

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

One row per public Facebook post found for your search terms: text, date, reactions, comment and share counts, author, images and links. Rows with dataType "note" are free and say why something was not returned.

# 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 = {
    "searchTerms": [
        "electric cars"
    ],
    "maxPostsPerTerm": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("neverempty/facebook-posts-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 = {
    "searchTerms": ["electric cars"],
    "maxPostsPerTerm": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("neverempty/facebook-posts-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 '{
  "searchTerms": [
    "electric cars"
  ],
  "maxPostsPerTerm": 20
}' |
apify call neverempty/facebook-posts-search-scraper --silent --output-dataset

```

## MCP server setup

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