Facebook Comment scraper avatar

Facebook Comment scraper

Pricing

from $2.50 / 1,000 results

Go to Apify Store
Facebook Comment scraper

Facebook Comment scraper

Facebook comment scraper that extracts commenter names and comment text from any public Facebook profile or Page, no login needed. Scrape recent posts, export to JSON/CSV/Excel, or send results straight to Notion, Slack, or Airtable.

Pricing

from $2.50 / 1,000 results

Rating

0.0

(0)

Developer

Techforce Global

Techforce Global

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

21 hours ago

Last modified

Share

Facebook Public Comment Tracker

Pull every comment off a Facebook profile or Page's recent posts — commenter name and comment text — without opening Facebook or copy-pasting a single thread.

Built for community managers, brand-safety teams, and researchers who need to know who is saying what on a Facebook profile's public posts, in a clean structured dataset instead of endless scrolling.

Paste a profile URL → scroll & collect its recent posts → pull every comment's author + text → export as JSON/CSV/Excel, or deliver straight into Notion, Slack, Jira, and more.


⭐ Why This Actor?

  • Just paste a profile or Page URL — no post-by-post link collecting, the Actor scrolls the timeline and finds recent posts itself.
  • Set how deep to gomaxPosts controls how many posts to scan, maxCommentsPerPost caps how many comments come back per post.
  • Expands hidden comments automatically — clicks through "View more comments" so you're not stuck with just the top 2–3 replies Facebook shows by default.
  • Works logged in or logged out — runs anonymously against public content by default, or with a saved Facebook login session (fb_state.json) for profiles that need one.
  • Clean output per comment — commenter name (comment_username) and comment text (comment_text) tied back to the post_url it came from.
  • Export-ready — JSON, CSV, or Excel straight from the Apify dataset, or pull it via the Apify API into your own pipeline.
  • Deliver anywhere via MCP connectors — push each post's comments straight into Notion, Slack, Jira, GitHub, Linear, Airtable, and more.

📝 Use Cases & ROI

Use CaseTime SavedWhat You Get
Brand & reputation monitoring2–4 hrs/profileEvery commenter and comment on a Page's recent posts, without manually opening each thread
Community management1–3 hrs/dayA structured feed of recent comments to triage, moderate, or respond to
Competitor & audience research3–5 hrs/profileWhat people are actually saying on a competitor's or influencer's posts
Sentiment & keyword mining2–4 hrs/batchRaw comment text ready to feed into sentiment analysis or keyword search

