facebook-posts-search
Pricing
from $8.00 / 1,000 results
facebook-posts-search
Search Facebook posts by keyword with recent-posts, location and date-range filters. Drop-in replacement for powerai/facebook-post-search-scraper (identical input and output schema).
Pricing
from $8.00 / 1,000 results
Rating
5.0
(1)
Developer
code craker
Maintained by CommunityActor stats
0
Bookmarked
4
Total users
3
Monthly active users
2 days ago
Last modified
Categories
Share
Facebook Posts Search Scraper
Search Facebook posts by keyword and export them as clean, structured data โ no code required.
Give it one or more keywords and the scraper returns matching public posts with their text, author, reaction breakdown, comment and share counts, media, links, timestamps and more. Filter by recent posts, location or a date range, and pull up to 5,000 results per keyword with automatic pagination.
Features
- ๐ Keyword search โ find posts by any word or phrase; wrap a phrase in quotes for an exact match.
- ๐งต Multiple keywords per run โ pass a whole list; results are combined and de-duplicated automatically.
- ๐ Recent-posts filter โ restrict to the freshest posts only.
- ๐ Location filter โ narrow results to a specific location.
- ๐ Date range โ limit posts to a start/end date.
- ๐ Auto-pagination โ keeps loading until it reaches your result target or the feed runs out.
- ๐ฆ Structured output โ every post is a tidy JSON record, ready for Excel, Google Sheets, a database or your own code.
Input
| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes* | A single keyword or phrase. Wrap in "double quotes" for an exact-phrase match. You can also paste several keywords, one per line. |
queries | array | Yes* | A list of keywords/phrases. Each is searched separately and the results are merged and de-duplicated. maxResults applies per keyword. |
recent_posts | boolean | No | Only return recent posts. |
location_uid | string | No | Location identifier to filter posts by. |
start_date | string | No | Earliest post date to include (YYYY-MM-DD). |
end_date | string | No | Latest post date to include (YYYY-MM-DD). |
maxResults | integer | No | Number of posts to fetch per keyword (default 10, max 5000). |
cookies | array | No | Facebook session cookies (JSON). See Authentication below. |
fbEmail | string | No | Facebook account email/phone for automated login. See Authentication. |
fbPassword | string | No | Password for that account (stored encrypted). |
proxyConfiguration | object | No | Proxy settings. Residential proxies are strongly recommended (default: Apify Proxy). |
* Provide either query or queries (or both โ they're merged). At least one keyword is required.
Example โ single keyword
{"query": "\"climate change\"","maxResults": 100,"recent_posts": true}
Example โ multiple keywords
{"queries": ["climate change", "renewable energy", "\"solar power\""],"maxResults": 50,"recent_posts": true}
Output
Each result is one post, saved to the dataset:
{"post_id": "971562908763987","type": "post","url": "https://www.facebook.com/businessinsiderssa/posts/pfbid02cuDx...","message": "Full post text...","message_rich": "Full post text...","timestamp": 1775211321,"comments_count": 152,"reactions_count": 1564,"reshare_count": 69,"reactions": { "like": 1499, "love": 57, "care": 6, "haha": 1, "wow": 1, "sad": 0, "angry": 0 },"author": {"id": "100077308612555","name": "Business Insider Africa","url": "https://www.facebook.com/businessinsiderssa","profile_picture_url": "https://scontent.xx.fbcdn.net/..."},"image": { "uri": "https://scontent.xx.fbcdn.net/...", "height": 1350, "width": 1080, "id": "971562895430655" },"video": null,"video_view_count": null,"video_thumbnail": null,"external_url": null,"attached_post": null,"attached_post_url": null,"associated_group": null,"searchQuery": "climate change","scrapedAt": "2026-07-03T14:06:01.794Z"}
Field reference
| Field | Description |
|---|---|
post_id | Facebook's unique ID for the post. |
url | Direct link to the post. |
message / message_rich | The post text. |
timestamp | Publish time, Unix seconds (UTC). |
reactions_count | Total reactions. |
reactions | Breakdown by type (like, love, care, haha, wow, sad, angry). |
comments_count / reshare_count | Comment and share totals. |
author | Poster's id, name, profile URL and picture. |
image / video / video_thumbnail | Attached media, when present. |
external_url | Outbound link shared in the post, when present. |
attached_post / attached_post_url | The original post, when this is a share. |
associated_group | The group the post belongs to, when applicable. |
searchQuery | Which of your keywords surfaced this post. |
scrapedAt | When the record was collected (ISO 8601). |
You can export the dataset as JSON, CSV, Excel, HTML or RSS from the run's Storage tab, or fetch it via the Apify API.
Authentication (required)
Facebook does not allow searching posts without being logged in, so the scraper needs a Facebook session. Use a dedicated throwaway account, never your personal one. There are two ways to provide it:
Option A โ automated login (easiest)
Set your account credentials and let the scraper log in for you:
fbEmailandfbPasswordin the input, or (recommended) as theFB_EMAILandFB_PASSWORDenvironment variables on the actor.
The scraper logs in once, reuses the session on later runs, and re-authenticates automatically when it expires.
The account must have two-factor authentication turned off, and should be logged in once from a normal browser (in the same country as your proxy) before its first run, so Facebook doesn't flag it as suspicious.
Option B โ session cookies
Provide cookies from an already-logged-in session in the cookies input:
- Log into your throwaway account in a browser.
- Install the Cookie-Editor extension, open facebook.com, and Export โ JSON.
- Paste the exported array into the
cookiesfield. Make sure it includes thec_userandxscookies.
Proxy
Facebook blocks most datacenter IPs. Keep the proxy on Residential (the default) and, ideally, in the same country as your account for the most reliable results.
Tips & limitations
- Quotes matter.
"exact phrase"matches that phrase; unquoted multi-word keywords match more loosely. maxResultsis per keyword. Ten keywords atmaxResults: 50targets up to 500 posts (minus duplicates).- Only public posts that appear in Facebook search are returned; content from private profiles and closed groups is not accessible.
- Availability depends on Facebook. Facebook changes its site frequently and may throttle heavy activity; using recent, warmed-up accounts and residential proxies gives the most stable results.
Support
Found a bug or need a field added? Open an issue or email m83588864@gmail.com and we'll take a look.

