Facebook Posts Scraper
7 days trial then $35.00/month - No credit card required now
Facebook Posts Scraper
7 days trial then $35.00/month - No credit card required now
Extract data from hundreds of Facebook posts from one or multiple Facebook pages and profiles. Get post URL, post text, page or profile URL, timestamp, number of likes, shares, comments, and more. Download the data in JSON, CSV, and Excel and use it in apps, spreadsheets, and reports.
Do you want to learn more about this Actor?
Get a demoWhat is Facebook Posts Scraper?
It's a simple and powerful tool that allows you to extract data from Facebook posts. To get that data, just insert the URL of Facebook page, Facebook post or Facebook profile and click "Save & Start" button.
What Facebook posts data can I extract?
With this Facebook API, you will be able to extract the following data from Facebook:
๐ Post text | ๐ Post and page/profile URL |
๐ Timestamp | ๐ Number of likes, shares, comments |
๐ Page or profile details | ๐ Post thumbnail |
Why scrape Facebook posts?
๐คบ Competition monitoring to identify what they're doing right, or wrong, and how you can do it better
๐ Market research or analysis
๐ฅ Monitoring trends and brand sentiment and use the data to inform your investment strategy
๐ฅธ Social media analysis and identifying hot spots of misinformation
How do I use Facebook Posts Scraper?
Facebook Posts Scraper was designed to be easy to start with even if you've never extracted data from the web before. Here's how you can scrape Facebook data with this tool:
- Create a free Apify account using your email.
- Open Facebook Posts Scraper.
- Add one or more Facebook page/profile URLs to scrape its posts.
- Click "Start" and wait for the data to be extracted.
- Download your data in JSON, XML, CSV, Excel, or HTML.
If you need guidance on how to run the scraper, you can follow our step-by-step tutorial ๐
Is there a difference between scraping a Facebook Profile and Facebook Page?
Yes, there is. Facebook Pages are created for businesses, companies, non-profits, and other social causes. Those are the Facebook accounts that strive to provide "public-first" content and are often managed by a group of people. An easy way to distinguish between a Facebook profile and a Facebook page is that pages usually have a category of content and activity they would like to be associated with (news, software, hospitality, etc.) Facebook Pages that are particularly popular often include a blue verification badge. This scraper can extract information from both Facebook Pages and Facebook Profiles.
Input
The input for Facebook Posts Scraper should be URLs of Facebook pages or Facebook profiles you want to scrape posts from. Click on the input tab for a full explanation of input in JSON.
1{ 2 "proxy": { 3 "useApifyProxy": true, 4 "apifyProxyGroups": [ 5 "RESIDENTIAL" 6 ] 7 }, 8 "resultsLimit": 5, 9 "startUrls": [ 10 { 11 "url": "https://www.facebook.com/nytimes" 12 } 13 ], 14 "maxRequestRetries": 10 15} 16...
Output sample
The results will be wrapped into a dataset which you can find in the Storage tab. Here's an excerpt from the dataset you'd get if you apply the input parameters above:
And here is the same data but in JSON. You can choose in which format to download your Facebook data: CSV, Excel spreadsheet, JSON, JSONL, HTML table, or XML.
1[{ 2 "facebookUrl": "https://www.facebook.com/nytimes/", 3 "pageId": "5281959998", 4 "postId": "10153102379324999", 5 "pageName": "The New York Times", 6 "url": "https://www.facebook.com/nytimes/posts/pfbid02H3AMTEUUKeVQfHUxARkcz12qCNep8Xhta5czh5rGwVWKf15UdFksFEZiKJ5BiSRul", 7 "time": "Thursday, 6 April 2023 at 07:10", 8 "timestamp": 1680790202000, 9 "likes": 9, 10 "comments": 17, 11 "shares": null, 12 "text": "Vice President Kamala Harrisโs visit to Africa last week was designed to send a message โ China is not your friend. The U.S. is. Whatโs at stake as the U.S. races to deepen its relationships with African countries? Listen to today's episode of The Daily.", 13 "link": "https://nyti.ms/3m5ATQF", 14 "thumb": "https://external.fbhx1-1.fna.fbcdn.net/emg1/v/t13/14235345366312894764?url=https%3A%2F%2Fstatic01.nyt.com%2Fimages%2F2023%2F03%2F31%2Fmultimedia%2F06daily-africa-china-image%2F31DAILY-africa-harris-audio-app-lqcz-facebookJumbo.jpg&fb_obo=1&utld=nyt.com&stp=c0.5000x0.5000f_dst-emg0_p540x282_q75_u&ccb=13-1&oh=06_AbFAcUqXHUyQslcBMU4ZurZEl5k4RkI70FPgilDPmwOxHA&oe=6430CB18&_nc_sid=6ac203", 15 "topLevelUrl": "https://www.facebook.com/5281959998/posts/10153102379324999", 16 "facebookId": "5281959998", 17 "postFacebookId": "10153102379324999" 18}, 19{ 20 "facebookUrl": "https://www.facebook.com/nytimes/", 21 "pageId": "5281959998", 22 "postId": "10153102374144999", 23 "pageName": "The New York Times", 24 "url": "https://www.facebook.com/nytimes/posts/pfbid02meAxCj1jLx1jJFwJ9GTXFp448jEPRK58tcPcH2HWuDoogD314NvbFMhiaint4Xvkl", 25 "time": "Thursday, 6 April 2023 at 06:55", 26 "timestamp": 1680789311000, 27 "likes": 22, 28 "comments": 2, 29 "shares": null, 30 "text": "Four days before the wedding they emailed family members a โsave the dateโ invite. It was void of time, location and dress code โ the couple were still deciding those details.", 31 "link": "https://nyti.ms/3KAutlU", 32 "thumb": "https://external.fbhx1-1.fna.fbcdn.net/emg1/v/t13/10934665028194629920?url=https%3A%2F%2Fstatic01.nyt.com%2Fimages%2F2023%2F04%2F06%2Ffashion%2F06FLASH-WEDDINGS%2F06FLASH-WEDDINGS-facebookJumbo.jpg&fb_obo=1&utld=nyt.com&stp=c0.5000x0.5000f_dst-emg0_p540x282_q75_u&ccb=13-1&oh=06_AbHZm2V5eGBS0LJDL_K__5OFCQlIIRY0KoWsbfyhQs7K2w&oe=64307090&_nc_sid=6ac203", 33 "topLevelUrl": "https://www.facebook.com/5281959998/posts/10153102374144999", 34 "facebookId": "5281959998", 35 "postFacebookId": "10153102379324999" 36}, 37{ 38 "facebookUrl": "https://www.facebook.com/nytimes/", 39 "pageId": "5281959998", 40 "postId": "10153102363149999", 41 "pageName": "The New York Times", 42 "url": "https://www.facebook.com/nytimes/posts/pfbid0rx37EW9fgw4oEdQngFjAberf7VTPX3Nyz7t5b4aWb75yQgGEA2TiNPZCbTrAeCb9l", 43 "time": "Thursday, 6 April 2023 at 06:25", 44 "timestamp": 1680787505000, 45 "likes": 22, 46 "comments": 17, 47 "shares": 11, 48 "text": "In the early, panicked days of the pandemic, the U.S. government made policies like Medicaid and food stamps more generous and created benefits like paid sick leave and free school lunches. Now, most of those policies have ended or will expire soon.", 49 "link": "https://nyti.ms/3m9eqC9", 50 "thumb": "https://external.fbhx1-1.fna.fbcdn.net/emg1/v/t13/10917508170453131590?url=https%3A%2F%2Fstatic01.nyt.com%2Fimages%2F2023%2F04%2F05%2Fupshot%2Fpandemic-safety-net-medicaid-food-stamps-promo%2Fpandemic-safety-net-medicaid-food-stamps-promo-facebookJumbo.png&fb_obo=1&utld=nyt.com&stp=c0.5000x0.5000f_dst-emg0_p540x282_q75_u&ccb=13-1&oh=06_AbFjzcX-8HBnqgZ-au4C4Gy9gxAta0xkxHvyGxN9CaORKg&oe=643083D5&_nc_sid=6ac203", 51 "topLevelUrl": "https://www.facebook.com/5281959998/posts/10153102363149999", 52 "facebookId": "5281959998", 53 "postFacebookId": "10153102379324999" 54}, 55{ 56 "facebookUrl": "https://www.facebook.com/nytimes/", 57 "pageId": "5281959998", 58 "postId": "10153102358079999", 59 "pageName": "The New York Times", 60 "url": "https://www.facebook.com/nytimes/posts/pfbid0pzTZ7jE4BjAjZA3tP6SzXtgZvbpc4q5XaC3ToGq6Qabxv7EWYoGESBsjtnPQUj3Sl", 61 "time": "Thursday, 6 April 2023 at 06:11", 62 "timestamp": 1680786664000, 63 "likes": 161, 64 "comments": 121, 65 "shares": 30, 66 "text": "Bob Lee, a tech executive who helped create the payment service Cash App, was fatally stabbed in San Francisco on Tuesday, his family said. โI was so fortunate to grow up with him, and I feel like Iโve lost part of myself,โ his brother wrote on Facebook.", 67 "link": "https://nyti.ms/40YcAD2", 68 "thumb": "https://external.fbhx1-1.fna.fbcdn.net/emg1/v/t13/5428151098979393741?url=https%3A%2F%2Fstatic01.nyt.com%2Fimages%2F2023%2F04%2F05%2Flens%2F05xp-lee-01%2F05xp-lee-01-facebookJumbo.png&fb_obo=1&utld=nyt.com&stp=c0.5000x0.5000f_dst-emg0_p540x282_q75_u&ccb=13-1&oh=06_AbHjQI0VQ8mEBLefnL0N89esU5kZNEtCSyn6Xb-uNs4YeQ&oe=6430C0D7&_nc_sid=6ac203", 69 "topLevelUrl": "https://www.facebook.com/5281959998/posts/10153102358079999", 70 "facebookId": "5281959998", 71 "postFacebookId": "10153102379324999" 72}, 73...
How many results can you scrape with Facebook Posts Scraper?
Facebook Posts Scraper can return up to 5,000 results from one page. However, you have to keep in mind that scraping facebook.com has many variables to it and may cause the results to fluctuate case by case. Thereโs no one-size-fits-all-use-cases number. The maximum number of results may vary depending on the complexity of the input, location, and other factors. Some of the most frequent cases are:
- website gives a different number of results depending on the type/value of the input
- website has an internal limit that no scraper can cross
- scraper has a limit that we are working on improving
Therefore, while we regularly run Actor tests to keep the benchmarks in check, the results may also fluctuate without our knowing. The best way to know for sure for your particular use case is to do a test run yourself.
How much will scraping Facebook Posts cost you?
When it comes to scraping, it can be challenging to estimate the resources needed to extract data as use cases may vary significantly. That's why the best course of action is to run a test scrape with a small sample of input data and limited output. Youโll get your price per scrape, which youโll then multiply by the number of scrapes you intend to do.
Watch this video for a few helpful tips. And don't forget that choosing a higher plan will save you money in the long run.
Want to scrape Facebook search or comments?
You can use the dedicated scrapers below if you want to scrape specific Facebook data. Each of them is built particularly for the relevant Facebook scraping case be it reviews, ads, comments or photos. Feel free to browse them:
๐ Facebook Marketplace Scraper | ๐น Facebook Games Scraper |
๐ฅ Facebook Groups Scraper | ๐ Facebook Photos Scraper |
๐ฌ Facebook Comments Scraper | ๐ฑ Facebook Pages Info Scraper |
๐ฉ Facebook Pages Scraper | ๐ Facebook Reviews Scraper |
๐ Facebook Events Scraper | ๐ต๏ธโโ๏ธ Facebook Search Scraper |
๐ข Facebook Ads Scraper | ๐ Facebook Likes and Reactions Scraper |
#๏ธโฃ Facebook Hashtag Scraper | โน๏ธ Facebook Page Posts Checker |
Not your cup of tea? Build your own scraper
Facebook Pages Scraper doesnโt exactly do what you need? You can always build your own! We have various scraper templates in Python, JavaScript, and TypeScript to get you started. Alternatively, you can write it from scratch using our open-source library Crawlee. You can keep the scraper to yourself or make it public by adding it to Apify Store (and find users for it).
Or let us know if you need a custom scraping solution.
Integrations and Facebook Posts Scraper
Last but not least, Facebook Posts Scraper can be connected with almost any cloud service or web app thanks to integrations on the Apify platform. You can integrate with Make, Asana, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and more.
You can also use webhooks to carry out an action whenever an event occurs, e.g., get a notification whenever Facebook Posts Scraper successfully finishes a run.
Using Facebook Posts Scraper with the Apify API
The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify actors. The API also lets you access any datasets, monitor actor performance, fetch results, create and update versions, and more. To access the API using Node.js, use the apify-client
NPM package. To access the API using Python, use the apify-client
PyPI package.
Check out the Apify API reference docs for full details or click on the API tab for code examples.
Is it legal to scrape Facebook Posts data?
Our Facebook scrapers are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. However, you should be aware that your results could contain personal data. You should not scrape personal data unless you have a legitimate reason to do so.
If you're unsure whether your reason is legitimate, consult your lawyers. You can also read our blog post on the legality of web scraping and ethical scraping.
Your feedback
Weโre always working on improving the performance of our Actors. So if youโve got any technical feedback for Facebook Pages Scraper or simply found a bug, please create an issue on the Actorโsย Issues tabย in Apify Console.
Actor Metrics
1.3k monthly users
-
196 stars
>99% runs succeeded
3.2 days response time
Created in Nov 2022
Modified 4 days ago