Facebook Comments with Structured Output
Pricing
from $4.00 / 1,000 results
Go to Apify Store

Facebook Comments with Structured Output
Pull the comments from any Facebook post in a structured format.
Pricing
from $4.00 / 1,000 results
Rating
0.0
(0)
Developer
Ritozpal
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
2
Monthly active users
3 days ago
Last modified
Categories
Share
Agent A — Structured Facebook Comments
Provides structured Facebook comments. Give it one or more Facebook post URLs and it returns a clean, flat dataset of comments and their replies — author, text, date, engagement, and links.
Input
| Field | Type | Required | Description |
|---|---|---|---|
postUrls | array of string | Yes | Facebook post, reel, video, or group post URLs to fetch comments from. |
maxComments | integer | No | Maximum top-level comments per post (default 50). |
maxRepliesPerComment | integer | No | Maximum replies per top-level comment (default 5). Set to 0 to skip replies. |
commentsSortOrder | string | No | Sort order: newest or most_relevant. Default newest. |
Example input
{"postUrls": ["https://www.facebook.com/groups/888535321742765/posts/2048813859048233"],"maxComments": 50,"maxRepliesPerComment": 5,"commentsSortOrder": "newest"}
Output
Each item in the dataset represents one comment or reply. Replies are flattened into the same list and linked back via parentCommentId. Top-level comments have an empty parentCommentId.
| Field | Type | Description |
|---|---|---|
commentId | string | Numeric Facebook ID of the comment. |
parentCommentId | string | Empty for top-level comments; the parent comment's commentId for replies. |
internalId | string | Base64-encoded internal Facebook ID. |
feedbackId | string | Facebook feedback ID for the comment. |
postUrl | string | URL of the post the comment belongs to. |
inputUrl | string | The URL originally provided as input. |
fullUrl | string | Full URL of the post (usually same as postUrl). |
postId | string | Numeric Facebook ID of the post. |
commentUrl | string | Direct URL to the comment. |
text | string | Comment text. Any sticker or GIF is appended in brackets, e.g. [Sticker: heart]. |
date | string | When the comment was posted (ISO 8601, UTC). |
authorName | string | Display name of the comment author. |
authorId | string | Facebook profile ID of the author. |
authorProfileUrl | string | URL of the author's profile. May be empty — Facebook doesn't always expose it. |
authorAvatarUrl | string | URL of the author's profile picture. |
likesCount | integer | Number of likes on the comment. |
repliesCount | integer | Number of replies to the comment. |
threadingDepth | integer | 0 for top-level comments, 1+ for replies. |
expansionToken | string | Internal pagination token from Facebook (advanced use). |
attachmentUrls | array of string | Direct URLs to any stickers, GIFs, or media attached to the comment. |
Usage
- Provide one or more Facebook post URLs in
postUrls. - Optionally set
maxComments,maxRepliesPerComment, andcommentsSortOrder. - Run the Actor.
- Collect the structured comments — top-level rows have
threadingDepth: 0; replies have higher depth and a populatedparentCommentId.