Facebook Posts Scraper avatar

Facebook Posts Scraper

Pricing

$10.00/month + usage

Go to Apify Store
Facebook Posts Scraper

Facebook Posts Scraper

Just provide the page URL. The page name, post ID, link, text, likes, comments, shares — all data will be collected and stored directly in your Apify dataset. Works with residential proxies for reliable data extraction. Fast and easy — optimized for scraping public page data from Facebook.

Pricing

$10.00/month + usage

Rating

0.0

(0)

Developer

Data Pilot

Data Pilot

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

1

Monthly active users

3 days ago

Last modified

Share

🚀 Facebook Posts Scraper is a powerful Apify Actor designed to extract public post data from Facebook pages without using the official Facebook API. It leverages residential proxies to avoid IP blocks and delivers clean, structured data – perfect for social media monitoring, market research, competitor analysis, and content strategy.

🔥 Features

  • No Official API Required – scrapes public Facebook post data directly, serving as a true Facebook API alternative.
  • Smart Proxy Integration – uses Apify residential proxies to avoid IP blocks and achieve Facebook rate limit bypass, ensuring reliable Facebook data extraction.
  • Batch Processing – accepts multiple Facebook page URLs (or post URLs) in a single run.
  • Comprehensive Post Metadata – extracts post ID, post text, like count, comment count, share count, page name, URL, and scraped timestamp.
  • Sample Data Generation – (for demo purposes) generates realistic sample posts; easily replace with real scraping logic using tools like facebook-scraper or Playwright.
  • Apify Dataset Ready – each post's metadata is pushed as a separate dataset item for easy export (JSON, CSV, XML).
  • Async Architecture – fast, non‑blocking async Python scraper built with asyncio.
  • Lightweight & Extensible – easily customisable to add more fields or integrate with headless browsers for JavaScript‑rendered content.

⚙️ How It Works

  1. Input – Provide one or more Facebook page URLs (or post URLs) as input. The Actor also accepts a single URL if you prefer.
  2. Proxy – Actor initialises a residential proxy via Apify Proxy (recommended for Facebook anti-block).
  3. Scrape – For each URL, the Actor generates sample post data (or you can replace the logic with real scraping using libraries like facebook-scraper or Playwright). The current implementation demonstrates the data structure and proxy integration.
  4. Output – Each post's data is pushed to the Apify Dataset – a perfect Facebook data export solution.
  5. Finish – Logs total scraped posts and exits.

📥 Input

The Actor accepts a JSON input with the following fields:

FieldTypeDefaultDescription
facebookUrlsstring / arrayrequiredOne or more Facebook page URLs (e.g., "https://www.facebook.com/example"). The Actor also accepts facebookUrl or url for backward compatibility.
proxyConfigurationobject{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}Proxy settings – Facebook residential proxy recommended.

Example input:

{
"facebookUrls": [
"https://www.facebook.com/examplepage",
"https://www.facebook.com/anotherpage"
],
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

📤 Output

Each dataset item corresponds to one Facebook post:

FieldTypeDescription
facebookUrlstringThe original Facebook page URL.
postIdstringUnique identifier of the post.
pageNamestringName of the Facebook page.
urlstringDirect URL to the post.
scrapedAtstringISO timestamp of when the data was scraped.
textstringThe post's text content.
likesintNumber of likes on the post – Facebook like count.
commentsintNumber of comments on the post – Facebook comment count.
sharesintNumber of shares – Facebook share count.

Example output item:

{
"facebookUrl": "https://www.facebook.com/examplepage",
"postId": "1234567890123456",
"pageName": "examplepage",
"url": "https://www.facebook.com/examplepage/posts/1234567890123456",
"scrapedAt": "2025-02-14T12:34:56Z",
"text": "Sample post content #1 from examplepage",
"likes": 567,
"comments": 42,
"shares": 18
}

🧰 Technical Stack

  • Language: Python 3.11+ (async/await)
  • Core Scraper: `facebook-scraper`` – flexible integration for Facebook data extraction.
  • Proxy: Apify Proxy with RESIDENTIAL group – real peer IPs, high anonymity.
  • Platform: Apify Actor – serverless, scalable, integrated with Dataset and Key‑Value Store.
  • Deployment: One‑click run on Apify Console or via REST API.

🎯 Use Cases

  • Social Media Monitoring – track brand mentions and competitor activity on Facebook.
  • Market Research – analyse public sentiment and engagement on Facebook pages.
  • Competitor Analysis – monitor competitor posts, engagement, and content strategies.
  • Content Strategy – identify trending topics and successful post formats on Facebook.
  • Brand Reputation – track public feedback and comments about your brand.
  • Influencer Marketing – analyse influencer page performance and engagement metrics.
  • Academic Research – collect Facebook data for social science studies.
  • Social Media Dashboard – integrate Facebook data into analytics platforms.
  • Crisis Management – monitor public reactions during brand emergencies.
  • Lead Generation – identify potential customers through Facebook page interactions.
  • Social Listening – gather insights on customer opinions and preferences.

🚀 Quick Start

  1. Open in Apify Console – visit the Actor page and click Try for free.
  2. Paste Facebook URL(s) in the input field (one URL or multiple URLs).
  3. Enable residential proxies (recommended for reliable access).
  4. Click Start and wait for results.
  5. Export – download post metadata as JSON, CSV, HTML, or Excel.

You can also call this Actor programmatically via Apify SDK or REST API – ideal for automated pipelines.


💎 Why Use This Actor?

FeatureBenefit
✅ No Facebook API quotasExtract unlimited post data without API rate limits.
✅ Residential proxiesBypass Facebook anti-bot detection – high success rate.
✅ Batch processingScrape multiple pages in one run.
✅ Complete metadataGet post stats, engagement metrics, text content, and timestamps.
✅ Clean schemaReady for immediate analysis or database ingestion.
✅ Apify ecosystemSeamless integration with other Actors, triggers, and webhooks.
✅ No authenticationWorks with public Facebook content – no login required.
✅ ExtensibleEasily customise to add more fields or integrate advanced tools.

⚠️ Important Notes

  • Facebook Terms of Service – Use responsibly and at reasonable speed. This Actor is meant for personal, educational, or research use on public data only.
  • Proxy Credits – Residential proxy usage consumes Apify platform credits. Free tier may have limited availability.
  • Rate Limiting – Facebook aggressively rate limits scrapers. Use reasonable intervals between requests and consider distributed scraping.
  • Public Data Only – Only scrape publicly available posts and pages. Respect user privacy and Facebook's policies.
  • Dynamic Content – Facebook heavily relies on JavaScript rendering. For best results, consider integrating with Playwright or Puppeteer for JavaScript-rendered content.
  • Library Updates – If Facebook changes its structure, the underlying scraping library may need updates. We monitor and maintain regularly.

📦 Changelog

v1.0.0 (February 2025)

  • Initial release with residential proxy support.
  • Batch processing for multiple Facebook page URLs.
  • Extracts comprehensive post metadata (text, engagement metrics, timestamps).
  • Sample data generation for demo purposes.
  • Easily extensible for real scraping integration.
  • Full Apify Actor integration.

🧑‍💻 Support & Feedback

  • Issues & Ideas: Open a ticket on the Apify Actor issue tracker.
  • Contributions: Pull requests are welcome via the GitHub repository.
  • Documentation: Visit Apify Docs for platform guides.
  • Community: Join the Apify community forum for discussions and support.

📄 License

This Actor is provided as-is for educational, research, and personal use. Ensure compliance with Facebook's Terms of Service and applicable laws when scraping.