Facebook Comments Scraper & Tagged Profiles Extractor avatar

Facebook Comments Scraper & Tagged Profiles Extractor

Pricing

Pay per usage

Go to Apify Store
Facebook Comments Scraper & Tagged Profiles Extractor

Facebook Comments Scraper & Tagged Profiles Extractor

๐Ÿ’ฌ Facebook Comments Scraper extracts public post comments at scaleโ€”text, timestamps, reactions & comment IDsโ€”into CSV/JSON for analysis. ๐Ÿ“Š Perfect for social listening, brand monitoring & campaign reporting. โš™๏ธ Fast, reliable, privacy-aware.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Scrapier

Scrapier

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

13 days ago

Last modified

Share

Facebook Comments Scraper โ€” Extract Comments & Tagged Profiles

Facebook Comments Scraper & Tagged Profiles Extractor pulls every public comment and reply from a Facebook post, video, or photo permalink and turns each one into a structured row โ€” comment text, author details, verified and page-owner flags, media attachments, and the tagged profiles hidden inside @-mentions. Every response is structured JSON, ready to pass directly to an LLM, index into a vector store, or feed a monitoring pipeline. Point it at any public post and start extracting in minutes.

What is Facebook Comments Scraper & Tagged Profiles Extractor?

Facebook Comments Scraper & Tagged Profiles Extractor reads the comment thread on any public Facebook post, video, or photo and returns one row per comment or reply. Where most comment scrapers stop at raw text, this Actor also parses each comment's @-mentions into structured mentions[] objects โ€” the actual tagged profiles, not unparsed text โ€” and classifies every attachment by type. It runs entirely logged-out; no Facebook account or session cookie is required.

  • Extract full comment threads โ€” top-level comments plus nested replies โ€” from any public post, video, or photo permalink
  • Parse tagged profiles out of @-mentions into structured mentions[] objects (id, name, url), filtered to real people/pages/groups/events
  • Classify comment attachments โ€” sticker, photo, GIF, video, or shared link โ€” with a direct media URL and title
  • Flag comment authors as verified accounts or the post/page owner (authorIsVerified, authorIsPageOwner)
  • Filter comments by a "posted after" date window, and control scan depth (comments per post, replies per comment) and return order
  • Aggregate every tagged profile found in a comment and in its replies into a deduplicated taggedProfiles[] array with taggedProfilesCount
  • Run without a Facebook login โ€” the Actor defaults to Apify residential proxy, and any proxy configuration you set is honored as-is

What data can you get with Facebook Comments Scraper & Tagged Profiles Extractor?

The Actor returns comments, replies, tagged profiles, attachments, and author signals in one flat dataset row per comment.

Result TypeExtracted FieldsPrimary Use Case
Comment / reply recordid, feedbackId, facebookId, date, text, profileId, profileName, profilePicture, profileUrl, likesCount, commentsCount, threadingDepth, commentUrl, facebookUrl, inputUrl, url_key, full_url, pageAdLibrary (present only when Facebook returns ad-library data for the page)Build a complete, structured comment dataset per post
Tagged profilesmentions[] โ†’ {id, name, url}, plus taggedProfiles[] / taggedProfilesCount (comment + its replies, deduplicated by profile id)Identify every profile or page tagged inside a comment thread
Attachments (media)attachments[] โ†’ {type, url, title}, hasAttachmentHarvest shared images, reaction GIFs, videos, and links posted in comments
Author signalsauthorIsVerified, authorIsPageOwnerSeparate verified accounts and the page owner's own replies from ordinary commenters
Threaded repliesreply[] (nested comment objects), expansionTokenReconstruct the full reply structure under a comment
Run statuserrorDetect a post URL that failed to load in a batch job

Tagged profiles (mentions)

