Facebook Comments Scraper avatar

Facebook Comments Scraper

Pricing

$19.99/month + usage

Go to Apify Store
Facebook Comments Scraper

Facebook Comments Scraper

💬 Facebook Comments Scraper (facebook-comments-scraper) extracts comments from public posts—text, author, time, reactions & replies. 📥 Export CSV/JSON. 📊 Perfect for social listening, sentiment analysis & community management. ⚡ Fast, reliable, scalable.

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

Scraply

Scraply

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

17 hours ago

Last modified

Share

Facebook Comments Scraper

The Facebook Comments Scraper is a fast, reliable Facebook comments extractor that collects structured comment threads (including replies) from public Facebook posts and videos. It solves the manual, time‑consuming task of harvesting comments by automating extraction of text, author, timestamps, likes, and nested replies. Built for marketers, developers, data analysts, and researchers, this FB comments scraper lets you scrape Facebook post comments at scale and export results to CSV/JSON for analysis and reporting.

What data / output can you get?

Below are real output fields pushed to the Apify dataset for each processed post URL and its comments. Fields reflect exactly what the actor saves.

Data fieldDescriptionExample value
full_urlThe full Facebook post or video URL for the commenthttps://www.facebook.com/SomePage/posts/1234567890
url_keyShort identifier derived from the URL (last path segment)1234567890
textComment text content“This is awesome!”
profileNameDisplay name of the comment author“Jane Doe”
profileIdInternal Facebook profile ID of the author“100012345678901”
profileUrlPublic profile URL of the author (if available)https://www.facebook.com/jane.doe
profilePictureURL of the author’s profile image (if available)https://scontent.xx.fbcdn.net/...jpg
dateISO 8601 timestamp of when the comment was created (UTC)2026-03-28T11:02:15+00:00
likesCountNumber of reactions/likes on the comment (string)“12”
commentsCountNumber of direct replies to this comment3
replyArray of nested reply objects with the same structure as comments[ { …reply object… } ]
idInternal GraphQL comment node ID“9876543210”
facebookIdLegacy FBID for the comment (if present)“1234567890123456”
commentUrlDirect URL to the comment node (if available)https://www.facebook.com/.../comment_id=9876543210
feedbackIdFeedback node ID used for GraphQL pagination“ZmVlZGJhY2s...”
expansionTokenToken used to fetch replies (present when replies are available)“AQ5…”
pageAdLibraryBusiness page metadata for ad library (if present){“is_business_page_active”: true, “id”: “1122334455”}
facebookUrlSource URL for the comment thread (same as full_url)https://www.facebook.com/SomePage/posts/1234567890
inputUrlSame as facebookUrl, passed through formatterhttps://www.facebook.com/SomePage/posts/1234567890
errorError message for the post when extraction fails“Failed to extract doc_id or feedback_id”

Notes:

  • Replies in the reply array contain the same fields as top‑level comments (text, profileName, date, likesCount, etc.).
  • On failure, the actor stores an item with url_key, full_url, error, and comments: [].
  • You can export results to CSV or JSON directly from the Apify dataset.

Key features

  • ⚡ Bold residential proxy enforcement
    Always uses Apify Residential proxy automatically to avoid Facebook blocking. The actor ignores proxyConfiguration input and will stop if residential proxies aren’t available on your plan.

  • 💬 Comments + Replies extraction
    Collects top-level comments and nested replies when available, including text, author, timestamp, likes, and reply threading.

  • 🧵 Smart reply fetching
    Uses expansionToken and feedbackId to fetch replies via GraphQL. Control depth with maxRepliesPerComment, including support for “ALL” to retrieve all replies.

  • 🧮 Sort controls for analysis
    Choose commentsSortOrder: most_relevant, newest, or all (original order) to support both relevance- and recency-based workflows.

  • 📦 Bulk URL processing
    Paste multiple Facebook post/video URLs and process them in a single run for efficient batch collection.

  • 🔁 Resilient retries & pagination
    Built-in backoff, cursor-based pagination, and batched reply fetching help maintain stability at scale.

  • 💾 Easy data export
    Download structured results and export Facebook comments to CSV or JSON for BI tools, dashboards, and research.

  • 👨‍💻 Developer friendly structure
    Clean, predictable JSON with stable keys like text, profileName, likesCount, commentsCount, and reply arrays — ideal for pipelines and automation.

