Facebook Comments Scraper
Pricing
from $1.28 / 1,000 comments
Facebook Comments Scraper
Scrape comments and replies from public Facebook posts and reels without login, with a per-post coverage report. $1.50 per 1,000 comments.
Pricing
from $1.28 / 1,000 comments
Rating
0.0
(0)
Developer
Seb
Maintained by CommunityActor stats
0
Bookmarked
8
Total users
3
Monthly active users
6 days ago
Last modified
Categories
Features
Share
Scrape comments and replies from public Facebook posts, reels and videos. Standard runs collect what Facebook shows without login. Invited customers can use account access to get numeric commenter IDs. Each post gets a coverage report describing whether comment pages and reply threads were read to the end. Each returned comment costs $0.0015 ($1.50 per 1,000 comments), including replies; a $0.00005 start fee applies per run.
What it returns
Each dataset item is one comment or reply. Replies are separate rows; threadingDepth is 0 for top-level comments and higher for replies, while replyToCommentId identifies the direct parent. Nested arrays such as comments and replies are empty. A comment made only of a sticker, GIF or photo is still returned: text may be null and attachments contains available media details.
| Name | Type | Meaning |
|---|---|---|
facebookUrl | string or null | Facebook URL of the post. |
inputUrl | string or null | URL supplied in startUrls. |
postId | string or null | Numeric post ID. |
postUrl | string or null | Resolved post URL. |
postTitle | string or null | Post title, when available. |
postDescription | string or null | Post text, when available. |
commentUrl | string or null | Direct comment URL. |
commentId | string or null | Numeric comment ID. |
facebookCommentId, facebookId | string or null | Numeric comment ID aliases. |
id | string or null | Base64 Facebook comment ID. |
feedbackId | string or null | Facebook feedback ID. |
name, authorName, profileName | string or null | Commenter's display name. |
author | object or null | Author ID, name and profile URL. |
profileId | string or null | Numeric user ID when Facebook provides one or lookup succeeds; otherwise Facebook's profile token may remain. |
profileToken | string or null | Original pfbid token when Facebook returned one, even if lookup succeeds. |
profileUrl | string or null | Commenter's profile URL. |
profilePicture | string or null | Profile picture URL, when available. |
text, message | string or null | Comment text; may be null for media-only comments. |
attachments | array or null | Available comment media attachments. |
date, createdAt, publishedAt | string or null | Comment time in ISO 8601 format. |
timestamp, time | number or null | Comment time as Unix seconds. |
likesCount | string or null | Reaction count as a string. |
likes, likeCount | number or null | Reaction count as a number. |
commentsCount | number or null | Reported replies to this comment. |
threadingDepth | number or null | Nesting depth; top-level comments are 0. |
replyToCommentId, parentCommentId, parentFacebookCommentId, parentId | string or null | Direct parent comment ID for replies. |
rootCommentId | string or null | Root comment ID when available. |
comments, replies | array or null | Empty; replies are separate dataset rows. |
parentComment, parentReply | object or null | Parent objects; currently null. |
Example rows (shortened text and placeholder author details):
[{"facebookUrl":"https://www.facebook.com/example/posts/POST_ID","inputUrl":"https://www.facebook.com/example/posts/POST_ID","postId":"POST_ID","postUrl":"https://www.facebook.com/example/posts/POST_ID","commentUrl":"https://www.facebook.com/example/posts/POST_ID?comment_id=COMMENT_ID","commentId":"COMMENT_ID","facebookCommentId":"COMMENT_ID","facebookId":"COMMENT_ID","id":"BASE64_COMMENT_ID","feedbackId":"BASE64_FEEDBACK_ID","name":"Example Author","authorName":"Example Author","profileName":"Example Author","author":{"id":"AUTHOR_ID","name":"Example Author","url":"https://www.facebook.com/AUTHOR_ID"},"profileId":"AUTHOR_ID","profileUrl":"https://www.facebook.com/AUTHOR_ID","profilePicture":null,"date":"2026-10-04T09:58:43.000Z","createdAt":"2026-10-04T09:58:43.000Z","publishedAt":"2026-10-04T09:58:43.000Z","timestamp":1791112723,"time":1791112723,"text":"Example comment text…","message":"Example comment text…","attachments":[],"likesCount":"24","likes":24,"likeCount":24,"commentsCount":0,"threadingDepth":0,"replyToCommentId":null,"parentCommentId":null,"parentFacebookCommentId":null,"parentId":null,"rootCommentId":null,"comments":[],"replies":[],"parentComment":null,"parentReply":null},{"facebookUrl":"https://www.facebook.com/example/posts/POST_ID","inputUrl":"https://www.facebook.com/example/posts/POST_ID","postId":"POST_ID","postUrl":"https://www.facebook.com/example/posts/POST_ID","commentUrl":"https://www.facebook.com/example/posts/POST_ID?comment_id=PARENT_COMMENT_ID&reply_comment_id=REPLY_ID","commentId":"REPLY_ID","facebookCommentId":"REPLY_ID","facebookId":"REPLY_ID","id":"BASE64_REPLY_ID","feedbackId":"BASE64_REPLY_FEEDBACK_ID","name":"Another Author","authorName":"Another Author","profileName":"Another Author","author":{"id":"AUTHOR_ID_2","name":"Another Author","url":"https://www.facebook.com/AUTHOR_ID_2"},"profileId":"AUTHOR_ID_2","profileUrl":"https://www.facebook.com/AUTHOR_ID_2","profilePicture":null,"date":"2026-10-04T10:42:05.000Z","createdAt":"2026-10-04T10:42:05.000Z","publishedAt":"2026-10-04T10:42:05.000Z","timestamp":1791115325,"time":1791115325,"text":"Example reply text…","message":"Example reply text…","attachments":[],"likesCount":"5","likes":5,"likeCount":5,"commentsCount":0,"threadingDepth":1,"replyToCommentId":"PARENT_COMMENT_ID","parentCommentId":"PARENT_COMMENT_ID","parentFacebookCommentId":"PARENT_COMMENT_ID","parentId":"PARENT_COMMENT_ID","rootCommentId":null,"comments":[],"replies":[],"parentComment":null,"parentReply":null}]
Input
| Field | Default | Meaning |
|---|---|---|
startUrls | Required | Array of Facebook post URLs; each object has a url and can set its own onlyCommentsNewerThan and resultsLimit. |
startUrls[].onlyCommentsNewerThan | Run-level value | Inclusive ISO date or datetime, or relative value such as 7 days, for this URL. |
startUrls[].resultsLimit | Run-level value | Maximum rows for this URL, including replies; must be a positive integer. |
accessKey | None | For invited customers: the access key from your invitation. Collects comments through account access, which returns the numeric user ID for every commenter. |
resultsLimit | No limit | Maximum rows per post, replies included. Omit it to collect all visible comments. |
includeNestedComments | false | Fetch replies and nested replies as separate rows. |
resolveProfileIds | false | Look up a numeric user ID on each public commenter profile when Facebook returns a pfbid token. Adds one request per commenter needing lookup. |
viewOption | RANKED_UNFILTERED | Ordering: RANKED_UNFILTERED (All comments), RECENT_ACTIVITY (Newest), or RANKED_THREADED (Most relevant). Facebook may offer different orderings on different posts; the Actor falls back to an available ordering if needed. |
onlyCommentsNewerThan | No lower bound | Inclusive date or datetime, or relative value such as 7 days. |
One post, all visible comments and replies:
{"startUrls":[{"url":"https://www.facebook.com/example/posts/123456789"}],"includeNestedComments":true}
Newest 50 comments from each of several posts:
{"startUrls":[{"url":"https://www.facebook.com/example/posts/123456789"},{"url":"https://www.facebook.com/example/posts/987654321"}],"resultsLimit":50,"viewOption":"RECENT_ACTIVITY"}
resultsLimit applies separately to each URL and counts replies when they are enabled.
A batch can give each post a different window and ceiling:
{"startUrls":[{"url":"https://www.facebook.com/example/posts/123456789","onlyCommentsNewerThan":"2026-11-20","resultsLimit":25},{"url":"https://www.facebook.com/example/posts/987654321","onlyCommentsNewerThan":"7 days","resultsLimit":60}],"viewOption":"RECENT_ACTIVITY"}
An entry without its own date or limit uses the run-level value, if supplied. Relative dates are resolved when the run starts and stay fixed if it restarts.
Invited account access is available to the Actor owner and listed customers with a matching accessKey. It uses a logged-in pool account for every URL in the run. Without a key, runs use logged-out collection; an incorrect key stops the run with an input error. Other users continue with logged-out collection. Account runs keep Facebook's page files in a small named key-value store so later runs open faster. In account mode, resolveProfileIds adds no profile requests because commenter IDs already come from the logged-in response. Run account access with at least 2048 MB of memory.
With resolveProfileIds enabled, a successful lookup puts the numeric user ID in profileId and author.id; profileToken keeps Facebook's original token. Lookup errors leave the comment in the results with its original token. Commenters with no profile link cannot be resolved because Facebook does not show those profiles to logged-out visitors. A missing link is returned as null, rather than a link built from the token. Profile lookups do not add a charge event.
Supported URLs
URLs may use www.facebook.com, m.facebook.com or web.facebook.com.
| URL form | Example path |
|---|---|
Post with numeric ID or pfbid | /Page/posts/123456789, /Page/posts/pfbidCODE |
| Permalink | /permalink.php?story_fbid=123&id=456 |
| Group post (public groups) | /groups/GROUP/posts/123, /groups/GROUP/permalink/123 |
| Photo | /photo/?fbid=123 |
| Reel | /reel/123 |
| Watch | /watch/?v=123 |
| Video | /Page/videos/123 |
| Share | /share/r/CODE, /share/v/CODE, /share/p/CODE |
Coverage report
The default key-value store's OUTPUT record contains schemaVersion, actorBuild and a targets array with one report per input URL. Each COVERAGE log line contains that URL's report. Reports include mode ("account" or "logged_out"), postId, status, stopReason, duplicateOf, onlyCommentsNewerThan (the resolved ISO datetime or null), resultsLimit (the used ceiling or null), requested and used ordering, Facebook's reported totals, emitted row counts, truncated thread count, failed requests, retries, visibility and errors.
| Status | Meaning |
|---|---|
complete | Every comment page and enabled reply thread was read to the end. |
partial | Collection stopped at the result limit, charge limit, paging shortfall or after an error with some rows emitted. |
unavailable | The post was not found or is age-gated. |
failed | The Actor could not collect rows or establish coverage. |
reportedTotal is Facebook's own total count, and topLevelReported is its top-level count. The reported total can be a few higher than the rows logged-out visitors can see because Facebook hides some comments from logged-out visitors. end_of_comments means paging ended normally. results_limit and charge_cap identify those limits; not_found and age_gated identify unavailable posts. paging_cut_short means Facebook ended paging while reporting more than 30 top-level comments and fewer than half that count were traversed. This is reported as partial coverage.
In account mode, no_account_available means no pool account was available to start or continue a URL. The report is failed; a URL that could not start emits no rows and has no comment charge. An account checkpoint, logout or rate limit can also stop collection. Account names appear only in the run log, never in dataset rows or OUTPUT.
Pricing
Standard logged-out runs by users on Apify's free plan are limited to 3 URLs and 20 results per run.
comment: $0.0015 per returned row ($1.50 per 1,000), with replies charged the same as top-level comments.- Start fee: $0.00005 per run.
- Unavailable posts: free.
For 100 returned rows across available posts, event charges are $0.15; with one run's start fee, the total is $0.15005. When the configured charge limit is reached, the Actor stops emitting rows and stops crawling; the affected report has status: "partial" and stopReason: "charge_cap".
Limits
Standard runs collect public posts visible without login, including posts in public groups. Some comments are hidden from logged-out visitors and cannot be returned. Invited account access uses the account's Facebook visibility. A URL that is not a single post (for example a Page or group home page) is reported as failed with stopReason: "unsupported_url"; the other URLs in the run are still processed. If an earlier input URL already collected the same post, the later URL is reported as complete with stopReason: "duplicate_post" and no rows or charge; duplicateOf identifies the URL that collected it. The first entry's date and limit control collection for that post and appear in the duplicate report.
Use via API
Send JSON to the synchronous dataset-items endpoint:
curl -X POST 'https://api.apify.com/v2/acts/LordFloofington~facebook-comments-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN' \-H 'Content-Type: application/json' \--data '{"startUrls":[{"url":"https://www.facebook.com/example/posts/123456789"}],"includeNestedComments":true}'
Compliance
Users are responsible for complying with Facebook's terms and applicable law when using this Actor.