This is the part most Facebook comment scrapers skip. Every comment body arrives from Facebook as text plus a ranges[] array marking entity spans โ€” but that array mixes real @-mentions with linkified URLs and hashtags in the same list. The Actor filters those spans down to real profile-like entities (User, Page, Group, Event), reads the display name straight out of the comment text at each span's offset instead of trusting a possibly-stale label, and resolves the entity's own URL or falls back to a canonical facebook.com/<id> link built from the raw entity id. The result is a clean mentions[] array per comment โ€” the actual tagged profiles, each with a stable id you can track, not raw @-mention text you'd have to regex out and guess at yourself.

"mentions": [
{ "id": "100064861235147", "name": "Maria Gomez", "url": "https://www.facebook.com/100064861235147" },
{ "id": "61551234567890", "name": "Northside Runners Club", "url": "https://www.facebook.com/61551234567890" }
]

Attachments (media)

Each comment's attachments[] array classifies shared media into sticker, photo, gif, video, or link, resolving the direct media URL and pulling a title where one exists. Shared-link attachments arrive wrapped in Facebook's l.facebook.com redirect, so the Actor unwraps that redirect to the real destination URL before returning it, rather than handing back a tracking link you'd need to resolve yourself. This is the fastest way to harvest every reaction GIF, shared photo, or linked article dropped into a comment section, across an entire thread, without opening each comment individually.

How does Facebook Comments Scraper & Tagged Profiles Extractor differ from the official Facebook API?

Meta's Graph API can return comments, but only under a permission and review model built for content you manage โ€” not for reading comments on an arbitrary public post.

FeatureMeta Graph APIFacebook Comments Scraper & Tagged Profiles Extractor
SetupRegister a Meta app, request the "Page Public Content Access" feature, pass App Review and Business Verification (Meta Graph API docs)Paste post URLs into the Actor and run โ€” no app registration
Which postsPrimarily Pages/posts your app manages or has been granted access toAny public Facebook post, video, or photo permalink
Login requiredA page or user access tokenNone โ€” runs logged-out
Tagged profilesExposes a message_tags field on the comment objectmentions[] with id, name, url per tagged profile
Attachment handlingComment object exposes attachment data; type breakdown for stickers/GIFs/videos isn't part of the documented schemaattachments[] pre-classified as sticker/photo/gif/video/link with a direct media URL
Batch queriesOne comments-edge call per post you already have access toOne run scans a list of post URLs in a single job

Use the Graph API when you already manage the Page and only need comments on your own posts within Meta's app-review terms. Use this Actor when you need comments โ€” and the tagged profiles inside them โ€” from any public post, without building and maintaining a reviewed Meta app.

How to scrape Facebook with Facebook Comments Scraper & Tagged Profiles Extractor?

  1. Open Facebook Comments Scraper & Tagged Profiles Extractor on the Scrapier Apify store listing and start a new run.
  2. Paste one or more public Facebook post, video, or photo permalinks into postUrls โ€” no field is required to start a run.
  3. Optionally tune mediaScanSettings (comments to scan, replies to scan, scan order), postedAfter, includeAttachments, includeMentions, and mediaOnly to narrow the result set.
  4. Start the run โ€” it works logged-out and defaults to Apify residential proxy; change proxyConfiguration if you want a different proxy group.
  5. Download the results as JSON, CSV, or any other format Apify's dataset export supports once the run finishes.
{
"postUrls": [
"https://www.facebook.com/PipploIMP/videos/january-27-2026-nasa-released-an-animation-illustrating-the-trajectory-of-the-ar/2780420738998681/"
],
"includeMentions": true,
"mediaScanSettings": { "commentsToScan": 20, "scanOrder": "newest" }
}

How to scan multiple Facebook posts in one job

Add one permalink per line to postUrls โ€” the Actor loops over every URL in the same run, fetching each post's comment pages in turn. Within a single post, replies are fetched concurrently in batches of 10 comment threads at a time, so threads with active reply discussions don't slow down the whole run. There's no separate queue to manage โ€” one run, one list of URLs, one dataset.

