Facebook Comments Scraper
Extracts comments from public Facebook posts, videos, reels and photos: comment text, publish time, author with profile link, reactions with a per-type breakdown, reply count and attachments, with replies optionally returned as separate items.
What it extracts
Every field below comes from the Actor’s published dataset schema.
| Field | Description | Type |
|---|---|---|
author | Author | object |
text | Comment | text |
created_time | Posted | date |
reactions | Reactions | object |
replies_count | Replies | number |
depth | Depth | number |
comment_url | Comment URL | link |
post_url | Post URL | link |
attachments | Attachments | array |
Input parameters
Generated from the Actor’s input schema — the same fields the Apify console shows.
| Parameter | Type | Required | Description |
|---|---|---|---|
startUrls | array | Required | Public Facebook posts to collect comments from. Paste post links such as https://www.facebook.com/zuck/posts/pfbid0…, video or reel links, photo links, or permalink.php and story.php links. One entry per post, and as many posts as you like. |
maxItems | integer | Optional | Maximum number of comments to scrape from each post (start URL). Replies count towards this limit when they are included. |
sortBy | string | Optional | Which comments to collect and in what order: all comments in Facebook's default order, newest first, or Facebook's "most relevant" selection, which leaves some comments out. |
includeReplies | boolean | Optional | Also collect the replies under each comment. Replies are separate items with depth 1 and a parent_comment_id, and count towards maxItems. |
maxRepliesPerComment | integer | Optional | When replies are included, how many to collect under each comment. |
proxyConfiguration | object | Optional | Proxy configuration. Defaults to Apify residential proxies, which work for every supported link. Datacenter proxies are cheaper and work for post, video and reel links, but Facebook sends photo links to its login page from datacenter IP addresses. |
API access
Run this Actor from your own code over the Apify API.
{
"startUrls": [
"https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl",
"https://www.facebook.com/zuck/videos/2300161320399228/"
]
}curl -X POST \
"https://api.apify.com/v2/acts/logical_scrapers~facebook-comments-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"startUrls":["https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl","https://www.facebook.com/zuck/videos/2300161320399228/"]}'import { ApifyClient } from 'apify-client'
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' })
const run = await client.actor('logical_scrapers~facebook-comments-scraper').call({
"startUrls": [
"https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl",
"https://www.facebook.com/zuck/videos/2300161320399228/"
]
})
const { items } = await client.dataset(run.defaultDatasetId).listItems()
console.log(items)from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("logical_scrapers~facebook-comments-scraper").call(run_input={
"startUrls": [
"https://www.facebook.com/zuck/posts/pfbid02XPBMPD53KhnFbypJNZqKupd9yno64L9Vm1VCxppfq7bYh7ndk95fzDDvfgZEMXYkl",
"https://www.facebook.com/zuck/videos/2300161320399228/",
],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)Runs are executed on Apify. Create an API token in your Apify account, then call the Actor over REST or with the official client for your language. The same input object works in the Apify console, so you can test interactively before automating.
Use cases
Sentiment and theme analysis
Collect the comments under a launch or campaign post and classify them by sentiment or recurring topic.
Community management
Read what people say under a brand’s own posts, and flag comments that need an answer when the Actor runs on a schedule.
Competitor and campaign research
Compare the comments and reactions on a competitor’s posts to see what an audience responds to.
Media and public-reaction studies
Gather public reactions to announcements, events or public figures, with replies kept linked to the comment they answer.
Pricing
Data not currently verified. This Actor's pricing model is not declared in our source repository.
Current rates are published on the Apify listing and can change, so they are not duplicated here. See pricing on Apify
Reliability
Measured across all public Goldmine Actors on Apify, 2026-11-12. This is an account-level figure, not a per-Actor benchmark — per-Actor speed and completeness benchmarks are not yet published. Source.
Limitations
What this Actor does not do, so you can tell before you run it whether it fits.
- Takes post, video, reel and photo URLs as input. Page and profile links are not post URLs; use Facebook Posts Scraper to collect a page’s posts first, then pass their `post_url` values here.
- Public posts only. Posts inside groups need a Facebook login and are skipped, and a post that hides its comments from logged-out visitors returns none.
- `maxItems` caps comments per post, not per run, and replies count towards it when `includeReplies` is on.
- The `most_relevant` ordering returns Facebook’s default selection, which leaves some comments out. Use `all` when you want the whole thread.
- Facebook sends photo links to its login page from datacenter IP addresses, so photo links need the residential proxy default.
- Comments that are only a sticker, GIF or photo have no text; the media is in `attachments`.
- Comments are personal data. Confirm your basis for processing under GDPR, CCPA or the equivalent in your jurisdiction before collecting them.
Frequently asked questions
Do I need a Facebook account, cookies or an API key?
No. The Actor reads only what Facebook shows to visitors who are not logged in.
What input does it take?
An array of public Facebook post URLs: `/posts/`, `/videos/`, `/reel/`, `/photo/`, `watch?v=`, `permalink.php` and `story.php` links, including m.facebook.com and web.facebook.com forms.
Does it collect replies?
Yes, when `includeReplies` is on. Each reply is its own item with `depth` 1 and the `parent_comment_id` of the comment it answers. `maxRepliesPerComment` caps replies per comment (default 10).
How is it priced?
Pay per event: each comment or reply saved counts as one result. The README lists $0.0025 per result plus Apify platform usage. Current pricing is shown on the Apify listing.
Used for
Workflows this Actor is part of, and the other scrapers it chains with.