Scrapes posts from any public Facebook Page or personal Profile timeline, returning structured data including post text, author info with profile picture, engagement metrics (likes/comments/shares), full reaction breakdown (Like/Love/Wow/Haha/Sad/Angry/Care as both array and flat counts), hashtags and external links, media assets with full thumbnail URLs and dimensions, page ad library status, and collaborators. Use when user wants to scrape Facebook posts, extract Facebook page content, get Facebook post data, collect Facebook engagement stats, download Facebook posts, monitor a Facebook page, crawl Facebook timeline, get Facebook reactions, get like count comment count share count from Facebook, Facebook post bulk export, Facebook social media analytics, get profile picture, get page ad library status, fetch Facebook collaborators. Supports date range filtering (afterTime/beforeTime) and cursor-based pagination for bulk collection.
Facebook page or profile URL → list of posts with full fields including media thumbnails, author profile pics, page ad library status, and flat reaction counts
browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.This Skill's operational boundary = what the user can manually do in their browser. It only reads data already displayed to the user on the page, never bypassing authentication or access controls. JS code is encapsulated in Python files under thescripts/directory, invoked viaeval "$(python scripts/xxx.py {params})".$(...)is bash syntax; it is recommended to use the bash tool for execution.
eval "$(python scripts/get-page-id.py '{page_url}')"page_url: Full Facebook page or profile URL, e.g. https://www.facebook.com/cern{
"pageId": "100064792144187",
"pageUrl": "https://www.facebook.com/cern"
}
pageId is not found (page not found or not logged in), verify login status and that the URL is a valid Facebook page.eval "$(python scripts/get-page-posts.py '{page_id}' --page-url '{page_url}' --cursor '{cursor}' --after-time {after_time} --before-time {before_time} --count {count})"page_id: Numeric Facebook page/profile ID (from get-page-id above)--page-url: Original input URL (used for facebookUrl, inputUrl, pageName fields); omit if not needed--cursor: Pagination cursor string from previous response pagination.endCursor; omit or pass null for first page--after-time: Unix timestamp (seconds); only return posts after this time; omit or pass null for no filter--before-time: Unix timestamp (seconds); only return posts before this time; omit or pass null for no filter--count: Number of posts per batch, default 5, max recommended 10{
"posts": [
{
"facebookUrl": "https://www.facebook.com/cern",
"postId": "1417704873732571",
"pageName": "cern",
"url": "https://www.facebook.com/cern/posts/pfbid0n87...",
"time": "2026-05-22T14:30:18.000Z",
"timestamp": 1779460218,
"user": {
"id": "100064792144187",
"name": "CERN",
"profileUrl": "https://www.facebook.com/cern",
"profilePic": "https://scontent-lax3-1.xx.fbcdn.net/v/t39.30808-1/..."
},
"collaborators": [],
"text": "Post text content here...",
"textReferences": [
{ "type": "ExternalUrl", "url": "https://home.cern/...", "offset": 731, "length": 96 },
{ "type": "Hashtag", "url": "https://www.facebook.com/hashtag/espp", "offset": 296, "length": 5 }
],
"link": "https://home.cern/...",
"likes": 1285,
"comments": 45,
"shares": 125,
"topReactions": [
{ "name": "Like", "count": 1167 },
{ "name": "Love", "count": 98 },
{ "name": "Care", "count": 9 },
{ "name": "Wow", "count": 8 },
{ "name": "Haha", "count": 1 },
{ "name": "Sad", "count": 1 },
{ "name": "Angry", "count": 1 }
],
"topReactionsCount": 1285,
"reactionLikeCount": 1167,
"reactionLoveCount": 98,
"reactionCareCount": 9,
"reactionWowCount": 8,
"reactionHahaCount": 1,
"reactionSadCount": 1,
"reactionAngryCount": 1,
"media": [
{
"__typename": "Photo",
"id": "1417649567071435",
"thumbnail": "https://scontent-lax3-1.xx.fbcdn.net/v/t39.30808-6/...",
"photo_image": { "uri": "https://scontent-lax3-1.xx.fbcdn.net/...", "width": 960, "height": 540 },
"url": "https://www.facebook.com/photo.php?fbid=1417649567071435&...",
"ocrText": "Artistic representation of the Future Circular Collider",
"feedback": { "can_viewer_comment": true, "id": "ZmVlZGJhY2s6..." }
}
],
"feedbackId": "ZmVlZGJhY2s6MTQxNzcwNDg3...",
"facebookId": "100064792144187",
"topLevelUrl": "https://www.facebook.com/100064792144187/posts/1417704873732571",
"pageAdLibrary": {
"is_business_page_active": false,
"id": "169005736520113"
},
"inputUrl": "https://www.facebook.com/cern"
}
],
"pagination": {
"endCursor": "Cg8Ob3JnYW5pY19j...",
"hasNextPage": true
}
}
media[0] has these fields instead of photo_image:{
"__typename": "Video",
"id": "1540366350780488",
"thumbnail": "https://scontent-lax3-1.xx.fbcdn.net/v/t15.5256-10/...",
"url": "https://www.facebook.com/reel/2188342222016401/",
"playableUrlSd": "https://video.xx.fbcdn.net/...",
"playableUrlHd": "https://video.xx.fbcdn.net/...",
"viewsCount": null
}
"error": true, check that the target page is open and the user is logged in, then retry once. If the error persists, the doc_id may have expired — see Known Limitations for recapture steps.pagination.endCursor from each response as --cursor in the next call. Start value: omit --cursor (first page). Termination: pagination.hasNextPage === false.posts.length >= 1 AND posts[0].postId is non-null AND posts[0].user.id is non-null AND posts[0].user.profilePic is non-nullviewsCount for video posts is always null — Facebook does not include video view counts in the timeline feed GraphQL response; this field requires a separate video-specific API call not covered by this Skillmedia.playableUrlSd/Hd requires the user to be logged in; unauthenticated sessions may return nullcollaborators is an empty array for most posts (only populated when the post has tagged co-authors)doc_id: 27278869228466784 is a Facebook internal query ID that may change when Facebook deploys updates; if all calls return "Unexpected response format" errors, recapture via:
network requests --filter api/graphql --method POSTX-FB-Friendly-Name: ProfileCometTimelineFeedRefetchQuerydoc_id from the POST body and update the value in scripts/get-page-posts.pypageName is derived from the URL path and may be incorrect for profile pages with numeric IDs (e.g., https://www.facebook.com/100012345 → pageName = 100012345)afterTime/beforeTime) applies to the timeline cursor position, not a strict server-side filter; posts near the boundary may occasionally appear outside the specified rangeget-page-id once per page URL and reuse the result for all paginated callsendCursor rather than starting over{working-directory}/browser-act-skill-forge-memories/facebook-posts-scraper-facebook-page-profile-posts.memory.md (working directory is determined by the Agent running the Skill, typically the project root or current working directory){YYYY-MM-DD}: {what happened} → {conclusion}