โฌ‡๏ธ Input

ParameterRequiredTypeDescriptionExample Value
postUrlsNoarrayPublic Facebook permalinks to read comments from, one per line. Also accepts the base startUrls key.["https://www.facebook.com/PipploIMP/videos/.../2780420738998681/"]
includeAttachmentsNobooleanWhen on, each comment row gets attachments[] and hasAttachment. Default: true.true
includeMentionsNobooleanWhen on, each comment row gets mentions[] for every @-tagged profile/page, plus taggedProfiles[] / taggedProfilesCount aggregating the comment's and its replies' tagged profiles. Default: true.true
mediaOnlyNobooleanWhen on, only comments with at least one attachment are saved. Default: false.false
mediaScanSettingsNoobjectHow wide to scan each post: commentsToScan (hard cap on top-level comments returned per post, default 10), repliesToScan (replies per comment, default 1; 0 skips reply fetching), scanOrder (most_relevant / newest / all, default all โ€” sent to Facebook as its real comment-ordering intent token, so it changes which comments come back). A base-shaped commentSettings input is still honored via fallback.{"commentsToScan": 20, "repliesToScan": 5, "scanOrder": "newest"}
postedAfterNostringAbsolute date (2024-01-15) or relative window (1 day, 2 weeks, 3 months). Only comments/replies posted after this point are kept. Also accepts onlyCommentsNewerThan."7 days"
proxyConfigurationNoobjectHonored exactly as submitted โ€” pick a different Apify proxy group and the exit network really changes; switch the proxy off and the run goes direct (Facebook usually blocks that logged-out). Defaults to Apify residential proxy.{"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]}

Example input:

{
"postUrls": [
"https://www.facebook.com/PipploIMP/videos/january-27-2026-nasa-released-an-animation-illustrating-the-trajectory-of-the-ar/2780420738998681/"
],
"includeAttachments": true,
"includeMentions": true,
"mediaOnly": false,
"mediaScanSettings": { "commentsToScan": 20, "repliesToScan": 3, "scanOrder": "newest" },
"postedAfter": "2 weeks"
}

Common pitfall: postedAfter filters comments after they've already been fetched up to commentsToScan. If you set a narrow date window but leave commentsToScan at its default of 10, older comments may crowd out the recent ones you actually want โ€” set the scan cap generously for narrow time windows.

โฌ†๏ธ Output

Output is typed, normalized JSON with a consistent schema across runs, exportable as JSON, CSV, Excel, or the other formats Apify's dataset supports.

Scraped results

[
{
"full_url": "https://www.facebook.com/PipploIMP/videos/.../2780420738998681/",
"url_key": "2780420738998681",
"profileName": "Jordan Ruiz",
"profileId": "100083012345678",
"authorIsVerified": false,
"authorIsPageOwner": false,
"text": "This is wild! @Maria Gomez you have to see this",
"date": "2026-06-30T14:12:05+00:00",
"hasAttachment": false,
"attachments": [],
"mentions": [
{ "id": "100064861235147", "name": "Maria Gomez", "url": "https://www.facebook.com/100064861235147" }
],
"likesCount": 42,
"commentsCount": 2,
"reply": [
{
"profileName": "Maria Gomez",
"text": "Haha just saw it, incredible footage",
"date": "2026-06-30T15:03:11+00:00",
"likesCount": 3,
"mentions": [],
"attachments": []
}
]
},
{
"full_url": "https://www.facebook.com/PipploIMP/videos/.../2780420738998681/",
"url_key": "2780420738998681",
"profileName": "NASA Fan Page",
"authorIsVerified": true,
"authorIsPageOwner": false,
"text": "Sharing this everywhere",
"date": "2026-06-30T13:40:22+00:00",
"hasAttachment": true,
"attachments": [
{ "type": "gif", "url": "https://scontent.xx.fbcdn.net/rocket.gif", "title": null }
],
"mentions": [],
"likesCount": 118,
"commentsCount": 0
},
{
"full_url": "https://www.facebook.com/PipploIMP/videos/.../2780420738998681/",
"url_key": "2780420738998681",
"profileName": "PipploIMP",
"authorIsVerified": false,
"authorIsPageOwner": true,
"text": "Thanks for watching everyone!",
"date": "2026-06-30T12:00:00+00:00",
"hasAttachment": false,
"attachments": [],
"mentions": [],
"likesCount": 9,
"commentsCount": 0
}
]

A post that fails to load is pushed as a separate row containing url_key, full_url, error, and comments: [] instead of comment fields โ€” that row is not billed against the per-comment charged event (see FAQ below).

How can I use the data extracted with Facebook Comments Scraper & Tagged Profiles Extractor?

  • Brand and community monitoring teams: track every comment on a monitored post and pull out mentions[] to see which creators, customers, or partner pages are being tagged underneath it.
  • Community and lead research: filter by authorIsPageOwner to isolate the page's own replies, and use mentions[] to build outreach lists of profiles already engaging with a brand's content.
  • AI engineers and LLM developers: feed the structured JSON directly into an agent as grounded context โ€” a support or research agent can cite the exact comment text, author, and tagged profiles it retrieved.
  • Sentiment and engagement analysts: combine text, likesCount, and commentsCount per comment to score engagement and sentiment trends across a post's comment section.

How do you monitor tagged profiles over time?

Monitoring tagged profiles means running the same post URLs on a schedule and comparing each mentions[] array against the previous run to see who's newly being tagged in the conversation. A fresh mention appearing on a run that wasn't there before typically signals a new person or page getting pulled into the discussion โ€” a customer, a creator, or a competitor's page.

To track it: keep a set of post URLs you care about, run the Actor against them on a recurring schedule, and diff each comment's mentions[].id values against the last run's dataset for the same url_key. Flag any id that's new. Because mentions[] carries both the tagged profile's id and its resolved url, you can alert on the exact profile rather than just a name string that might collide.

The same pattern works for attachments[] (alert when a new GIF or link starts circulating in the comments) or for raw comment volume (commentsCount growth) between runs โ€” both are cheap to diff since every row already carries a stable url_key to group by. For delivery, use Apify's built-in Scheduler to run this Actor on a cron-like interval against the same post list, store each run's dataset, and pull the two most recent runs via the Apify API whenever you want to compute the diff and fire an alert.

Integrate Facebook Comments Scraper & Tagged Profiles Extractor and automate your workflow

Facebook Comments Scraper & Tagged Profiles Extractor works with any language or tool that can send an HTTP request.

REST API with Python

import requests
TOKEN = "your_apify_token"
ACTOR = "Scrapier~facebook-comments-scraper-tagged-profiles-extractor"
url = f"https://api.apify.com/v2/acts/{ACTOR}/run-sync-get-dataset-items?token={TOKEN}"
payload = {"postUrls": ["https://www.facebook.com/PipploIMP/videos/.../2780420738998681/"]}
resp = requests.post(url, json=payload, timeout=180)
comments = resp.json()
for c in comments:
print(c.get("profileName"), c.get("text"), c.get("mentions"))

MCP for query-grounded AI agents

The Actor is reachable through Apify's Actors MCP Server, which exposes any Apify Actor as a callable tool:

APIFY_TOKEN=your_token npx -y @apify/actors-mcp-server --actors Scrapier/facebook-comments-scraper-tagged-profiles-extractor

An MCP-compatible client (such as Claude Desktop or Cursor) can then call the Actor as a tool: the agent receives a question about a post's comments, invokes the tool with a post URL and any scan settings, gets back structured comment, attachment, and mentions[] JSON, and grounds its answer in that real, current data instead of relying on the model's own training-time knowledge of the post.

Scheduled monitoring and delivery

Use Apify's built-in Scheduler to run this Actor on a cron-like interval against a fixed set of post URLs. Pull each run's results via the Dataset API immediately after it completes, or connect the Actor's runs to Apify's Zapier, Make, or Slack integrations to push new data onward automatically.

Scraping public Facebook comments is generally legal because you're collecting data any visitor to that post can already see, and this Actor returns only that publicly visible content โ€” it does not log in or bypass any access control. That said, comment author names, profile URLs, and tagged-profile identities returned in mentions[] are personal data, so processing them falls under GDPR (if you're in or targeting the EU/EEA) and CCPA (for California residents) โ€” meaning you need a lawful basis, data-minimization practices, and a retention policy before storing or reusing this data at scale. Scraping for one-off monitoring carries a different risk profile than scraping to train an AI model on people's names and comment history โ€” the latter draws far more regulatory scrutiny. Consult your legal team for commercial use cases involving bulk data storage.

