Facebook Posts Scraper
Pricing
from $3.50 / 1,000 post scrapeds
Facebook Posts Scraper
Scrape public Facebook page, profile, group and post URLs into structured post records with text, media, links and engagement counts. No login or cookies needed.
Pricing
from $3.50 / 1,000 post scrapeds
Rating
0.0
(0)
Developer
Khadin Akbar
Maintained by CommunityActor stats
0
Bookmarked
44
Total users
11
Monthly active users
3 days ago
Last modified
Categories
Share
What is Facebook Posts Scraper?
Facebook Posts Scraper accepts public Facebook page, profile, group, and direct post URLs and turns them into one dataset record per scraped post. Each record can include the source URL, canonical post URL, post ID, author name and URL, cleaned text, timestamp and timestamp text, reactions, comments, shares, media URLs, outbound links, scrape source, and scraped-at time. It is an Apify Actor usable through Apify MCP for structured public-post extraction and downstream workflows that start from a Facebook URL.
Best fit and connected workflows
This Actor fits workflows that begin with a public Facebook URL and need a structured post dataset. Common routes include:
- Social listening from a page, profile, or group URL into post text and engagement counts.
- Competitive research from a direct post URL into canonical post metadata, media, and outbound links.
- Lead generation or content review workflows that start from public Facebook pages and continue into post analysis.
- AI-agent workflows that need one record per post before handing selected posts to a follow-up tool.
For post-level enrichment, the output of this Actor connects naturally to Facebook Post Comments Scraper when a returned post URL or public ID needs comment-focused follow-up, and to Facebook Likes Scraper - Public Reactions & Profiles when a returned post URL or public ID needs public reaction or profile follow-up.
Practical scenario
Maya is reviewing a public Facebook page for a brand update. She starts with the page URL and keeps scrapeDetails enabled so the run opens each discovered post for richer text, media, outbound links, and engagement counts. The dataset returns records with postUrl, authorName, text, timestamp, reactionsCount, commentsCount, sharesCount, media, and externalLinks. Maya uses the timestamp and engagement counts to decide which posts need a deeper comments review, then sends the selected post URL to a downstream comments workflow.
Input
Use one or more public Facebook URLs as the starting point. resultsLimit is the primary cap on emitted post records, and maxPostsPerSource controls how many posts to collect from each source before moving on.
| Field | Type | Description |
|---|---|---|
startUrls | array | One or more public Facebook page, profile, group, or post URLs. Supported URLs are converted to mobile/basic Facebook for fast public extraction. |
resultsLimit | integer | Maximum number of post records to emit across all sources. Each emitted post charges the post-scraped event. |
maxPostsPerSource | integer | Maximum number of posts to collect from each page, profile, or group URL before moving to the next source. Direct post URLs count as one source. |
scrapeDetails | boolean | When enabled, the Actor opens each discovered post URL to enrich text, media, outbound links, and engagement counts. |
fallbackProvider | string | Optional fallback provider. auto uses an owner-managed key first and an owner-managed key second when configured. |
onlyPostsNewerThan | string | Optional lower date filter. Accepts ISO dates or natural JavaScript date strings. |
onlyPostsOlderThan | string | Optional upper date filter. Accepts ISO dates or natural JavaScript date strings. |
includeRawHtml | boolean | Debug option that adds a truncated rawHtml field to detail records. |
proxyConfiguration | object | Proxy settings. Residential Apify Proxy is the default. |
Valid input example:
{"startUrls": [{ "url": "https://www.facebook.com/NASA" },{ "url": "https://www.facebook.com/NASA/posts/10159744600446772" }],"resultsLimit": 50,"maxPostsPerSource": 25,"scrapeDetails": true,"fallbackProvider": "auto","onlyPostsNewerThan": "2026-01-01","onlyPostsOlderThan": "2026-06-01","includeRawHtml": false,"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"]}}
Output
The dataset contains one record per scraped post.
| Field | Type | Description |
|---|---|---|
sourceUrl | string | Facebook URL supplied by the user that led to this post. |
postUrl | string | Canonical Facebook URL for the scraped post. |
postId | string or null | suitable-effort Facebook post/story/video ID parsed from the URL. |
authorName | string or null | suitable-effort author or page name. |
authorUrl | string or null | suitable-effort canonical Facebook author/page URL. |
text | string or null | Cleaned post caption or body text. |
timestamp | string or null | ISO timestamp when Facebook exposes a parseable date. |
timestampText | string or null | Original timestamp text as displayed by Facebook. |
reactionsCount | integer or null | suitable-effort total reactions or likes count. |
commentsCount | integer or null | suitable-effort comments count. |
sharesCount | integer or null | suitable-effort shares count. |
media | array | Image or video URLs extracted from the post page. |
externalLinks | array | Outbound non-Facebook links found in the post page. |
scrapeSource | string | The routing options listed in the input schema. |
scrapedAt | string | ISO timestamp when the record was emitted. |
Illustrative output record:
{"sourceUrl": "https://www.facebook.com/NASA","postUrl": "https://www.facebook.com/NASA/posts/123456789","postId": "123456789","authorName": "NASA","authorUrl": "https://www.facebook.com/NASA","text": "A new image from space...","timestamp": "2026-06-01T00:00:00.000Z","timestampText": "June 1, 2026","reactionsCount": 1200,"commentsCount": 34,"sharesCount": 5,"media": ["https://scontent.xx.fbcdn.net/image.jpg"],"externalLinks": ["https://www.nasa.gov/"],"scrapeSource": "post-detail","scrapedAt": "2026-06-08T12:00:00.000Z"}
How it works
This Actor is HTTP-first and uses mobile/basic Facebook pages where available. When scrapeDetails is enabled, it opens each discovered post URL to enrich the record with text, media, outbound links, and engagement counts. It also supports optional provider fallback after Facebook blocks or returns empty public HTML. In auto mode, it uses an owner-managed key first and an owner-managed key second when those environment variables are configured. Residential Apify Proxy is the default proxy configuration.
Pricing
This Actor uses pay per event pricing with Apify platform usage included. The main usage driver is the post-scraped event, which is charged for each dataset item written. The Actor also charges an Actor Start event based on Actor memory. For current details, check the live Pricing tab on the Apify platform.
As a simple example written in words: if a run emits ten post records, it charges ten post-scraped events in addition to the Actor Start event.
Use with AI agents (MCP)
Tool description: this Actor is available through Apify MCP as a structured post-scraping tool for public Facebook URLs. The exact Actor identity is khadinakbar/facebook-posts-scraper.
Scrape the public Facebook page URL I provide, return the dataset rows, and summarize the post URLs, authors, timestamps, engagement counts, media, and outbound links for the newest posts.
Output interpretation:
- Each dataset row represents one scraped post.
sourceUrlpreserves the original URL you supplied, whilepostUrlis the canonical post URL you can pass to downstream tools.scrapeSourceshows whether the record came from timeline preview extraction, post-detail enrichment, or provider fallback.timestampis the normalized date when Facebook exposes a parseable value, andtimestampTextpreserves the original displayed text.reactionsCount,commentsCount, andsharesCountare suitable-effort engagement counts.resultsLimitandmaxPostsPerSourceshape how many records are emitted, which also shapespost-scrapedevent volume.- When provider fallback is enabled,
scrapeSourcecan show the routing options listed in the input schema.
Apify API example
import { ApifyClient } from 'apify-client';const client = new ApifyClient({token: process.env.APIFY_TOKEN,});const run = await client.actor('khadinakbar/facebook-posts-scraper').call({startUrls: [{ url: 'https://www.facebook.com/NASA' }],resultsLimit: 5,scrapeDetails: true,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Example environment setup and run:
export APIFY_TOKEN="your_apify_token"node run.js
Best results and outcome guidance
Use direct public page, profile, group, or post URLs that lead to the specific content you want to collect. Set resultsLimit as your main cost cap, then use maxPostsPerSource to balance broad coverage and source-by-source depth. Keep scrapeDetails enabled when you want text, media, links, and engagement counts from the post page. If a source returns empty public HTML, use fallbackProvider with the provider keys configured in the Actor environment. For date-scoped runs, combine onlyPostsNewerThan and onlyPostsOlderThan around the period you want to review.
Continue the workflow
- Then use Facebook Search Scraper to extend Facebook Posts Scraper research with a complementary discovery contract.
- Then use Facebook Video Downloader - Reels & MP4 Links to continue Facebook records selected with Facebook Posts Scraper into a focused media workflow.
Design note
I found that the dataset contract makes sourceUrl, postUrl, scrapeSource, and scrapedAt required on every record, so those fields belong in the core story of the README.
FAQ
Can I start from a page, profile, group, or direct post URL?
Yes. The input schema accepts public Facebook page, profile, group, and post URLs.
What should I use when I want a tighter budget?
Use resultsLimit as the main cap and reduce maxPostsPerSource when you want fewer posts per source.
How do I get richer post metadata?
Keep scrapeDetails enabled. That opens each discovered post URL to enrich text, media, outbound links, and engagement counts.
When should I use a downstream actor?
Use Facebook Post Comments Scraper when you want comments for a returned post, and Facebook Likes Scraper - Public Reactions & Profiles when you want reaction or profile follow-up on a returned post.
What happens if Facebook returns empty public HTML?
You can use fallbackProvider together with the configured provider environment variables to continue with provider-based extraction.
Responsible use
Use this Actor for public Facebook content that you are permitted to collect and process. Respect the terms, access controls, and privacy expectations that apply to each source. For operational safety, validate inputs, keep scopes narrow, and review the resulting dataset before passing records into downstream automations.
