Facebook Post & Comment Scraper for Pages, Groups and Profiles
Pricing
from $1.00 / 1,000 results
Facebook Post & Comment Scraper for Pages, Groups and Profiles
Scrape public Facebook posts from pages, groups, and profiles with best-effort comment extraction. Collect post text, post IDs, permalinks, likes, shares, comment counts, profile data, media URLs, and comment samples. Built for Apify with fallback scraping and proxy suppor
Pricing
from $1.00 / 1,000 results
Rating
0.0
(0)
Developer
Inus Grobler
Actor stats
0
Bookmarked
41
Total users
22
Monthly active users
10 days ago
Last modified
Categories
Share
Facebook Post Scraper | Facebook Page, Group, Profile and Comment Scraper for Apify
This Facebook scraper for Apify helps you extract the latest public Facebook posts from Facebook pages, groups, and profiles. It can also enrich posts with comment samples, engagement metrics, profile details, media URLs, and outbound links.
If you are looking for a Facebook post scraper, Facebook page scraper, Facebook group scraper, Facebook profile scraper, or a best-effort Facebook comment scraper, this Actor is built for that workflow.
What this Facebook scraper extracts
For each post, the Actor can collect:
- Post author or page name
- Post timestamp or publish date
- Post text content
- Post permalink URL
- Post ID for downstream workflows
- Likes, shares, and visible comment counts
- Profile or page details when available
- Media URLs and external links
- Best-effort comment samples from the post permalink
Supported Facebook targets
You can scrape:
- Public Facebook pages
- Public Facebook groups
- Public Facebook profiles
- A list of Facebook URLs, page names, or group names in one run
Why use this Apify Facebook scraper
- Built as a production-ready Apify Actor
- Scrapes public Facebook content with a primary and fallback extraction flow
- Supports fast post collection and optional deep enrichment
- Can emit comments as separate dataset items for downstream analysis
- Stores clean structured output in the Apify dataset for API, JSON, CSV, Excel, webhooks, and integrations
Best use cases
- Social media monitoring
- Brand and competitor tracking
- News and media monitoring from Facebook pages
- Community research from Facebook groups
- Lead generation and market research
- Building datasets for dashboards, analytics, and AI pipelines
How it works
The Actor uses a layered scraping strategy to improve reliability on Facebook:
scraplingtries to fetch and parse posts quickly.- If Facebook blocks or weakens that response, the Actor falls back to
pydoll. - In deep enrichment mode, the Actor can open post permalinks and recover best-effort comment samples with browser automation.
This design helps balance speed, cost, and coverage.
Input
targets(array): Facebook URL, page name, or group namestartUrls(array): one or more public Facebook URLsmaxPosts(integer): maximum number of posts to return per URL (1-200)maxScrollRounds(integer): optional scroll-depth override (0-40,0means auto)performanceMode(string):fast,balanced, ormaxCoverageenrichmentMode(string):none,basic, ordeepmaxEnrichedPosts(integer): maximum posts per URL to enrich (0-200)maxCommentsPerPost(integer): maximum recovered comment samples per post in deep mode (0-200)maxCommentExpansionRounds(integer): maximum browser expand and scroll rounds for loading more comments and replies (1-20)includeReplies(boolean): include visible replies during deep comment extractionemitCommentItems(boolean): emit comments as separate dataset itemsfailOnCommentBlock(boolean): fail the run if comment extraction is blocked and comments are requiredfacebookCookieHeader(string, optional): logged-in Facebook cookie header for better coverageproxyConfiguration(object, optional): Apify Proxy or custom proxy settings
Output
The dataset can include both post items and comment items.
Common post fields:
itemTypesourceUrlpostAuthorpostTimestamppostTextpostUrlpostIdpostOwnerIdlikessharescommentCountlikesCountsharesCountcommentCountValueprofileNameprofileUrlprofileUsernameprofileIdprofileImageUrlprofileFollowersprofileFollowersCounttargetTypetargetTitletargetDescriptiontargetImageUrltargetFollowerstargetFollowersCounttargetUrlenrichmentModecommentExtractionStatuscommentExtractionMethodisEnrichedexternalUrlsmediaUrlsmediaCountcommentSamplescommentSamplesCountscrapedWithscrapedAt
Comment item fields:
itemTypeparentPostIdparentPostUrlcommentTextcommentAuthorcommentAuthorUrlcommentTimestampcommentIdcommentUrlcommentSampleIndex
Example input
{"startUrls": [{ "url": "https://www.facebook.com/NASA" }],"targets": ["bbcnews"],"maxPosts": 20,"performanceMode": "balanced","enrichmentMode": "deep","maxEnrichedPosts": 10,"maxCommentsPerPost": 25,"maxCommentExpansionRounds": 8,"includeReplies": true,"emitCommentItems": true,"failOnCommentBlock": false,"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"],"apifyProxyCountry": "US"}}
Example output item
{"itemType": "post","inputTarget": "NASA","sourceUrl": "https://www.facebook.com/NASA","postAuthor": "NASA - National Aeronautics and Space Administration","postTimestamp": "2d","postText": "Post text...","postUrl": "https://www.facebook.com/NASA/posts/...","postId": "pfbid02abc...","likes": "728","shares": "42","commentCount": "61","likesCount": 728,"sharesCount": 42,"commentCountValue": 61,"profileName": "NASA - National Aeronautics and Space Administration","profileUrl": "https://www.facebook.com/NASA","profileUsername": "NASA","externalUrls": ["https://example.com"],"mediaUrls": ["https://..."],"mediaCount": 1,"commentSamplesCount": 10,"scrapedWith": "pydoll","scrapedAt": "2026-03-09T10:40:00+00:00"}
Important notes
- Base mode (
enrichmentMode=none) scrapes posts only. - Deep mode adds best-effort Facebook comment extraction from post permalinks.
- Facebook comments and engagement visibility can vary by page, region, proxy quality, and login state.
- Full comment-thread completeness is not guaranteed because Facebook uses login walls, privacy restrictions, and anti-bot protections.
- For stronger coverage, use residential proxies and provide
facebookCookieHeader.
Deepest scrape configuration
If you want the deepest scrape this Actor can do in a single run, use:
performanceMode: "maxCoverage"for the strongest post-recovery behaviorenrichmentMode: "deep"for post permalink enrichment and comment recoveryemitCommentItems: trueto keep comments as separate dataset itemsincludeReplies: trueto include visible repliesfacebookCookieHeaderplus residential proxies for better Facebook access
Example:
{"maxPosts": 20,"performanceMode": "maxCoverage","enrichmentMode": "deep","maxEnrichedPosts": 20,"maxCommentsPerPost": 25,"maxCommentExpansionRounds": 8,"includeReplies": true,"emitCommentItems": true,"failOnCommentBlock": false,"facebookCookieHeader": "c_user=...; xs=...","proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"],"apifyProxyCountry": "US"}}
Recommended Apify settings
For stronger coverage on live Facebook pages:
{"maxPosts": 20,"performanceMode": "balanced","enrichmentMode": "deep","maxEnrichedPosts": 10,"maxCommentsPerPost": 25,"maxCommentExpansionRounds": 8,"includeReplies": true,"emitCommentItems": true,"failOnCommentBlock": false,"facebookCookieHeader": "c_user=...; xs=...","proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"],"apifyProxyCountry": "US"}}
Summary
This Actor is designed for teams that need a practical Facebook data scraper on Apify: collect Facebook posts, enrich them with visible Facebook comments, and export the data for monitoring, analytics, automation, and downstream scraping workflows.