Frequently asked questions

How many results does this scraper return per query?

There's no fixed cap in the code โ€” the Actor keeps requesting comment pages from Facebook until it hits commentsToScan (default 10 top-level comments per post) and, for replies, repliesToScan (default 1 per comment, or all of them if set to "ALL"). Raise those values in mediaScanSettings to scan more per post.

How does the tagged-profiles extractor actually work?

It reads the ranges[] entity spans Facebook attaches to each comment's text, keeps only spans typed as User, Page, Group, or Event (dropping plain linkified URLs and hashtags), and builds a mentions[] object with the tagged profile's id, display name (read from the comment text itself), and resolved url. If a comment has no @-mentions, mentions[] is simply an empty array.

Can I control which comments get scanned and in what order?

Yes โ€” scanOrder in mediaScanSettings accepts most_relevant, newest, or all (the original Facebook feed order, the default).

Can I fetch only comments that contain media attachments?

Yes โ€” set mediaOnly to true to keep only comments with at least one sticker, photo, GIF, video, or shared link attached, useful for harvesting reaction media without sifting through plain-text comments.

How does this Actor handle Facebook's anti-bot measures?

It defaults to Apify residential proxy (any proxy group you configure is used instead), warms up a guest session so Facebook serves the permalink at all, sends the full set of Relay provided-variable feature flags the persisted comment query requires, retries failed requests with exponential backoff, and rotates to a fresh exit IP when a page fails to load correctly.

