
Facebook Search Scraper | Fast & Reliable | $8 / Mo
Pricing
$7.99/month + usage

Facebook Search Scraper | Fast & Reliable | $8 / Mo
Under maintenanceMost affordable, enterprise-grade Facebook Search scraper. Extracts full post data from any search query. It finds relevant public posts across all of Facebook. Ideal for market research, trend analysis, and monitoring public sentiment.
0.0 (0)
Pricing
$7.99/month + usage
1
1
1
Last modified
a day ago
🔎 Facebook Search Scraper
❓ About Facebook
Facebook is a global social networking platform that allows users to connect with others, share content like photos and videos, and engage with pages representing brands, celebrities, and organizations.
❓ About This Actor
The Facebook Search Scraper automates the process of finding posts across Facebook based on your keywords or search queries. Provide a list of search terms, and the actor will use Facebook's internal search API to find matching posts.
It is designed to extract key data for each post, including the post URL, text content, author information, publication date, and engagement metrics (reactions, comments, shares). This tool is perfect for brand monitoring, trend analysis, academic research, and market intelligence.
⚠️ Why Login Cookies Are Required
Facebook has completely disabled "guest" (logged-out) search functionality on both its desktop and mobile websites. Our extensive testing has confirmed that any attempt to perform a search without being logged in will either fail, redirect to a login page, or interact with a non-functional "dummy" search bar.
To access Facebook's real search API and get results, the scraper must appear to be a logged-in user.
This actor achieves this by using your browser's session cookies. By providing them, you allow the scraper to make authenticated requests, ensuring it can access the search functionality and reliably extract data.
🍪 How to Get Your Cookies
To use this actor, you must provide your Facebook session cookies. The easiest method is with a browser extension. We strongly recommend using a dedicated "scraper" account for this, never your personal account.
Recommended Extension: Cookie Editor for Chrome or Firefox.
Step-by-Step Guide:
Install the Cookie Editor extension in your browser.
Open a new tab and log in to your Facebook account.
Once logged in, click the Cookie Editor icon in your browser's toolbar.
In the cookie list, click the "Export" button.
Choose "JSON" as the export format and click "Copy to Clipboard".
Paste the copied JSON text into the "Facebook Cookies" input field for this actor.
📥 Input Parameters
The actor requires the following input to run:
Parameter Type Required Description queries string[] ✅ Yes An array of one or more search terms or keywords to look for. maxPosts number ❌ No The maximum number of posts to scrape for each query. Defaults to 50. cookies string ✅ Yes Your Facebook account's cookies, exported as a JSON array. See the tutorial above to get them. Example Input
JSON { "queries": [ "açaí bowl", "Tesla Model Y" ], "maxPosts": 100, "cookies": "[{"domain":".facebook.com","expirationDate":1789456789,"hostOnly":false,"httpOnly":true,"key":"sb","name":"sb","path":"/","sameSite":"no_restriction","secure":true,"session":false,"storeId":null,"value":"..."}, ... ]" } 📤 Output Data
The actor stores its results in the dataset. Each item in the dataset is a JSON object representing a single scraped post that matched a search query.
Example Output
JSON [{ "post_id": "1891857264894411", "permalink": "https://www.facebook.com/someuser/posts/pfbid02gAfuzjGqHuAk9APdU6mD...", "text": "Just had the best açaí bowl in Bangkok! Highly recommend this place.", "timestamp": 1754381347, "author_id": "100022104669475", "author_name": "Jane Doe", "reactions": { "count": 58 } }] 🛠 A Critical Note on doc_id and variables
This actor works by mimicking the requests made by your browser to Facebook's private, internal GraphQL API. This API is not officially documented and changes frequently without warning.
The scraper's ability to run depends on two key pieces of information found in the code (src/main.ts):
doc_id: An ID that represents the specific search query on Facebook's servers.
variables: The structure of the data sent with the query.
If this actor stops working and you see an error in the log like document not found or you get zero results, it means Facebook has changed these values. You must find a new doc_id and variables structure by logging into Facebook, using your browser's Developer Tools, and inspecting the "Payload" of the graphql requests made when you perform a search.
❓ Support
If you encounter any issues or have suggestions for improvement, please feel free to raise an issue on the project's Apify page.
Happy Scraping! Fatih
Share Actor: