Actor picture

Facebook Latest Comments Scraper

pocesar/facebook-latest-comments-scraper

Mini-actor to scrape Facebook comments from one or multiple post URLs. Get comment text, timestamps, author id, author name, etc. Download data in structured formats such as JSON, CSV, XML, Excel, and HTML and use it in apps, spreadsheets, and reports. ​

No credit card required

Author's avatarPaulo Cesar
  • Modified
  • Users243
  • Runs238,298
Actor picture
Facebook Latest Comments Scraper

Why scrape Facebook comments?

Our free Facebook Comments Scraper allows to scrape Facebook posts and their comment section. Scraping Facebook comments can help you track public sentiment towards specific topics, brands, and personas, get immediate insights into the performance of marketing campaigns, identify and react to fake news, abuse, or information of high public value, and more.

If you want to know how your business could use the comment data scraped from Facebook, check out our industries pages for ideas and use cases.

How to scrape Facebook comments

Facebook Comments Scraper has a user-friendly structure, so there aren't too many scraping parameters to set.

  1. Create a free Apify account.
  2. Open Facebook Latest Comments Scraper
  3. Add one or more Facebook post URLs to scrape the comments under them.
  4. Click Run and wait for the datasets to be extracted.
  5. Download your data in JSON, XML, CSV, Excel, or HTML.

Want to scrape the most recent Facebook posts instead?

If you need to scrape not just a post but a whole Facebook page for recent posts and comments, consider trying this mini-scraper's twin - Facebook Posts Scraper. Our mini-scrapers are created to require just 1 or 2 settings to deliver scraping results quickly and effortlessly. Just enter one or more post URLs and click to start the scraping.

Need something more advanced?

Try our more advanced Facebook Pages Scraper or Facebook Ads Scraper if you need a wider array of options and are comfortable with configuring various scraper settings on your own.

Let us know if you need a custom Facebook scraping solution.

Cost of usage

Based on Apify's pricing at the time of writing, the Personal plan ($49) would allow you to scrape comments from about 10-20k posts monthly.

To run this actor, you will need to have access to residential proxies. If you don't already have access, contact us at support@apify.com.

For more info on how the price for scraping Facebook is formed, read in Cost of usage of the main Facebook Pages Scraper.

Input

Here's an example input for scraping comments from a Facebook post with a picture. It needs only one parameter - startUrls. You can check the INPUT_SCHEMA tab for more details.

{  
     "startUrls":  [
       {  
            "url":  "https://www.facebook.com/time/photos/a.470156966490/10158856011396491"  
       }  
    ]  
}

Output

This mini-scraper will deliver results in a dataset. You can choose in which format to download it: JSON, CSV, XML, Excel, and HTML. Here's the example of the JSON dataset you'd get if you apply the input parameter above:

[{
  "author": "TIME",
  "fbPage": "https://www.facebook.com/time/",
  "site": "https://www.time.com",
  "profile": "TIME",
  "postText": "Elon Musk is TIME's 2021 Person of the Year. https://ti.me/3IJvO6W",
  "postUrl": "https://www.facebook.com/time/photos/a.470156966490/10158856011396491/",
  "date": "2021-12-13T12:39:18.000Z",
  "modifiedDate": "2021-12-15T16:17:58.000Z",
  "imageCaption": "Elon Musk is TIME's 2021 Person of the Year. https://ti.me/3IJvO6W",
  "imageUrl": "https://scontent.fhel3-1.fna.fbcdn.net/v/t39.30808-6/p960x960/266791421_10158856011391491_2342928019632248499_n.jpg?_nc_cat=1&ccb=1-5&_nc_sid=9267fe&_nc_ohc=DNaExIwztaYAX9op0cE&_nc_ht=scontent.fhel3-1.fna&oh=00_AT-Ii_M_AAN_4M-ZQIFZ71xx7_HyUb-smZgQ6M5buGaZWw&oe=61BFF64C",
  "likesCount": 17903,
  "sharesCount": 4020,
  "commentsCount": 4259,
  "followerCount": 13278612,
  "thumbnailUrl": null,
  "comments": [
    {
      "authorId": "4d9f311f39e08536743b97d4b19fffd81816560266656d9500079cd8e896b8aa3fbc0c95f0fbd39fe4ebaba6aa2904b4d7b3d1fe1f6807d736ea3b7fcddfb1fd",
      "authorProfile": null,
      "author": null,
      "dateCreated": "2021-12-13T21:36:32.000Z",
      "text": "I am disappointed that Dr. Fauci Has not been named person of the year. The way he fights to keep people well, manoeuvres between so many politicians, insurance companies and other special interest groups, shows great leadership. I guess he does not tweet enough? TIME Mag: you disappoint!!!"
    },
    {
      "authorId": "653505145",
      "authorProfile": "https://www.facebook.com/katia.abinader.3",
      "author": "Katia Abinader",
      "dateCreated": "2021-12-13T13:49:46.000Z",
      "text": "Hope he somehow understand that he has to pay his taxes.  Hope also that he remembers he was once bailed out by the Government.   They gave him some breathing room for his business.   He should pay back now to help others.  Let’s hope he will give that 6 Billions he promissed the UN to alleviate poverty."
    },
    {
      "authorId": "100050528197919",
      "authorProfile": "https://www.facebook.com/oliviamblack",
      "author": "Olivia Black",
      "dateCreated": "2021-12-13T16:42:06.000Z",
      "text": "This represents everything wrong with the world. He’s done nothing for humanity. Disappointed in Time."
    },
    {
      "authorId": "8c1362aa708da18c3e031887d2fa5df3f7427f9433eecae26323da3cd20c1c034877abf68ed4f3537699d48e9892bfda3ad74e15b9d8ea7200deb2418e726857",
      "authorProfile": null,
      "author": null,
      "dateCreated": "2021-12-13T16:40:01.000Z",
      "text": "He deserves it"
    }
'''

Limitations

  • No login support.
  • Does not scrape comment replies yet, only comments.
  • The "About" page can't be accessed publicly.
  • No content, stats, or comments for live stream posts.

Personal data

We do not consider scraping vast amounts of personal data ethical and discourage anyone from doing so. Facebook Comments Scraper does not scrape personal data from profiles, including emails, addresses, phone numbers, etc. Personal data is protected by GDPR in the European Union and other laws and regulations around the world. You should not scrape it unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers. Please read our blog post about creating ethical and compliant scrapers if you would like to learn more.