Can I run it without a Facebook login or managing proxies myself?

Yes โ€” the Actor never logs in and requires no Facebook session or credentials from you. It defaults to Apify residential proxy on every run, so you don't have to configure anything; if you do set proxyConfiguration, that setting is what the run uses.

What happens if a post URL fails to load?

That URL is pushed as its own dataset row with url_key, full_url, error (a short failure reason), and comments: [], instead of being silently dropped. This status row is not tagged with the row_result charged event, so you can exclude it from billed results by filtering the dataset for items where error is not set.

How do I monitor tagged profiles or new comments over time?

Schedule recurring runs against the same post URLs, then diff each run's mentions[] (by id) and commentsCount against the previous run's dataset for the same url_key, and alert on anything new. See "How do you monitor tagged profiles over time?" above for the full workflow.

Does it work with Claude, ChatGPT, and AI agent frameworks?

Yes โ€” it's callable as a plain HTTP endpoint by any agent framework, and it's also reachable through Apify's Actors MCP Server (npx -y @apify/actors-mcp-server --actors Scrapier/facebook-comments-scraper-tagged-profiles-extractor) for MCP-compatible clients like Claude Desktop or Cursor.

Can I scan multiple Facebook posts in one run?

Yes โ€” add multiple permalinks to postUrls; the Actor processes each post's comment pages in the same run and pushes results from all of them to one dataset.

Your feedback

Found a bug or a field that's missing? Let Scrapier know through the Actor's Issues tab on its Apify Store listing โ€” reports get looked at and folded into the next update.