How to use Facebook Comments Scraper - step by step

  1. Sign in to Apify
    Create or log in to your Apify account.

  2. Open the actor
    Find and open the “facebook-comments-scraper” actor in the Apify Console.

  3. Add your input URLs
    In startUrls, paste one or more Facebook post/video URLs to scrape comments from. The input accepts a simple list of strings.

  4. Configure limits and order

    • maxComments: Set the maximum comments per post.
    • maxRepliesPerComment: Set the number of replies to fetch per comment (use a high number for more; “ALL” is supported).
    • commentsSortOrder: Choose most_relevant, newest, or all.
  5. Proxy behavior
    The actor ignores proxyConfiguration and always uses a Residential proxy automatically. Ensure your Apify plan includes residential proxies; otherwise, the run will stop with a proxy setup error.

  6. Start the run
    Click Start. The scraper loads each post, paginates comments, and fetches replies where available. Progress logs will show counts as it collects data.

  7. Review and download results
    Go to the Dataset (OUTPUT) tab to preview records and Download as CSV or JSON for further analysis.

Pro Tip: For complete discussion threads, set maxRepliesPerComment to “ALL” to fetch every available reply under each comment.

Use cases

Use caseDescription
Social listening & sentiment analysisMonitor and analyze audience reactions by collecting structured comment text, authors, and timestamps from public posts.
Community management insightsExport Facebook comments to CSV to identify frequently asked questions and top-engaged commenters for response prioritization.
Campaign performance reviewCompare most_relevant vs newest threads to understand how engagement evolves over time on post campaigns.
Competitive researchCollect comments from Facebook posts across competitors’ pages to study audience feedback patterns.
Academic & policy researchScrape Facebook post comments to build datasets for qualitative and quantitative analysis in research projects.
Data engineering pipelineFeed structured JSON (text, author, likes, replies) into automated ETL pipelines for dashboards and NLP workflows.

Why choose Facebook Comments Scraper?

Built for precision, automation, and reliable scale, this Facebook comment scraper tool emphasizes stability and clean, structured output.

  • ✅ Accurate, structured threads: Captures text, author, timestamps, likes, and nested replies in clean JSON.
  • 🌍 Public-only access: Works without login, focusing on publicly available posts and videos.
  • 📈 Scales to batches: Process multiple URLs with resilient pagination and batched reply fetching.
  • 👩‍💻 Developer-ready: Consistent field names and reply arrays for easy parsing in downstream apps.
  • 🛡️ Residential proxy by default: Minimizes blocking and improves throughput on Facebook endpoints.
  • 💰 Efficient operations: Export to CSV/JSON for direct use in BI tools — no extra transformations required.
  • 🧩 Better than extensions: Avoid brittle browser extensions and unstable automation by using a production-grade backend scraper.

In short, it’s a reliable Facebook comment crawler for teams that need consistent, automation-ready data at scale.

Yes — when used responsibly. This Facebook comments data scraper only targets publicly available posts and does not access private or authenticated data.

Guidelines for compliant use:

  • Scrape only publicly visible content and avoid private profiles or gated pages.
  • Follow Facebook’s Terms of Service and respect rate limits and platform rules.
  • Ensure compliance with data protection laws (e.g., GDPR, CCPA) in your jurisdiction.
  • Use the data responsibly and avoid spam or misuse.
  • Consult your legal team for edge cases specific to your use case.

Input parameters & output format

Example JSON input

{
"startUrls": [
"https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"
],
"maxComments": 20,
"maxRepliesPerComment": 5,
"commentsSortOrder": "all",
"proxyConfiguration": {
"useApifyProxy": false
}
}

Parameter reference (from the actor’s input schema):

  • startUrls (array) — Paste one or more Facebook post/video URLs to scrape comments from. Required: Yes. Default: —
  • maxComments (integer) — Maximum comments to fetch per post. Required: No. Default: 20
  • maxRepliesPerComment (integer) — Max replies per comment (use a high number to fetch all). Required: No. Default: 2
  • commentsSortOrder (string) — How to order comments: most_relevant, newest, or original order. Enum: most_relevant | newest | all. Required: No. Default: all
  • proxyConfiguration (object) — Ignored. Actor always uses residential proxy automatically. Required: No. Default: (prefill useApifyProxy: false)

