Facebook Search Posts
Pricing
Pay per usage
Facebook Search Posts
Search recent Facebook posts using configurable keywords, location UID, and time range. Returns clean, deduplicated post records with timestamps, contact details, source links, lead scoring, and optional screenshots.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Z Sedillo
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
2
Monthly active users
3 days ago
Last modified
Categories
Share
Facebook Lead Discovery Enhanced
This is an original, self-contained Facebook browser crawler. It does not call another Apify Actor and does not use RapidAPI or any third-party search API.
The Actor launches Playwright Chromium, opens Facebook search pages directly, applies Facebook's current location + recent_posts filter combination, scrolls rendered results, extracts post data from the DOM, and saves real post-element screenshots. The requested rolling time window is then enforced exactly in code.
Input
{"searchKeyword": "opening soon, we are moving, relocating, new premises","timeFrame": "24hrs","resultMode": "allSearchMatches","locationUID": "112483542097587","maxPosts": 25,"screenshot": true,"maxScrolls": 20,"facebookCookies": [],"proxyConfiguration": {"useApifyProxy": false}}
112483542097587 is the Facebook location UID used for the United Kingdom. Every accepted result is checked again against the exact rolling cutoff. Available windows are 1, 2, 6, 12, and 24 hours, plus 7 and 30 days.
maxPosts is a ceiling, not a guaranteed result count. The Actor exhausts the available rendered Facebook results up to maxScrolls and saves distinct posts with trustworthy timestamps inside the selected window.
resultMode: "allSearchMatches" maximizes output by retaining every in-range Facebook search result. Each row includes qualifiedLead and leadScore, so stronger opportunities can still be prioritized. Use "qualifiedLeads" to restore the stricter behavior that discards posts without an opening/moving lead signal.
The Actor requires 4 GB of run memory. Facebook's browser renderer can exceed 2 GB during deep result scrolling even when processed DOM rows are pruned; the Actor definition enforces the required allocation to prevent renderer crashes.
Facebook access
Facebook frequently restricts post search to signed-in users. The Actor first attempts public access. If Facebook presents a login wall, provide your own session cookies through facebookCookies. These are applied only inside the run's private browser context.
Cookie example:
[{"name": "c_user","value": "YOUR_VALUE","domain": ".facebook.com","path": "/","secure": true,"httpOnly": true,"sameSite": "None"},{"name": "xs","value": "YOUR_VALUE","domain": ".facebook.com","path": "/","secure": true,"httpOnly": true,"sameSite": "None"}]
Enable an Apify proxy if Facebook blocks the cloud browser IP. Proxies and cookies are access configuration only—the lead data still comes directly from the rendered Facebook page.
Output
Each accepted dataset row contains:
- Facebook page URL, page ID/name, and nullable metadata not exposed in search results
- Post ID, URL, type, raw timestamp, and normalized ISO timestamp
- Post text and external links
- Automatic contact extraction on every saved post from the expanded message, full rendered post card, link labels,
tel:links, map links, UK phone formats, and probable UK addresses - Automatic second-stage enrichment from each post author's Facebook profile About/contact page using the same signed-in browser session and proxy; repeated profiles are cached
- Easy primary contact fields (
phoneNumber,address, andcontactDetailsFound) plus the completedetected_phone_numbersanddetected_addressesarrays
Every saved row contains these contact fields plus contactSources, profileContactUrl, and contactEnrichmentStatus. phoneNumber and address remain null, and their arrays remain empty, only when neither the post nor its public Facebook profile publishes that detail; the Actor never invents missing contact information. Set enrichProfileContacts to false only when faster runs are more important than profile-level enrichment.
- Matched keyword, detected opening/moving signals, score, and exact age
- Optional real PNG screenshot URL
- Cookie application status
The OUTPUT key-value-store record explicitly reports externalActorCalls: 0 and thirdPartyApiCalls: 0.
Each search also reports extraction-gate metrics (rendered articles, post URLs, timestamps, timeframe, relevance, duplicates, and saved leads). A zero-result run stores a ZERO_RESULTS_*.png diagnostic screenshot instead of silently returning an unexplained empty dataset.
The summary includes requestedMaxPosts, limitReached, and completionReason, making it clear whether the requested ceiling was reached or Facebook's qualifying results were exhausted first.
Run locally
Prerequisites: Node.js 22+, Apify CLI, and a locally installed Chromium browser compatible with Playwright.
npm installnpm testapify run
Deploy
apify loginapify push