Facebook Search Scraper: Posts by Keyword & Hashtag
Pricing
from $3.60 / 1,000 public post saveds
Facebook Search Scraper: Posts by Keyword & Hashtag
Search Facebook posts by keyword, phrase or hashtag. Export text, author, date, reactions, comments, shares and media, with date and location filters.
Pricing
from $3.60 / 1,000 public post saveds
Rating
5.0
(1)
Developer
Fetch Cat
Maintained by CommunityActor stats
0
Bookmarked
390
Total users
141
Monthly active users
8.3 hours
Issues response
7 days ago
Last modified
Categories
Features
Share
Facebook Search Scraper finds public Facebook posts by keyword, phrase or hashtag and exports post text, authors, publication dates, reactions, comments, shares and media. Pick top or latest results, set a date range or narrow to a city or place ID. No Facebook account or cookies are required.
Search relevance can include the author and related context, so each row shows whether the query appears in the post text, the author's name, or neither.
Quick start
Enter a query and a small result limit, then run the Actor:
{ "query": "coffee shop", "resultsCount": 20, "searchType": "top" }
After the run, open the dataset and export JSON, CSV or Excel. JSON keeps nested authors, reactions and attachments together; in CSV you can pick the nested columns you need in Apify's export settings.
One run saves up to 200 new unique posts. For larger historical collections, use continuation memory to carry progress across batches. Facebook search is ranked and can end before showing every matching post, so it is not an exhaustive archive.
Prefer a video guide? This short Apify walkthrough shows you how to set up and run an Actor. It uses a different Actor, but the setup steps are the same.
What you get
- Original post IDs and Facebook permalinks.
- Post text, publication timestamps and public author details.
- Reaction totals and available reaction breakdowns, comment counts and share counts.
- Photo and video attachments, image URLs and available video URLs and durations.
- Public outbound links, source ranking and collection time.
- Optional, at no extra charge: up to 10 preview comments per post, video view counts, and the group and tagged place of a post when Facebook shows them.
Media-only posts can have no text. Missing counts stay null. A missing count is not represented as zero.
Who is it for?
- Brand researchers: review public posts mentioning a brand and check why each result matched.
- Campaign analysts: collect discussions within a chosen date window for your own review.
- Research teams: build a repeatable dataset of public posts with links back to their sources.
How you can use the data
Review public brand mentions
Keep the matching evidence with each post. Search for a brand or phrase, then review postText, matchEvidence and the source link together. Facebook can return results associated with an author's name or other context, so a search hit does not always mean the phrase appears in the post itself.
Study a topic over time
Collect a bounded set of posts for your research period. Apply a date window, export the posts and organize the returned dates in your own report. Facebook's recent-post selection is not a promise of strict chronological order. A location filter describes an association with a place, not proof of where an author lives.
Maintain a research sheet
Compare scheduled exports in your own workflow. Save each dataset and use postId to identify posts already in your sheet. Separate scheduled runs are independent collections, so your workflow handles comparisons between them. The Automation and integrations section below explains how to schedule those runs.
Input settings
Recent hashtag posts
{ "query": "#coffee", "resultsCount": 20, "searchType": "latest" }
Posts within a date range
{ "query": "bronco", "resultsCount": 20, "startDate": "2025-01-01", "endDate": "2025-01-31" }
Posts associated with a city
{ "query": "coffee", "resultsCount": 10, "location": "London, United Kingdom" }
An exact Facebook place ID
{ "query": "coffee", "resultsCount": 10, "location": "106078429431815" }
More input settings
| Field | Meaning |
|---|---|
query | Required keyword, phrase or hashtag, from 1 to 100 characters. |
resultsCount | Maximum new unique posts in this run, from 1 to 200. Default 20. |
searchType | top uses Facebook's relevance ranking. latest uses Facebook's recent-post filter. |
startDate, endDate | Optional inclusive publication dates, YYYY-MM-DD (UTC). |
location | Qualified city name, region name or numeric Facebook place ID. |
continuationStoreName | Optional memory name for a historical backfill across several runs. Needs both dates, at most 366 days apart. See continuation memory. |
excludePostIds | Optional public post IDs you already have, up to 50,000. They are skipped and not charged. Needs a continuation memory. |
includeComments | Optional, default off. Adds topComments: up to 10 comments Facebook shows under each post in search results, with commenter name and ID, text and time. These are preview comments, not every comment. No extra requests or charges; rows get larger. Commenter names and IDs are personal data shown publicly by Facebook; handle them lawfully. |
includeExtraFields | Optional, default off. Adds videoViewCount for video posts, and group and place when Facebook includes them. No extra requests or charges. With it off, rows and CSV columns stay as before. |
maxRunSeconds | Processing time for this run, from 30 to 600 seconds. Default 110. Reaching it ends the run successfully with the posts saved so far. |
Connection (proxyConfiguration) | Automatic by default (starts direct, then uses US residential proxy for the search). { "useApifyProxy": true } alone also means Automatic. Set { "useApifyProxy": false } to stay direct with no paid proxy. Explicit proxy groups and country are kept as chosen. Proxy use adds platform costs. |
Dates are sent to Facebook as a search filter and checked again on every returned post. Posts outside your dates are not saved or charged (they are counted in dateFilteredResults). For a reshare, the date of the share counts, not the date of the original post. Invalid dates, a reversed range and other invalid settings stop the run before any search or charge.
If Apify Proxy cannot connect through the country you chose, the run finishes with zero posts, no charge and a clear message (proxy_country_unavailable); pick another country or leave it empty. Facebook may block direct or explicitly chosen connections; that is reported as an error, never as an empty search.
Older integrations can still send keyword, results_limit and search_type: "posts". If one conflicts with the field above, the field above wins and the log shows a warning. Unknown fields, such as max_results or recent_posts, are ignored with a warning.
Run limits. If your max-cost limit is too small for one post or the platform timeout is too short, the run stops before searching and explains why. During a run, the Actor stops before going over your cost limit and keeps the saved posts. The default platform timeout is 150 seconds; at least 30 seconds (or 10% of a longer timeout) is kept for saving and shutdown, so allow at least 40 seconds for useful work.
Collect more posts with persistent continuation
One run saves at most 200 new posts. For a bigger historical collection, give the search a new, unique memory name and run it in batches. The memory remembers which posts were already delivered and where the search stopped, so each batch continues from there and saves and charges each post only once, as long as batches run one at a time. Later batches still use platform resources for pages that bring no new posts.
{"query": "your topic","searchType": "latest","startDate": "2026-07-01","endDate": "2026-07-31","resultsCount": 200,"maxRunSeconds": 540,"continuationStoreName": "my-topic-july-2026"}
- Start a new run. Set the platform timeout to at least
maxRunSecondsplus 30 seconds, or plus 10% for timeouts over 300 seconds (600 seconds for this example), and your usual max-cost limit; each batch keeps its own limits. - Export the dataset. In
RUN-SUMMARY,savedis the new posts in this batch andtotalUniquePostsis the collection so far. - When the run has finished, open CONTINUATION in its key-value store. If
pendingandreadyaretrue, start the next new run withnextInput. You can changeresultsCount,maxRunSecondsand the connection, and switchincludeComments(it applies from the next page on), but keep the query, ranking, dates, location and excluded IDs the same. - Keep every batch's dataset; each batch stores only its own new posts. The collection is done when
statusiscoverage_pass_finished.
How it searches. The first batches search your whole date range. After that the range is searched in smaller parts, newest first: one week at a time for ranges longer than 7 days (busy weeks are split into days), or day by day for shorter ranges. These smaller searches use Facebook's Top ranking even if you chose latest, because it follows the requested dates more closely. Smaller parts often reveal posts the full-range search did not show. coverage.windowResults reports what each part added. Memories started on older builds keep the plan they started with; keep continuing a memory on the same or a newer build.
Already have posts from earlier exports? Put their postId values in excludePostIds when you create the memory, and keep that list unchanged. They are skipped and do not count as new posts. A memory without them is an independent collection and can overlap your old exports.
Run one batch at a time per memory name. Don't run two batches on the same name, edit the memory or reuse the name for another search.
- A batch started while another one is still running stops at once with a clear message and changes nothing.
- If two batches start at almost the same moment, the one that loses the memory stops. If it had already saved posts, it ends successfully with
statusownership_lostand keeps them;concurrentBatchnames the run that holds the memory. If it had saved nothing, it fails with a message naming that run. Overlapping batches can return the same post twice. - If Apify stops a batch without warning (for example, when your account reaches its usage limit), the next batch can take over within about three minutes and continues from the saved position (
previousOwnerTakeoverinRUN-SUMMARY). - If a batch is interrupted while saving a post, that post is never charged twice; the next batch lists it in
unconfirmedDeliveryPostIdsso you can check it in the earlier dataset. - After a failed batch, a new run with the unchanged
nextInputkeeps all progress. Facebook may still reject the saved position; then the run fails instead of quietly starting over. Avoid automatic retry loops.
What a finished collection means. coverage_pass_finished means every planned search has ended. It is not proof that Facebook has no more matching posts: search results are ranked and depend on the session, and private posts are never included (coverage.completeness stays not_proven). Each batch starts a new anonymous session; no cookies or credentials are stored.
Memory limits. A memory holds up to 50,000 delivered and excluded post IDs; after that the collection stays pending. Each batch's cost limit applies to that batch only, not to the whole collection.
Output data
This shortened example shows fields from an observed public result:
{"postId": "122328142718011695","publishedAt": "2026-08-24T18:50:56Z","postText": "Monday called… and said you need a Moody Cat pick-me-up. 🐱☕️💗","author": {"id": "61550350854900","name": "Moody Cat Coffee Shop"},"reactionsCount": 53,"commentsCount": 7,"sharesCount": 5,"searchQuery": "coffee shop"}
Counts and availability can change after collection. The full dataset also includes the post permalink, timestamps, media, ranking and match evidence.
More output fields
| Field | Description |
|---|---|
postId, url | Stable source post identifier and permalink. |
postText | Source text. Null for posts without available text. |
timestamp, publishedAt | Publication time as milliseconds since Unix epoch and UTC ISO date-time. |
author | Public ID, name, profile URL, profile picture and raw source entity type. The entity type is not an inferred account category. |
reactionsCount, reactions | Total reactions and the available named reaction counts. A breakdown may not include every reaction type. |
commentsCount, sharesCount | Available engagement totals. Null if the source omits them. |
videoViewCount | Only with includeExtraFields: views of a video post as Facebook shows them. Null for posts without video. |
group, place | Only with includeExtraFields: the group the post was published in and the place tagged on it (id, name, url), when the search result includes them. Facebook often omits the name. Null otherwise; most posts have neither. |
topComments | Only with includeComments: up to 10 preview comments (commentId, url, text, publishedAt, author with id and name, isReply), in Facebook's order. url is set for top-level comments only. An empty list when Facebook shows none. |
attachments | Media ID, type, permalink and available image URL, dimensions, caption, video URL and duration. |
attachments[].enrichmentStatus | For video detail lookup: complete or unavailable. Base post data remains available if optional media details cannot be retrieved. |
externalUrls | Deduplicated public links from the post and its attachments. |
privacy | Source visibility description when present. |
sharedPost | Separate original-post identity when the result is a reshare. |
searchQuery, rank, sourcePage | Query and position in this collected native result sequence. |
matchEvidence | Whether the literal query appears in post text or the author name. Native relevance can use other context. |
searchLocation | Resolved location input, ID, name and resolution method when a location was requested. |
collectedAt | UTC collection timestamp. |
Post permalinks can use the exact numeric source post ID when Facebook omits the separate link. Photo permalinks can be formed from the public photo ID when the source omits a separate link. Media download links may expire. Download permitted media promptly if you need a durable copy.
Export Facebook post search data on a schedule
Save a tested input as an Apify task and attach a schedule in your account. Use date windows to control the collection period, then deduplicate successive exports by postId.
Search ranking and visibility can change between runs. A post newly returned by a search is not necessarily newly published. Use publishedAt to distinguish those events.
Download your results
Open your run's dataset, choose Export and select JSON, CSV or Excel. JSON keeps nested fields together. CSV and Excel are useful when you want to review the records in a spreadsheet.
See Apify's download and export guide for the available formats and field options.
Pricing
The result event is charged once per unique post saved to the dataset. Duplicate results are not charged again. There is no separate Actor fee for a successful location lookup or available video enrichment.
Apify platform usage and any proxy use follow your plan.
A failed run may contain posts that have already been saved and charged. The Actor preserves useful output when a later request fails, so check the run status and summary before treating a dataset as complete.
See the live Pricing tab for current rates and discounts.
Tips for best results
- Use a precise location. Provide a qualified city name, region or exact Facebook place ID when you need a location filter.
- Check why each result matched. Review
matchEvidencealongside the post text and source link to distinguish literal matches from author-name or contextual matches. - Sort returned dates when order matters. Facebook's recent-post selection does not guarantee strict chronological order. Your spreadsheet or assistant can sort the collected publication dates.
Limits and caveats
The Actor collects public results available without a Facebook login. It does not collect private posts, private-group content, restricted comments or a complete author timeline.
When Facebook rate-limits the Actor, returns temporary errors or the connection drops, the Actor retries on its own; on Automatic and proxy connections it also switches to a fresh proxy session. Direct connections stay direct and never switch to a paid proxy. A single post in an unusual format is skipped and counted in skippedMalformedPosts; empty result slots that Facebook sends without a post are counted in unrenderedPostSlots. Neither is charged.
Every run writes a RUN-SUMMARY record with its outcome:
status | Run | What it means |
|---|---|---|
limit_reached | Succeeded | Saved the number of posts in resultsCount. |
source_exhausted | Succeeded | Facebook reported no more pages for this search session. Another session or a continuation memory may still find other posts. Zero rows here means no matching posts were found, not that none exist. |
time_limit_reached | Succeeded, partial | maxRunSeconds ran out. pending: true means there is more to search; with a memory, the next batch continues. |
source_interrupted | Succeeded, partial | Facebook kept failing after the Actor's own recovery, but posts were already saved. sourceRecoveryExhausted.reason says why (rate_limited, temporarily_unavailable or connection_failed). With a memory, the next batch requests the same page again. |
customer_limit_reached, charge_limit_reached | Succeeded, partial | Your max-cost limit or platform timeout stopped the run; saved posts are kept. |
ownership_lost | Succeeded, partial | Another batch took over the continuation memory after this one saved posts; see above. |
proxy_country_unavailable | Succeeded, empty | The chosen proxy country could not be used. No charge. |
location_no_match | Succeeded, empty | Facebook found no place for your location (stopReason no_geographic_match), so no search ran. Your location filter is never dropped. |
A run fails, keeping any posts already saved, when:
- Facebook denies access;
- Facebook keeps failing before any post was saved, or on a direct connection;
- most posts on a page are unreadable;
- storage or billing fails.
Blocking, timeouts and unreadable responses are never reported as an empty search.
A run keeps paging while Facebook offers a next page, until it reaches resultsCount, the end of the results, your limits or maxRunSeconds. There is no page-limit setting.
Results are deduplicated within a run. If Apify restarts the same run, it skips posts it already saved and does not charge them again; a restart keeps the run's original build and limits. Without a continuation memory, separate runs are independent and can return the same posts. Never edit the memory's internal records; use excludePostIds to skip posts from older exports.
Automation and integrations
Save your settings for next time
Once you have an input that works for you, save it as an Apify task. This keeps your settings together so you can use them again without filling in the form from scratch.
Run on a schedule
Need fresh results regularly? You can schedule the Actor or a saved task to run at a time that suits you.
Each scheduled run collects the data again. If you want to compare results or highlight changes, add that step in your own workflow.
Send results to your other tools
Use n8n, Make or Zapier to connect this scraper to the rest of your workflow. For example, you could pass its results to an AI assistant or add records to a spreadsheet. Follow the Apify integration guides for your chosen tool.
For a custom connection, an Apify webhook can notify your app when a run finishes or fails. Your app can then fetch the results or handle the failure.
API usage
Want to collect this data from your own app or automation? The examples below send input to the scraper and show how to collect its results.
The Node.js and Python examples wait for the run to finish before reading its results. The cURL example starts the run and returns its details. Wait for that run to finish, then use its defaultDatasetId to fetch the results.
For setup instructions, see Apify's JavaScript client guide, Python client guide and Actor runs API reference.
cURL
curl -X POST 'https://api.apify.com/v2/acts/fetch_cat~facebook-post-search-scraper/runs' \-H "Authorization: Bearer $APIFY_TOKEN" \-H 'Content-Type: application/json' \--data @- <<'JSON'{"query": "coffee shop","resultsCount": 20,"searchType": "top"}JSON
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('fetch_cat/facebook-post-search-scraper').call({"query": "coffee shop","resultsCount": 20,"searchType": "top"});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python
import osfrom apify_client import ApifyClientclient = ApifyClient(os.environ['APIFY_TOKEN'])run = client.actor('fetch_cat/facebook-post-search-scraper').call(run_input={'query': 'coffee shop', 'resultsCount': 20, 'searchType': 'top'})print(client.dataset(run['defaultDatasetId']).list_items().items)
Use with an AI assistant notes
This public Actor uses limited permissions and pay-per-event pricing. Set a small resultsCount when asking an assistant to collect posts, and retrieve records from the run's default dataset. Missing source values remain null or absent as described above.
MCP and AI agents
You can ask your AI assistant to collect data with Facebook Posts Search Scraper and help you work with the results. The scraper returns the data, and your assistant can then summarize it, compare records or prepare notes.
Connect your assistant through the Apify MCP server. MCP gives your assistant a way to find this scraper, run it and read the results. Follow the official setup and sign-in guide for your app.
Easier setup with an Apify plugin
If you use a supported coding assistant, the official Apify plugin can set up the connection for you. It connects your assistant to Apify and includes instructions for common tasks. Follow the guide for your particular app.
Use Apify AI in Console
Prefer to keep everything in Apify? Open Apify AI in Console and ask it to find Fetch Cat's Facebook Posts Search Scraper. You can describe the data you want and ask questions about the results.
Apify AI is currently in beta. It asks for confirmation before starting an Actor, and normal run charges apply.
Choose your assistant
- Claude and Claude Code (Anthropic): Apify setup guide.
- ChatGPT and Codex (OpenAI): Apify setup guides.
- Grok Bot (xAI): Apify plugin guide.
- Gemini CLI (Google): MCP server setup guide. Use the server URL below with the HTTP configuration supported by Gemini CLI.
Connect just this scraper
To keep your setup focused on this scraper, add this server configuration to a compatible MCP client:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=fetch_cat/facebook-post-search-scraper"}}}
Sign in to Apify when your client asks. If your client uses a Bearer token instead, follow its setup guide and keep the token in its secure configuration. Configuration formats vary by app, so use the linked guide if your client needs a different format.
Use Apify's general server
Already connected to the general Apify MCP server at https://mcp.apify.com? You can use it to find this scraper without adding another server. Ask your assistant to use Facebook Posts Search Scraper by Fetch Cat, or give it the identifier fetch_cat/facebook-post-search-scraper.
Your assistant can check the available settings and retrieve the results from the returned run. If the run is still working, it should follow that run rather than start it again. Both connection options use Apify's hosted service.
Example requests
Try asking your assistant for the data you need:
-
“Find up to 20 public Facebook posts mentioning LEGO. Show their text, publication dates, source links and why each result matched the search.”
-
“Get up to 10 recent public Facebook posts about coffee associated with London. Include the available engagement counts and sort the returned posts by date for me.”
-
“Collect up to 20 public Facebook posts about electric bikes published between 1 and 30 September 2026. Put them in a research table with their original links and any collection warnings.”
Normal Apify charges apply. Check the live Pricing tab before asking your assistant to run a larger batch.
Pay with x402
If your AI agent has a funded wallet, it can pay for Apify usage through x402. This experimental option lets an agent use Apify without a conventional account.
Apify AGI provides a prepaid API token with a spending cap after payment. Your agent can use that token to run this scraper through the Apify API or an authenticated MCP connection.
Some MCP setups also support paying for each request directly. That is a different payment option, so check the official guide for its availability.
Follow the official guide for wallet setup, supported payment options and current terms. Apify handles the payments. Keep wallet keys and payment tokens in your agent's secure configuration.
Other ways for agents to pay
Apify also supports MPP for prepaid access through AGI and Skyfire for eligible Actors. If your agent already uses one of these, see the agentic payment guide to choose the right setup.
Ranking and location matching
latest means Facebook’s recent-post selection. It does not promise strictly descending timestamps. You can sort collected rows by publishedAt, but that does not make a limited sample an exhaustive chronological feed.
Use a qualified location such as London, United Kingdom or Lisbon, Portugal. The verified local-name variant Milano, Italy is resolved as Milan, Italy. When Facebook omits a country from a city's label, the qualified name can resolve only if multiple distinct child places corroborate that city and country with the same source timezone. The original input and Facebook’s resolved name remain in searchLocation. A completed, error-free lookup with no geographic matches finishes successfully with zero posts, a visible warning and RUN-SUMMARY reason no_geographic_match. No post search is performed and your location filter is never removed. An ambiguous city name still fails with an explanation; malformed responses, blocking, upstream and transport errors remain failures.
A region such as Alaska selects the first matching city supplied by Facebook. The resolved name and ID appear in searchLocation. Use an exact place ID when that choice matters.
Location filtering follows Facebook’s association of a post with a place. It is not a verified author residence or a radius search.
FAQ
What data can I export with facebook post search scraper?
Public post text, source IDs and links, authors, publication dates, available engagement, media and query provenance. The output field table explains nullable values and optional video details.
Can I run Facebook Posts Search Scraper through an API, schedule, or MCP client?
Yes, when your account has access to the Actor. Use its real input keys with the Apify API, a saved task and schedule, or the official MCP server.
Does it search only hashtags?
No. It accepts ordinary words and phrases as well as hashtags. Search relevance follows Facebook. It is not an exact-text-only filter.
How much does it cost to use Facebook Posts Search Scraper?
You pay for the unique posts saved through the result event. Consult the Pricing tab for current rates, and inspect partial output when a run fails.
Related Actors
- Facebook Groups Search Scraper — Discover public Facebook group records by keyword and optional location, with available names, group links and displayed counts.
- Facebook Group Insights Scraper — Collect available public Facebook group About details and member counts from exact group URLs, not group posts.
- Facebook Pages Scraper — Collect public Facebook Page profiles with available contact fields, audience counts and optional post links.
- Facebook Posts Scraper — Collect public Facebook post captions, media references and available engagement from supported page, group or post targets.
- Tweet Scraper — Collect public X post text, author details and available engagement from known profile or post URLs.
Support and feedback
For custom additions or integrations, email hello@fetchcat.dev.
Found an error or have a feature request? Open an issue with the run URL, a non-sensitive input example and what you expected.
Need help sharing it? See Apify’s guide to sharing a run when reporting an issue. Sharing a run can give the developer access to its input, logs and results, so use a run that contains no sensitive data. Please leave out API tokens, passwords, cookies, private documents and personal data. Use a public sample URL or a redacted example instead.
Tried this scraper? We'd love to hear how it worked for you. Leave a review to help others choose the right tool and help us improve it. Your feedback means a lot to us.
Made with care for curious people, AI agents and the possibilities in data. ♥