Facebook Posts Scraper
Extract posts, comments, reactions, and engagement data from public Facebook pages and profiles.
As an Apify affiliate, we may earn a commission from qualifying purchases made through our links, at no extra cost to you. We only recommend tools we believe in.
Overview
The Facebook Posts Scraper is a powerful tool designed for social media managers, researchers, and PR agencies to monitor the world's largest social network. It safely navigates Facebook's complex interface to extract data from any public Facebook Page or User Profile. You can seamlessly scrape historical timelines to gather the raw text of posts, embedded media links, and highly detailed engagement metrics (including specific reaction types like Love, Haha, Angry). Beyond the posts themselves, the scraper dives into the comment sections, allowing you to extract user sentiments, identify top commenters, and measure organic brand reach. This data is invaluable for competitor benchmarking, crisis management, and trend detection.
Key Features
Use Cases
Brand reputation monitoring and sentiment analysis
Competitor social media strategy tracking
Organic content performance and engagement analysis
Social listening and viral trend detection
Customer feedback extraction from comment sections
Journalistic research and political ad tracking
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| startUrls | Array | Optional | Links to the specific Facebook Pages or Profiles to scrape |
| resultsLimit | Number | Optional | Maximum number of posts to extract per page |
| commentsMode | String | Optional | Choose to extract 'None', 'Top Level', or 'All Replies' |
| maxComments | Number | Optional | Limit the number of comments extracted per post |
Sample Output
{
"url": "https://www.facebook.com/Apify/posts/123456789",
"text": "We are thrilled to launch our new AI scraping features today! 🚀",
"author": "Apify",
"date": "2026-03-10T14:30:00.000Z",
"likes": 1500,
"loves": 300,
"shares": 120,
"comments": 450,
"postComments": [
{
"author": "Jane Smith",
"text": "This is exactly what we needed! Great job team.",
"date": "2026-03-10T15:00:00.000Z",
"likes": 15
}
],
"mediaUrl": "https://scontent-prg1-1.xx.fbcdn.net/v/t39.30808-6/42..."
} How to Use
- 1
Click the 'Try for Free' button to access the Facebook Scraper on Apify.
- 2
Log in to your free Apify workspace.
- 3
Copy the URL of the Facebook Page or Profile you want to analyze and paste it into the 'Start URLs' field.
- 4
Adjust the 'resultsLimit' to control how far back in the timeline the scraper goes.
- 5
Configure whether you want to scrape comments alongside the posts.
- 6
Click 'Start'. Download your gathered social data as an Excel or JSON dataset.
API Example
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_API_TOKEN',
});
const input = {
"startUrls": [
{ "url": "https://www.facebook.com/Apify" }
],
"resultsLimit": 50,
"commentsMode": "TOP_LEVEL",
"maxComments": 20
};
const run = await client.actor("apify/facebook-posts-scraper").call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items); Pricing Structure
Pay for usage. Facebook is heavily fortified against web scraping, making residential proxies mandatory for stability. The average cost is $3.00 to $6.00 per 1,000 posts extracted with comments. The $5 Apify monthly free credit allows you to comfortably scrape hundreds of posts for free.
Limitations
- Cannot scrape Private Profiles, Secret Groups, or data hidden strictly behind a friend-wall.
- Facebook constantly updates its web structure; occasionally the scraper requires a hotfix from developers to restore full functionality.
- Extracting deep comment threads (thousands of replies) significantly slows down the extraction process.
Frequently Asked Questions
Can I scrape Facebook Groups with this tool?
Do I need to sign in with my Facebook account?
Can I search for posts by keywords across all of Facebook?
Does it extract emails or phone numbers from users who comment?
Extracted Data Details
View on Apify Store
Related Tools
Facebook Pages Scraper
Extract Facebook Page data including about info, posts, follower counts, and engagement metrics. Ideal for social media research.
Instagram Comments Scraper
Extract comments from Instagram posts and reels. Get comment text, usernames, replies, and engagement data.
Instagram Hashtag Scraper
Extract posts, reels, and engagement data from Instagram hashtags. Perfect for trend analysis and content research.
Need a Custom Solution?
Contact us for a bespoke scraper built to your exact requirements.
Hire an Expert