Behavior notes from source code:

  • The scraper always uses Apify Residential proxies and ignores proxyConfiguration.
  • For replies, you can pass “ALL” in maxRepliesPerComment to collect every available reply.

Example JSON output

A successful comment record (with a nested reply) looks like:

{
"facebookUrl": "https://www.facebook.com/SomePage/posts/1234567890",
"commentUrl": "https://www.facebook.com/SomePage/posts/1234567890?comment_id=9876543210",
"id": "9876543210",
"feedbackId": "ZmVlZGJhY2sAbCdEfGhIjKlMnOp",
"date": "2026-03-28T11:02:15+00:00",
"text": "This is awesome!",
"profilePicture": "https://scontent.xx.fbcdn.net/v/t1.0-1/....jpg",
"profileId": "100012345678901",
"profileName": "Jane Doe",
"likesCount": "12",
"commentsCount": 1,
"reply": [
{
"facebookUrl": "https://www.facebook.com/SomePage/posts/1234567890",
"commentUrl": "https://www.facebook.com/SomePage/posts/1234567890?comment_id=1122334455",
"id": "1122334455",
"feedbackId": "ZmVlZGJhY2sRePlYzX",
"date": "2026-03-28T11:05:31+00:00",
"text": "Agree!",
"profilePicture": "https://scontent.xx.fbcdn.net/v/t1.0-1/....jpg",
"profileId": "100009876543210",
"profileName": "John Smith",
"likesCount": "3",
"commentsCount": 0,
"reply": [],
"threadingDepth": 1,
"facebookId": "1234567890123999",
"inputUrl": "https://www.facebook.com/SomePage/posts/1234567890"
}
],
"threadingDepth": 0,
"facebookId": "1234567890123456",
"inputUrl": "https://www.facebook.com/SomePage/posts/1234567890",
"expansionToken": "AQ5exampleToken",
"profileUrl": "https://www.facebook.com/jane.doe",
"pageAdLibrary": {
"is_business_page_active": true,
"id": "1122334455"
},
"url_key": "1234567890",
"full_url": "https://www.facebook.com/SomePage/posts/1234567890"
}

An error record (when a post cannot be processed) looks like:

{
"url_key": "1234567890",
"full_url": "https://www.facebook.com/SomePage/posts/1234567890",
"error": "Failed to extract doc_id or feedback_id",
"comments": []
}

Notes:

  • likesCount is stored as a string.
  • reply arrays hold comment objects with the same structure as top-level comments.

FAQ

Do I need to log in to scrape comments?

No. The Facebook comments parser works on publicly available posts and videos without login or cookies. It uses residential proxies to reduce blocking.

Can it collect nested replies under comments?

Yes. The automated Facebook comments scraper fetches replies when available using expansionToken and feedbackId. Control depth with maxRepliesPerComment or set it to “ALL” to retrieve every available reply.

How many comments can I extract per post?

You control the limit with maxComments. The default is 20 according to the input schema. Increase this value to collect more comments per post.

What sort orders are supported?

You can sort comments by most_relevant, newest, or all (original order). Choose the mode that best fits your analysis workflow.

Which URL types are supported?

You can collect comments from public Facebook posts and videos. Provide one or more post/video URLs in startUrls.

What formats can I download?

You can download and export Facebook comments to CSV or JSON directly from the Apify dataset after the run finishes.

How does proxying work?

The Facebook comment scraper tool always uses Apify Residential proxies and ignores proxyConfiguration input. If residential proxies aren’t available on your plan, the run will stop with a proxy setup error.

Is there a trial available?

Yes. This actor listing includes trial minutes (e.g., 120 minutes) so you can test before subscribing. Check the actor page for current trial availability.

What happens if a post fails to scrape?

If a post fails, the dataset gets an item with error, url_key, full_url, and comments: [] so you can identify and handle failures downstream.

Closing CTA / Final thoughts

The Facebook Comments Scraper is built to collect comments and replies from public Facebook posts at scale with clean, structured output. It helps marketers, researchers, analysts, and developers scrape Facebook post comments reliably, apply sorting, and export to CSV/JSON for downstream workflows. Developers benefit from consistent field names and nested reply arrays that simplify parsing and automation. Start extracting smarter, analysis‑ready Facebook comment data with a production‑grade, residential‑proxy powered scraper today.