🚀 How to Use

  1. Open the Actor on Apify.
  2. Paste the Profile URL — a full Facebook profile or Page URL (e.g. https://www.facebook.com/zuck).
  3. Set Maximum posts — how many recent posts to scroll through and collect (default: 3).
  4. Set Maximum comments per post — how many comments to pull from each collected post (default: 20).
  5. (Optional, recommended for gated profiles) Run login.py once to open a real browser, log in manually, and save a session to src/fb_state.json. The Actor picks this up automatically on the next run instead of scraping logged out.
  6. (Optional) Pick an MCP connector to deliver each post's comments into Notion, Slack, Jira, etc.
  7. Click Run — the Actor opens the profile, scrolls to collect post URLs, then visits each post to expand and extract comments.
  8. Download results as JSON, CSV, or Excel from the dataset, or let the connector push them into your tools automatically.

🍪 Login session: Facebook shows more (and sometimes different) comments to logged-in sessions. If a profile's comments come back empty while logged out, generate fb_state.json with login.py and re-run. 🖥️ Headful by default: the browser currently launches with headless=True, since Facebook is markedly more likely to block a fully headless session.


🧩 Input Configuration

FieldTypeRequiredDescription
profileUrlString✔️ YesFull Facebook profile or Page URL to scrape.
maxPostsIntegerOptionalMaximum number of posts to scroll through and collect from the timeline. Default: 3.
maxCommentsPerPostIntegerOptionalMaximum number of comments to extract per collected post. Default: 20.
includeRepliesBooleanReservedPresent in the input form; not yet wired into the scraper logic.
proxyConfigurationObjectReservedPresent in the input form; the Actor does not yet route traffic through Apify Proxy.
mcpConnectorConnectorOptionalDeliver each post's comments into a connector you've authorized (Notion, Slack, Jira, GitHub, Linear, Airtable, …).
deliveryModeEnumOptionalsummary (one call with all of a post's comments joined together), chunked (split a long thread across a few calls/pages), perComment (one call per individual comment), or none. Default: summary.
mcpToolStringOptionalTool to call on the connector (e.g. create_page, send_message, create_issue).
mcpArgumentsObjectOptionalArguments for the tool; string values support {placeholders}.
mcpMessageTemplateStringOptionalTemplate rendered per post/comment, exposed as the {message} placeholder.

Example — Scrape a profile's recent posts

{
"profileUrl": "https://www.facebook.com/zuck",
"maxPosts": 5,
"maxCommentsPerPost": 30
}

Example — Scrape and post each post's comments to Slack

{
"profileUrl": "https://www.facebook.com/zuck",
"maxPosts": 5,
"mcpConnector": "<your-slack-connector>",
"deliveryMode": "summary",
"mcpTool": "send_message",
"mcpArguments": { "channel": "#comments", "text": "{message}" },
"mcpMessageTemplate": "*Comments on {postUrl}* ({commentCount} total)\n\n{comments}"
}

Example — Scrape and create a Notion page per post (chunked for long threads)

{
"profileUrl": "https://www.facebook.com/zuck",
"maxPosts": 10,
"mcpConnector": "<your-notion-connector>",
"deliveryMode": "chunked",
"mcpTool": "create_page",
"mcpArguments": {
"parent": { "page_id": "<your-page-id>" },
"pages": [
{
"properties": {
"title": "Comments on {postUrl} (part {part}/{partCount})"
},
"content": "{comments}"
}
]
}
}

Placeholders available in arguments / template

All modes: {postUrl} · {commentCount} · {message} Summary / chunked modes add: {comments} (comments joined as "name: text" lines) Chunked mode adds: {part} · {partCount} Per-comment mode adds: {username} · {text}


📦 Output Fields

FieldDescription
post_urlURL of the post the comment was found on
comment_usernameName of the person who left the comment
comment_textThe comment's text content

Example Output

[
{
"post_url": "https://www.facebook.com/zuck/posts/1234567890",
"comment_username": "Jane Doe",
"comment_text": "This is amazing, thanks for sharing!"
}
]

You can download the dataset as JSON, HTML, CSV, or Excel directly from the Apify Console.


🔌 Integrations & Delivery

Deliver scraped comments into any MCP connector you've authorized in Apify — no glue code, no webhooks:

  • Notion — create a page per post (use chunked mode for long comment threads so Notion never times out)
  • Slack / Discord — post comment summaries to a channel
  • Jira / GitHub / Linear — open issues or tasks from flagged comments
  • Airtable / Google Sheets — append a structured row per post or comment
  • …or any other MCP-compatible connector

Credentials stay private — delivery runs through the Apify MCP Proxy, so the Actor never sees your connector tokens. You can also consume the dataset directly via the Apify API, or wire it into n8n, Zapier, and Make.

⚙️ Delivery modes: summary sends all of a post's comments in one call, chunked splits a long thread across a few calls/pages, and perComment sends one call per individual comment. MCP delivery only runs on the Apify platform and never affects what's saved to the dataset. 💡 First time with a connector? Run once with a connector selected — the run log prints the connector's available tool names, so you know what to put in Connector tool name.


🛠️ How It Works

  1. login.py (run once, optional) opens a real browser, lets you log into Facebook manually, and saves the session to src/fb_state.json.
  2. src/main.py reads profileUrl, maxPosts, and maxCommentsPerPost from the input.
  3. It launches Playwright (using the saved session if present), opens the profile, and scrolls the timeline to collect post URLs.
  4. For each collected post, it opens the post, clicks "View more comments" to expand hidden replies, and reads the DOM to pull each comment's author and text.
  5. Each comment is pushed to the dataset as { post_url, comment_username, comment_text }.
  6. If an MCP connector is configured, the post's comments are then delivered to it (summary, chunked, or perComment) — this happens after the dataset write and never blocks or discards saved data.

Built with: Apify SDK for Python · Playwright for Python · MCP


🆘 Support

For issues, custom scraping requests, or feature suggestions:

Email: bhavin.shah@techforceglobal.com


Need a Custom Pipeline?

Want scheduled refreshes, multi-profile batch runs, sentiment enrichment, or MCP delivery built out sooner?

📅 Book a Free 15-min Consultation


Made with ❤️ by Techforce Specialists in High-Performance Web Scrapers and AI Automation.


Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by Facebook or Meta Platforms, Inc. Facebook® is a trademark of Meta Platforms, Inc.; all trademarks are property of their respective owners. The Actor is intended for scraping publicly visible posts and comments only. Do not use it to access private, friends-only, or restricted content, and do not use a saved login session to bypass access controls. Use the data responsibly and in compliance with applicable laws (including GDPR/CCPA), Facebook's Terms of Service, and any consent requirements for storing personal data such as commenter names.