π¬π€ Facebook Comments Scraper with Replies + AI
Pricing
$19.99/month + usage
π¬π€ Facebook Comments Scraper with Replies + AI
π¬ Facebook Comments Scraper extracts post comments at scaleβtext, authors, timestamps, reactions, and threaded replies. βοΈ Export CSV/JSON for analytics, sentiment, and reporting. π Ideal for social listening, CX, and research. β Use on public or authorized data.
Pricing
$19.99/month + usage
Rating
0.0
(0)
Developer
Scraper Engine
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
0
Monthly active users
17 hours ago
Last modified
Categories
Share
Facebook Comments Scraper β Replies, Reactions and AI Data
Facebook Comments Scraper with Replies + AI pulls every public comment and reply from a Facebook post, photo, reel, or video URL and returns each as its own structured JSON row, complete with a like/love/haha/wow/sad/angry/care reaction breakdown, verified-author flags, and optional AI-generated sentiment, language, topic, spam, and lead-score fields. No Facebook login is required. Paste a post URL below and run a small test to see the output shape before scaling up.
What is Facebook Comments Scraper with Replies + AI?
Facebook Comments Scraper with Replies + AI is an Apify Actor that reads the comment thread under a public Facebook post, photo, reel, or video and returns every top-level comment and every nested reply as a typed JSON row β no HTML parsing required. It does not need a Facebook account, password, or session cookie; it reads the same public GraphQL responses a logged-out browser would receive, routed through Apify's residential proxy. It's built for social listening teams, community managers, growth marketers doing lead scoring on comment authors, and AI/data engineers who want clean comment text feeding a RAG pipeline or sentiment dashboard.
What Facebook comment data is publicly available to scrape?
Anyone who opens a public Facebook post can see its comments, replies, reaction counts, and commenter names without logging in β that is exactly what this Actor reads.
| Data Category | Publicly Available | Restricted (private profile / login) |
|---|---|---|
| Comment and reply text | Yes | β |
| Commenter display name, profile URL, verified badge | Yes | β |
| Reaction counts and per-type breakdown | Yes | β |
| Reply counts, share counts on a comment | Yes | β |
| Attachments (images, GIFs, shared links) and @mentions | Yes | β |
| Comments from an author with a private profile | β | Hidden from public view, so not scraped |
| Direct messages or comments inside closed/private groups | β | Never public, not accessible |
Facebook Comments Scraper with Replies + AI only returns publicly visible data β what any visitor sees. Nothing behind a login wall.
What data can I extract with Facebook Comments Scraper with Replies + AI?
Every dataset row is a single comment or reply carrying identity fields, engagement metrics, thread position, and β when AI enrichment is on β five AI-generated fields.
Identity and content fields
| Field | Description |
|---|---|
id | Facebook's opaque comment/reply ID (base64-encoded). |
feedbackId | ID of the comment's feedback object, used internally for reply pagination. |
type | comment for top-level comments, reply for nested replies. |
isReply | true for reply rows, false for top-level comments. |
text | The comment or reply body text. |
profileName | Commenter's display name. |
authorId / profileId | Commenter's Facebook user or Page ID. |
authorUrl / profileUrl | Link to the commenter's public profile (present when Facebook exposes it). |
profilePicture | URL of the commenter's profile picture. |
commentUrl | Deep link straight to the comment on Facebook. |
facebookUrl / inputUrl | The source post URL you submitted. |
postId | The post identifier taken from the submitted URL's last path segment. |
Engagement and metric fields
| Field | Description |
|---|---|
likesCount | Total reaction count on the comment (string). |
reactionsBreakdown | Object with like, love, haha, wow, sad, angry, care counts. |
commentsCount | Number of replies Facebook reports under this comment. |
sharesCount | Share count on the comment, when Facebook exposes one. |
isVerified | true if the commenter has a verified badge. |
repliesHasMore | true when Facebook reports more replies than this run fetched (top-level comments only). |
threadingDepth | Facebook's own nesting depth for the raw comment node. |
depth | The Actor's fetch depth for a reply (1 = direct reply, up to maxReplyDepth). |
Thread, media and AI fields
| Field | Description |
|---|---|
replyToId / parentId | ID of the comment this reply belongs to (reply rows only). |
topCommentId | ID of the top-level comment that started the thread (reply rows only). |
publishedAt / date | ISO-8601 UTC timestamp the comment was posted. |
scrapedAt | ISO-8601 UTC timestamp of the scrape. |
attachments | Array of image/GIF/sticker/link attachments on the comment. |
mentions | Array of @-tagged users found in the comment text. |
pageAdLibrary | { is_business_page_active, id } β present when the post's Page is in Meta's Ad Library. |
reply | Nested array of reply objects (only populated when commentSettings.emitRepliesAsSeparateRows is off). |
aiSentiment | positive / neutral / negative β only when aiEnhancement is on. |
aiLanguage | ISO 639-1 language code β only when aiEnhancement is on. |
aiTopics | Array of 1β3 short topic keywords β only when aiEnhancement is on. |
aiIsSpam | Boolean spam flag β only when aiEnhancement is on. |
aiLeadScore | Integer 0β100 buying-intent estimate β only when aiEnhancement is on. |
π€ Add-on: Need additional Facebook data?
Pair this Actor with Facebook Ads Library Scraper Plus to pull the ad creatives and AI-analyzed ad copy behind the same Page, or use it alongside YouTube Comments Scraper with Replies and Instagram Tagged Posts Scraper Plus to build a cross-platform comment dataset for the same brand or creator.
How does Facebook Comments Scraper with Replies + AI differ from the official Facebook API?
Meta's Graph API can read comments, but Meta's own developer documentation states that reading them may require the Page Public Content Access feature permission and, for some fields and actions, pages_read_engagement and/or pages_read_user_content permissions tied to a reviewed app and access token (Facebook Graph API reference, as observed on 2026-07-26). Facebook Comments Scraper with Replies + AI only needs a public post URL.
| Feature | Facebook Graph API | Facebook Comments Scraper with Replies + AI |
|---|---|---|
| Access requirement | Access token + feature permission (Page Public Content Access) | Public post/photo/reel/video URL only |
| App review | Reading engagement/user content typically needs app permissions Meta grants after review | None β no Meta app or review process involved |
| Scope | Best suited to Pages and posts your app is permitted to read | Any public post, photo, reel, or video URL you paste |
| Reply threading | Comments and replies fetched via separate connections/edges | Replies flattened into rows with replyToId, topCommentId, and depth automatically |
| Rate limiting | Meta's documented error codes describe throttling on excessive calls | The Actor paginates with retry/backoff (see below); no separate developer quota to manage |
| Sentiment/lead scoring | Not provided by the Graph API | Optional aiSentiment, aiTopics, aiIsSpam, aiLeadScore per row |
Use the Graph API when you own the Page and want a first-party, token-authenticated integration. Use Facebook Comments Scraper with Replies + AI when you need comments and replies from any public post β including posts you don't own β without an app review process.
How to use Facebook Comments Scraper with Replies + AI
Facebook Comments Scraper with Replies + AI runs on the Apify platform β there is no separate signup or API key to obtain before your first run.
- Open the Actor's page in the Apify Store and click Try for free (or Start) to open the input form.
- Paste at least one Facebook post, photo, reel, or video URL into
startUrlsβ this is the only required input. - Optionally tune
commentSettings(comment/reply caps, reply depth, sort order) and the filters βsearchKeywords,excludeKeywords,minLikes,authorNameContains,onlyCommentsOlderThan. - Click Start to launch the run.
- Open the Storage tab once the run finishes and export the dataset as JSON, CSV, or another format the Apify platform supports.
How to scale to bulk comment extraction
startUrls is an array β paste one URL per line (bulk paste from a spreadsheet works) and every URL is processed in the same run, each capped independently by commentSettings.maxComments. There is no separate "batch" input: a run with 20 URLs simply loops over all 20, fetching top-level comments and, when commentSettings.includeReplies is on, their replies for each post in turn. For very large URL lists, splitting across a few runs keeps individual run logs easier to follow, but a single run with all URLs works the same way.
What can you do with Facebook comment data?
- A social listening analyst monitoring a product launch uses
reactionsBreakdownandaiSentimentto see whether a post's reactions skew towardlove/hahaor towardangry/sadbefore deciding to boost the post. - A community manager doing brand-safety review uses
aiIsSpamandmentionsto flag comments pushing unrelated links or tagging bait accounts for removal. - A growth marketer running comment-based lead generation uses
aiLeadScoretogether withauthorUrlto shortlist commenters worth a direct follow-up. - A researcher studying how conversations unfold uses
isReply,replyToId,topCommentId, anddepthto reconstruct full reply trees for a sample of posts. - An AI engineer feeds
text,aiTopics, andaiSentimentstraight into a RAG index or an LLM agent's context window β the fields arrive as typed JSON, so no HTML scraping or regex cleanup is needed before indexing.
How does Facebook Comments Scraper with Replies + AI handle rate limits and blocking?
The Actor always attaches an Apify residential proxy for every request to facebook.com β it ignores the user's proxyConfiguration choice for this because Facebook blocks most datacenter IPs; the field is shown in the input form for transparency only. Comment and reply GraphQL requests are retried up to 3 times on connection or HTTP errors, with the delay growing between attempts. The internal ID-extraction step (reading doc_id and feedback_id out of the post's HTML and JS bundles) uses its own exponential backoff, capped at a maximum delay, before giving up. If a single post's comments can't be loaded β for example the URL is invalid or the extraction fails β the Actor logs the failure, pushes one error-typed row for that URL, and continues on to the next URL in startUrls rather than stopping the whole run. If proxy setup itself fails (for example, the Apify plan lacks residential proxy access), the run stops and logs an error before scraping starts.
β¬οΈ Input
| Parameter | Required | Type | Description | Example Value |
|---|---|---|---|---|
startUrls | Yes | array | Facebook post, photo, reel, or video URLs β one per line. | ["https://www.facebook.com/humansofnewyork/posts/..."] |
commentSettings | No | object | Groups the comment/reply tuning fields below into one collapsible panel. | see nested fields |
commentSettings.maxComments | No | integer | Max top-level comments per URL; replies do not count against this cap. Default 10. | 25 |
commentSettings.includeReplies | No | boolean | Fetch replies for each comment. Default true. | true |
commentSettings.maxRepliesPerComment | No | integer | Replies to fetch per comment across all depths; 0 = unlimited. Default 3. | 5 |
commentSettings.maxReplyDepth | No | integer (1β3) | How many reply-to-reply levels to follow. Default 1. | 2 |
commentSettings.emitRepliesAsSeparateRows | No | boolean | Emit each reply as its own dataset row (true) or nest replies under the parent comment's reply array (false). Default true. | true |
commentSettings.commentsSortOrder | No | string enum | Order of top-level comments before maxComments is applied β most_relevant, newest, or all. Default all. | "newest" |
searchKeywords | No | array | Keep only comments/replies containing at least one of these words/phrases (case-insensitive). Empty = keep everything. | ["love", "amazing"] |
excludeKeywords | No | array | Drop any comment/reply containing any of these words/phrases. | ["spam", "http"] |
minLikes | No | integer | Minimum reaction count to keep a comment/reply. Default 0. | 5 |
authorNameContains | No | string | Keep only comments/replies whose author display name contains this text. | "Sarah" |
onlyCommentsOlderThan | No | string (date) | Keep only comments/replies published before this absolute (2024-01-15) or relative (2 weeks) point. | "3 months" |
aiEnhancement | No | boolean | Turn on AI enrichment (aiSentiment, aiLanguage, aiTopics, aiIsSpam, aiLeadScore). Requires an API key. Default false. | true |
aiModel | No | string enum | AI model; provider is auto-detected from the prefix (claude-*, gpt-*/o1/o3, gemini-*, grok-*, deepseek-*, sonar*, mistral-*). Default "claude-haiku-4-5". | "claude-haiku-4-5" |
aiApiKey | No | string (secret) | Your API key for the detected provider. Falls back to the matching environment variable (e.g. ANTHROPIC_API_KEY) if left blank. | "sk-ant-..." |
proxyConfiguration | No | object | Shown for transparency; the Actor always uses Apify residential proxy for Facebook regardless of this setting. | { "useApifyProxy": false } |
Example input
{"startUrls": ["https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl"],"commentSettings": {"maxComments": 25,"includeReplies": true,"maxRepliesPerComment": 5,"maxReplyDepth": 2,"emitRepliesAsSeparateRows": true,"commentsSortOrder": "most_relevant"},"searchKeywords": [],"excludeKeywords": ["spam", "http"],"minLikes": 0,"authorNameContains": "","onlyCommentsOlderThan": "","aiEnhancement": true,"aiModel": "claude-haiku-4-5","aiApiKey": "","proxyConfiguration": { "useApifyProxy": false }}
β¬οΈ Output
Each run writes one typed JSON row per comment and per reply to the default dataset, with the same field names on every row regardless of how many posts you scraped. Export the dataset in any format the Apify platform supports (JSON, CSV, and others) from the Storage tab. When commentSettings.emitRepliesAsSeparateRows and commentSettings.includeReplies are both on, reply rows are additionally mirrored into a per-run dataset named replies-<runId> for convenience.
Example output
{"facebookUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl","commentUrl": "https://www.facebook.com/humansofnewyork/posts/pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl?comment_id=1194873218466522","id": "Y29tbWVudDoxMTk0ODczMjE4NDY2NTIyXzE5NTgyMzQ2MTIzNDU2Nw==","feedbackId": "ZmVlZGJhY2s6MTE5NDg3MzIxODQ2NjUyMg==","type": "comment","isReply": false,"date": "2026-06-12T14:22:05Z","publishedAt": "2026-06-12T14:22:05Z","text": "This story hit different today. Thank you for sharing it.","profileName": "Dana Whitfield","profileId": "pfbid02abc123def456","authorId": "pfbid02abc123def456","authorUrl": "https://www.facebook.com/dana.whitfield.90","profilePicture": "https://scontent.xx.fbcdn.net/v/t39.30808-1/example.jpg","isVerified": false,"likesCount": "142","reactionsBreakdown": { "like": 98, "love": 32, "haha": 0, "wow": 6, "sad": 4, "angry": 0, "care": 2 },"sharesCount": 0,"commentsCount": 3,"repliesHasMore": false,"attachments": [],"mentions": [],"threadingDepth": 0,"facebookId": "1194873218466522","postId": "pfbid0BbKbkisExKGSKuhee9a7i86RwRuMKFC8NSkKStB7CsM3uXJuAAfZLrkcJMXxhH4Yl","scrapedAt": "2026-07-26T09:41:03Z","aiSentiment": "positive","aiLanguage": "en","aiTopics": ["gratitude", "storytelling"],"aiIsSpam": false,"aiLeadScore": 5}
π How does it work?
Facebook Comments Scraper with Replies + AI loads the post's HTML page and the JavaScript bundles it references, through Apify's residential proxy, and extracts the two internal identifiers (doc_id and feedback_id) Facebook's own front end uses to page through comments. It then replays the same GraphQL POST requests a logged-out browser sends β CommentsListComponentsPaginationQuery for top-level comments and Depth1CommentsListPaginationQuery for replies β following each response's cursor until enough comments pass your filters or the thread runs out. No login, cookies, or session state are used at any point, so only what a logged-out visitor could already see is returned. Because the Actor normalizes every raw Facebook node into the same field set in its own code, the dataset schema you get stays stable even if Facebook changes its page layout or internal query names.
π Integrations
Facebook Comments Scraper with Replies + AI runs on the Apify platform, so it works with everything Apify already connects to.
Calling Facebook Comments Scraper with Replies + AI programmatically
from apify_client import ApifyClientclient = ApifyClient("<APIFY_API_TOKEN>")run = client.actor("facebook-comments-scraper-with-replies-ai").call(run_input={"startUrls": ["https://www.facebook.com/humansofnewyork/posts/..."],"commentSettings": {"maxComments": 25, "includeReplies": True},})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["text"], item["reactionsBreakdown"])
Works in Go, Ruby, Node.js, cURL β any language that can make an HTTP request.
MCP integration for AI agents
Apify's hosted MCP server exposes any Actor as a callable tool. Register it by pointing an MCP-compatible client (Claude, Cursor, and other MCP clients) at https://mcp.apify.com?tools=<your-username>/facebook-comments-scraper-with-replies-ai, authenticated with your Apify API token, or run apify mcp install <client> --tools <your-username>/facebook-comments-scraper-with-replies-ai from the Apify CLI.
No-code tools (n8n, Make, LangChain)
In n8n, use the HTTP Request node against the Actor's run-sync-get-dataset-items endpoint with your Apify token, or the dedicated Apify node if installed. In Make, Apify's own app module lets you trigger a run and map dataset items straight into your scenario. In LangChain or similar agent frameworks, wrap the same apify-client call shown above as a tool function so an agent can request comment data mid-conversation.
Is it legal to scrape Facebook comments and replies?
Scraping publicly visible data, such as public Facebook comments, is generally lawful in most jurisdictions β this Actor only ever returns comments and replies a logged-out visitor could already see on the post. Because comment text is tied to a named author, profile URL, and profile picture, it counts as personal data under regimes like GDPR and CCPA, so you need a lawful basis before storing or processing it at scale, and you must still follow Meta's Terms of Service for how you use the data. Consult legal counsel if your use case involves bulk storage of personal data.
β Frequently asked questions
What Facebook comment fields does Facebook Comments Scraper with Replies + AI return?
The top fields are text, profileName, likesCount, reactionsBreakdown, and publishedAt β see the full breakdown in What data can I extract above, including the optional aiSentiment and aiLeadScore fields.
Does Facebook Comments Scraper with Replies + AI require a Facebook account or login?
No. The Actor reads the same public GraphQL responses a logged-out browser receives and never authenticates with a Facebook account, cookie, or session.
How many comments can I extract in one run?
commentSettings.maxComments sets the top-level comment cap per URL (default 10, no upper limit enforced by the schema), and commentSettings.maxRepliesPerComment sets how many replies are additionally fetched per comment (0 for unlimited). Both apply per URL, and startUrls can hold multiple URLs in one run.
What happens if a post's comments can't be loaded?
If the Actor can't extract the internal doc_id/feedback_id identifiers for a URL β for example an invalid or inaccessible link β it logs the failure, writes a single row with type: "error" and the failure reason for that URL, and moves on to the next URL in startUrls instead of stopping the run.
Can I scrape multiple Facebook posts at once?
Yes. startUrls accepts an array of post, photo, reel, or video URLs, and every URL is processed within the same run, each with its own comment and reply caps.
Does Facebook Comments Scraper with Replies + AI work with Claude, ChatGPT, and other AI agent tools?
Yes. It's callable through Apify's hosted MCP server (see Integrations) for MCP-aware clients, and as a plain HTTP endpoint via the Apify API for any other agent framework.
How does Facebook Comments Scraper with Replies + AI compare to other Facebook comment scrapers?
As observed on the Apify Store on 2026-07-26, apify/facebook-comments-scraper advertises up to 2,000 free comments per run and export to JSON, CSV, Excel, XML, and HTML, but its own listing does not document a per-comment reaction breakdown or built-in AI enrichment. easyapi/facebook-post-comments-scraper's listing caps maxComments at 5,000 and relies on browser automation rather than direct API replay. Facebook Comments Scraper with Replies + AI adds a 7-reaction breakdown (reactionsBreakdown), reply-depth control up to 3 levels, and optional multi-provider AI enrichment (aiSentiment, aiTopics, aiIsSpam, aiLeadScore) that neither competitor's listing describes.
Does Facebook Comments Scraper with Replies + AI return data in a format LLMs can use directly?
Yes. Every row is typed, normalized JSON with the same field names across runs β no HTML parsing or CSS selectors involved β so it can be passed straight to an LLM prompt, indexed into a vector store, or handed to an agent tool call.
What happens when Facebook changes its layout or anti-bot system?
Facebook Comments Scraper with Replies + AI is actively maintained, and its output schema is designed to stay the same across Facebook UI or internal query-name changes because the Actor's own code β not Facebook's page structure β defines the field names in every row.
Can I use Facebook Comments Scraper with Replies + AI without managing proxies or browser infrastructure?
Yes. The Actor provisions and attaches Apify's residential proxy for every Facebook request automatically; you don't configure or pay for a separate proxy service.
Which fields work best for AI training data and RAG indexing?
For RAG, index text alongside aiTopics and aiSentiment for retrieval-relevant context. For structured training data, type, isReply, likesCount, reactionsBreakdown, and publishedAt return as consistently typed primitives across every row, comment or reply alike.
Related scrapers
| Scraper | What it extracts |
|---|---|
| Facebook Ads Library Scraper Plus | Facebook ad creatives, targeting details, and AI-analyzed ad copy |
| Instagram Tagged Posts Scraper Plus | Posts a profile is tagged in, with comments and media metadata |
| Instagram Followers β© Following β Mutuals & Fans | Follower/following lists with AI-enriched profile data |
| YouTube Comments Scraper with Replies | YouTube video comments and replies with AI sentiment |
Your feedback
Found a bug or a field that's missing from your data? Open an issue on this Actor's Issues tab on its Apify Store listing and the maintainer will take a look.
