Facebook Comments Scraper avatar

Facebook Comments Scraper

Pricing

from $0.40 / 1,000 facebook comments

Go to Apify Store
Facebook Comments Scraper

Facebook Comments Scraper

Extract Facebook comments from any post, page, or group. Download hundreds of comments with user data and engagement metrics in JSON, CSV, or Excel format.

Pricing

from $0.40 / 1,000 facebook comments

Rating

5.0

(2)

Developer

DataVoyantLab

DataVoyantLab

Maintained by Community

Actor stats

12

Bookmarked

692

Total users

1

Monthly active users

4 days ago

Last modified

Share

Facebook Comments Scraper

The Facebook Comments Scraper is a powerful tool designed to help you easily collect comments from any Facebook post, whether it's from accounts, public pages, group posts, or videos.

What Does It Extract?

Get comprehensive details such as comment text, author information, timestamps, like counts, number of replies, and more.

Example Output Data

Here’s a sample of the structured output data you can expect:

{
"id": "847615209483751_392847561234567",
"created_at": 1729892140,
"message": "We need to invest in renewable energy and sustainable infrastructure to create jobs and protect our environment for future generations. The time for action is now!",
"url": "https://www.facebook.com/nytimes/posts/pfbid03KmLqPw8nVt5gXjDs9YrNmE4hF3vQ7RwBp4m2WSt8k9uLxMv86ZnTcPdhRxNzLt4xl?comment_id=392847561234567",
"comment_count": 12,
"reaction_count": "45",
"attachments": [],
"text_entities": [],
"is_post_author": false,
"author": {
"id": "856923441",
"is_verified": false,
"name": "Sarah Chen",
"gender": "FEMALE",
"profile_url": "https://www.facebook.com/sarahchen2024",
"profile_image_url": "https://scontent-atl3-1.xx.fbcdn.net/v/t39.30808-1/384756291_10162830467892345_2947583691234567891_n.jpg?stp=cp0_dst-jpg_s32x32&_nc_cat=104&ccb=1-7&_nc_sid=50d2ac&_nc_ohc=Yx8nKpL2MYAQ7kPwrT9TCCg&_nc_ht=scontent-atl3-1.xx&_nc_gid=B-KWj4Ydz8f3H1XkwyZfsTU&oh=00_AYBMktsp1p4ZbcdqBUr2kwl9T5K8gH1vF82hdk22z48SQQ&oe=6721DF8C",
"short_name": "Sarah",
"work_info": null
}
}

How to Use the Facebook Comments Scraper

To use the Facebook Comments Scraper, you need to provide the following inputs:

  1. Facebook Post URL: Provide the URL of the post you want to scrape comments from.

    • Example: https://www.facebook.com/natgeo/posts/pfbid02stjvzcsfWYcQ9EVhNuCdSRnFCKwmJdi5rE9RFPwMoLbpH4uj8mNUBTbS6QCH7eYDl
  2. Cookies (optional): Passing cookies allows access to more comments and posts. To obtain cookies:

    • Install the Cookie-Editor Chrome extension.
    • Log in to your Facebook account, open the extension, and export the Facebook cookies in JSON format.
  3. Maximum Number of Items: Set a limit on the number of comments to scrape. Leave it empty to scrape all comments.

  4. Sort Type: Choose how the comments should be sorted (most relevant, newest, or all comments).

  5. Min and Max Delay: Specify the minimum and maximum delay between requests to avoid getting blocked.

  6. Proxy Configuration: Use a proxy that matches your Facebook account’s location to avoid detection.

  7. Include replies (include_replies, default false): Optionally fetch sub-comments as separate rows. Existing inputs continue to return top-level comments only. With replies enabled, rows include parent_comment_id and root_comment_id; top-level rows have a null parent. The selected sort order applies to top-level comments, followed by each comment's accessible replies in Facebook's reply order.

max_items and the Free-plan 100-row limit count comments and replies together. Under pay-per-event pricing, every delivered reply is one default dataset item at the same price as a comment; there is no extra reply event. Rental runs retain their existing pricing behavior. The Store pricing panel is authoritative.

The existing API-only output_mode: "raw" is retained. With replies enabled, relationship fields appear under _scraper alongside each original edge; with replies disabled, raw edges are unchanged.

Reliability and run outcomes

The Actor reuses its HTTP session, validates Facebook responses, limits transient retries, and avoids delivering the same comment twice within a run or resumed run. RUN_SUMMARY in the run's key-value store distinguishes completed, valid-empty, item-limited, budget-limited and failed/partial results. Facebook can restrict comments or replies even when a displayed count is higher; that count does not guarantee that all records are accessible.

Checkpointed runs resume their current post and sorting mode. Changing the post, sorting mode, output mode, cookies or reply setting requires a new run. If delivery is marked uncertain, reconcile the dataset and billing before restarting; the Actor will not automatically replay a potentially delivered batch.

Free Plan

Free-plan runs can return up to 100 comments. Paid users can control the result limit with the Maximum Number of Items input.