Agent skill

Facebook Groups Scrape Posts

by browser-act in browser-act/skills

Scrapes posts from a Facebook group given a group URL, sort order, and desired count — returns structured post metadata including postid, permalink, author, timestamp, body text, images/videos…

MITAuto-check passedData & Analytics

Install Facebook Groups Scrape Posts

skills CLI
$ npx skills add browser-act/skills --skill facebook-groups-scrape-posts -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install browser-act/skills facebook-groups-scrape-posts --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/browser-act/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/solutions/social-listening/facebook-groups-scrape-posts .claude/skills/facebook-groups-scrape-posts && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
facebook-groups-scrape-posts
GitHub stars
6.1k
Token cost
~2.6k tokens
SKILL.md length
1,026 words
Files
2 (incl. scripts)
Skills in repo
87
Repo updated
First seen
Licence
MIT

At a glance

Scrapes posts from a Facebook group given a group URL, sort order, and desired count — returns structured post metadata including postid, permalink, author, timestamp, body text, images/videos…

  • Works in 2 steps: Tool Readiness → Login Verification
  • : user wants to scrape/extract Facebook group posts
  • SKILL.md covers Language, Objective, Prerequisites and Pre-execution Checks, plus 7 more sections
  • Runs Python scripts from its folder; calls python; reaches facebook.com

What it does

Facebook Groups Scrape Posts is an agent skill from browser-act/skills. Scrapes posts from a Facebook group given a group URL, sort order, and desired count — returns structured post metadata including postid, permalink, author, timestamp, body text, images/videos, reaction counts, reaction type breakdown, comment count, and share count. Use when: user wants to scrape/extract Facebook group posts, collect FB group content, harvest group data, get posts from a Facebook group, monitor Facebook group activity, bulk export group posts, facebook groups scraping…

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/scrape-posts.py`).

It sits in Data & Analytics, covering Web scraping. The repository describes itself as: Browser automation CLI built for AI agents. Break through anti-bot walls, hand off to humans across platforms when stuck. Parallel multi-task execution, independent multi-session… The licence is MIT.

When your agent uses it

  • : user wants to scrape/extract Facebook group posts
  • Collect FB group content
  • Harvest group data
  • Get posts from a Facebook group

Example prompts

  • “Use the facebook-groups-scrape-posts skill to scrape posts from a Facebook group given a group URL, sort order, and desired count — returns…”
  • “/facebook-groups-scrape-posts”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Tool Readiness
  2. Login Verification

What it can do on your machine

Read from SKILL.md and the folder at commit 11c057b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • facebook.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Facebook Groups Scrape Posts loads about 2.6k tokens when it runs. Until then it costs about 143 tokens; SKILL.md has 1,026 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~143
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from browser-act/skills at commit 11c057b, republished under its MIT licence (© browser-act). 1,026 words, ~2,649 tokens.

Download SKILL.mdSave it as .claude/skills/facebook-groups-scrape-posts/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
facebook-groups-scrape-posts
description
Scrapes posts from a Facebook group given a group URL, sort order, and desired count — returns structured post metadata including post_id, permalink, author, timestamp, body text, images/videos, reaction counts, reaction type breakdown, comment count, and share count. Use when: user wants to scrape/extract Facebook group posts, collect FB group content, harvest group data, get posts from a Facebook group, monitor Facebook group activity, bulk export group posts, facebook groups scraping, facebook-groups-scrape-posts, fetch FB group feed.

Facebook Groups — Scrape Posts

Input: Facebook group URL + sort order + desired count → Output: post list with full metadata (JSON).

Language

All process output to user (progress updates, process notifications) follows the user's language.

Objective

Given a Facebook group URL, scrape N posts sorted by the specified order and return structured metadata for each post.

Prerequisites

  • Target group page is already open in the browser: https://www.facebook.com/groups/{group_slug_or_id}
  • Already logged into Facebook (user avatar, Messenger icon, and notification bell visible in the top-right corner)

Pre-execution Checks

1. Tool Readiness

If browser-act has been confirmed available in the current session → skip this step.

Invoke browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.

2. Login Verification

If Facebook login status has been confirmed in the current session → skip this step.

Otherwise, navigate to https://www.facebook.com/ and verify login status programmatically:

browser-act navigate 'https://www.facebook.com/'
browser-act wait stable --timeout 15000
browser-act eval "JSON.stringify({user_id: document.cookie.match(/c_user=(\d+)/)?.[1] || '0', USER_ID: (()=>{try{return require('CurrentUserInitialData').USER_ID;}catch(e){return '0';}})()})"

Verdict:

  • user_id is a non-empty numeric string (e.g., "61560817072276"), or USER_ID !== "0" → logged in, continue
  • user_id === null or USER_ID === "0" → not logged in; assist user: run browser-act browser open {browser_id} https://www.facebook.com/login --headed to open a headed window so the user can sign in manually (Stealth normal mode persists cookies — one login is reusable)

Facebook may clear c_user mid-session: if GraphQL errors such as field_exception or missing_required_variable_value occur during execution, re-run this login check before assuming the script is broken.

User refuses or cannot log in → terminate execution. Facebook enforces strict restrictions on unauthenticated group access (login modal blocks pagination, feed returns partial data + field_exception); login is a hard prerequisite.

Capability Components

This Skill's operational boundary = what the user can manually do in their browser. It only reads data already displayed to the authenticated user, never bypassing authentication or access controls — equivalent to copy-pasting on the user's behalf. JS code is encapsulated in Python files under the scripts/ directory, invoked via eval "$(python scripts/xxx.py {params})". $(...) is bash syntax; use the bash tool for execution.

API: Scrape group posts (with auto-pagination)

Navigate to the target group page first, then invoke the scrape script (it auto-resolves the numeric group ID from the current page):

browser-act navigate 'https://www.facebook.com/groups/{group_slug_or_id}'
browser-act wait stable --timeout 20000
browser-act eval "$(python scripts/scrape-posts.py --sort CHRONOLOGICAL --count 20)"

Parameters:

  • --sort: Sort order, default CHRONOLOGICAL. See "Enum Parameters" below
  • --count: Desired number of posts, default 20. Script auto-paginates until count is met or feed is exhausted
  • --max-pages: Pagination safety cap, default 100
  • --doc-id: GraphQL persisted query doc_id for GroupsCometFeedRegularStoriesPaginationQuery, default 26577462205242925. Update via this flag if Facebook rotates the version (see "Known Limitations")

Output example:

json
{
  "ok": true,
  "group_id": "2580640642080467",
  "group_name": "Programmer Humor",
  "sort": "CHRONOLOGICAL",
  "total": 20,
  "posts": [
    {
      "post_id": "4052937798184070",
      "cache_id": "6790541484885792441",
      "id": "UzpfSTEwMDA4ODY4MzIx...",
      "permalink_url": "https://www.facebook.com/groups/programmerhumor/posts/4052937798184070/",
      "creation_time": 1772941518,
      "message": "Those were the days my friend ...",
      "author": {
        "id": "100088683215191",
        "name": "Jeff Bramlett",
        "profile_picture": null,
        "url": "https://www.facebook.com/JeffieB56"
      },
      "group": {
        "id": "2580640642080467",
        "name": "Programmer Humor",
        "url": "https://www.facebook.com/groups/programmerhumor/"
      },
      "reactions": {
        "total": 1,
        "total_formatted": "1",
        "breakdown": [
          { "name": "Haha", "reaction_id": "115940658764963", "count": 1 }
        ]
      },
      "share_count": 0,
      "share_count_formatted": "0",
      "comment_count": 0,
      "media": [
        {
          "__typename": "Photo",
          "id": "938454962453936",
          "photo_image": "https://scontent-...fbcdn.net/v/t39...jpg"
        }
      ]
    }
  ],
  "diagnostics": {
    "pages": [
      { "pageIdx": 0, "httpStatus": 200, "edgeCount": 4, "err": null, "hasNext": true }
    ]
  }
}

Video posts include additional fields in media: playable_url (mp4 direct link), playable_url_hd, and thumbnail.

Enum Parameters

[AI] --sort sort order — Facebook accepts the following three values:

  • TOP_POSTS — most relevant (default web sort)
  • CHRONOLOGICAL — newest first (reverse chronological by post time)
  • RECENT_ACTIVITY — most recently active (reverse chronological by latest comment/reaction time)

Values are fixed and validated by argparse choices; no runtime query needed.

Pagination

API Pagination: handled automatically by the script.

  • Pagination parameter: cursor (embedded in GraphQL variables)
  • Type: opaque cursor (server-side state, base64-encoded)
  • Initial value: null (first request)
  • Next page value: data.node.group_feed.page_info.end_cursor
  • Each response returns 3 edges (FB streaming mode ignores client-provided count)
  • Termination: has_next_page === false, or --count / --max-pages limit reached

Success Criteria

  • ok === true and total >= 1
  • posts[*].post_id non-null rate = 100% (non-post units such as Section Headers are filtered out by the script)
  • posts[*].permalink_url and posts[*].creation_time non-null rate = 100%
  • When using CHRONOLOGICAL sort, creation_time is strictly monotonically decreasing
Show full SKILL.md (474 more words)Show less

Known Limitations

  • Public groups only: private groups require membership; returns empty or permission error when not a member
  • No comment body: comment_count returns total count but the group feed GraphQL does not include top_comments content or authors. Facebook places comment data in a separate CommentsRenderer query triggered only when the user clicks "Comments" — fetching comment bodies requires additional per-post_id GraphQL requests (out of scope)
  • doc_id rotates with Facebook frontend versions: when the default 26577462205242925 expires (PersistedQueryNotFound or HTTP 404), retrieve a fresh one:
    1. Open any group page while logged in
    2. Scroll down to trigger a new batch of posts
    3. browser-act network requests --filter api/graphql --method POST
    4. Check X-FB-Friendly-Name header on each request; find GroupsCometFeedRegularStoriesPaginationQuery
    5. Extract doc_id from that request's POST body and pass it via --doc-id
  • group_name can be null: parsed from page HTML via heuristic regex; prefer posts[*].group.name (more reliable)
  • Localized count fields: reactions.total_formatted and share_count_formatted format depends on Facebook's UI language (e.g., non-English Facebook UI may return locale-specific number abbreviations instead of "12K")
  • Rapid requests trigger temporary throttling: paginating too fast or calling multiple groups concurrently may return empty responses or temporary bans. Serialize group requests with a 2–5 s sleep between each
  • GraphQL field_exception / partial edges + errors: almost always caused by session cookie being cleared. Check c_user cookie and require('CurrentUserInitialData').USER_ID — if 0 / null, return to "Login Verification" and re-login; do not attempt to extract data from error responses
  • Author avatar often null: author.profile_picture is frequently unloaded in the group feed default response (Facebook lazy-loads avatars); a separate query is required if avatars are needed

Execution Efficiency

  • Batch orchestration: for small counts, call each group directly; for large counts, write a bash script to loop serially — do not parallelize (prone to anti-scraping triggers). Test with a minimal sample before running the full batch. Add appropriate intervals per rate guidance in "Known Limitations" above
  • Test before batch execution: always test with 1–2 items to verify the script runs correctly before running the full batch
  • Reduce redundant pre-operations: when multiple steps share the same prerequisite state, complete them in batch under that state to avoid repeatedly re-establishing it
  • Error resumption: save results item by item during batch processing; resume from the breakpoint on failure rather than starting over

Experience Notes

Path: {working-directory}/browser-act-skill-forge-memories/facebook-groups-scrape-posts-facebook-groups-scrape-posts.memory.md (working directory is determined by the Agent running the Skill, typically the project root or current working directory)

Before execution: If the file exists, read it first — it records unexpected situations encountered during past executions (e.g., a strategy has become ineffective); adjust strategy order accordingly.

After execution: If an unexpected situation is encountered (strategy became ineffective, page redesigned, anti-scraping upgraded, better path discovered), append a line: {YYYY-MM-DD}: {what happened} → {conclusion}

Normal execution does not write to the file. Do not record which groups were used or how many posts were returned — those are task outputs, not experience.

© browser-act, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (scripts) in solutions/social-listening/facebook-groups-scrape-posts of browser-act/skills.

  • SKILL.md
  • scripts/scrape-posts.py

Open the folder on GitHubat commit 11c057b

Compare with similar skills

Facebook Groups Scrape Posts next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Facebook Groups Scrape Posts compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Facebook Groups Scrape Posts this skillbrowser-act/skills6.1k—~2.6kAutomated safety check: PassMIT
Tmuxtrpc-group/trpc-agent-go1.8k24 repos~868Automated safety check: PassApache-2.0
Ketch1broseidon/ketch6971 repos~3.9kAutomated safety check: PassMIT
Crawl4AI Web Scrapingsmallnest/goclaw5981 repos~2.5kAutomated safety check: PassMIT
Boss Zhipin Scrapereatmoreduck/boss-zhipin-scraper1.5k—~2.6kAutomated safety check: PassMIT
Axyusukebe/ax7191 repos~918Automated safety check: PassMIT

Similar skills

  • Tmux

    trpc-group/trpc-agent-go

    Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

    1.8k GitHub starsUsed in 24 repos~868 tokens
    Data & AnalyticsAuto-check passed
  • Ketch

    1broseidon/ketch

    Research skill for ketch — a fast stateless CLI for web search, OSS code search, curated library docs, page scraping, and site crawling; an optional MCP server exists for operators who want it, but…

    697 GitHub starsUsed in 1 repo~3.9k tokens
    Data & AnalyticsAuto-check passed
  • Crawl4AI Web Scraping

    smallnest/goclaw

    Scrapes sites, handles JavaScript-heavy pages and extracts structured data with Crawl4AI, through its crwl CLI or Python SDK, including schema-based extraction without an LLM.

    598 GitHub starsUsed in 1 repo~2.5k tokens
    Data & AnalyticsAuto-check passed
  • Boss Zhipin Scraper

    eatmoreduck/boss-zhipin-scraper

    Scrape BOSS直聘 (job listing site) via Chrome CDP. An agent skill from eatmoreduck/boss-zhipin-scraper.

    1.5k GitHub stars~2.6k tokensUpdated 9 days ago
    Data & AnalyticsAuto-check passed
  • Ax

    yusukebe/ax

    Use the ax CLI instead of curl + throwaway parsing scripts whenever you fetch a URL, explore an unknown web page, or extract structured data from HTML.

    719 GitHub starsUsed in 1 repo~918 tokens
    Data & AnalyticsAuto-check passed
  • Anakinscraper

    Anakin-Inc/anakin

    Scrape any website into clean markdown or structured JSON. An agent skill from Anakin-Inc/anakin.

    4.5k GitHub stars~859 tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed

More from browser-act/skills

All 87 skills in this repo
  • Amazon ASIN Lookup

    browser-act/skills

    Fetches structured Amazon product details such as title, price, ratings and availability for a given ASIN through BrowserAct's lookup API template.

    6.1k GitHub starsUsed in 2 repos~1.5k tokens
    Auto-check passed
  • Amazon Best Sellers Finder

    browser-act/skills

    Extracts structured Amazon product data for a keyword and marketplace through the BrowserAct API, including titles, prices, ratings, reviews, sales volume and promotions.

    6.1k GitHub starsUsed in 2 repos~1.5k tokens
    Auto-check passed
  • Amazon Buy Box Monitor

    browser-act/skills

    Pulls Amazon product details, competing seller prices and seller ratings for a given ASIN through the BrowserAct API, without browser automation.

    6.1k GitHub starsUsed in 2 repos~1.6k tokens
    Auto-check passed
  • Analyzes a competitor's Amazon listing by ASIN with BrowserAct data extraction, then reports what it does well, where the market has gaps and opportunity points for your own listing.

    6.1k GitHub starsUsed in 2 repos~3.2k tokens
    Auto-check passed
  • Pulls structured Amazon search results (titles, ASINs, prices, ratings, specifications) for a keyword and brand through BrowserAct's Amazon Product API template.

    6.1k GitHub starsUsed in 2 repos~1.5k tokens
    Auto-check passed
  • Collects structured product data from Amazon search results for a keyword and optional brand, using a BrowserAct script, for market and competitor research.

    6.1k GitHub starsUsed in 2 repos~1.6k tokens
    Auto-check passed

Questions about Facebook Groups Scrape Posts

What does Facebook Groups Scrape Posts do?

Scrapes posts from a Facebook group given a group URL, sort order, and desired count — returns structured post metadata including postid, permalink, author, timestamp, body text, images/videos…. Facebook Groups Scrape Posts is an agent skill from browser-act/skills. Scrapes posts from a Facebook group given a group URL, sort order, and desired count — returns structured post metadata including postid, permalink, author, timestamp, body text, images/videos, reaction counts, reaction type breakdown, comment count, and share count.

When should I use Facebook Groups Scrape Posts?

Facebook Groups Scrape Posts fits situations like: : user wants to scrape/extract Facebook group posts; collect FB group content; harvest group data; get posts from a Facebook group.

How do I install Facebook Groups Scrape Posts in Claude Code?

Run `npx skills add browser-act/skills --skill facebook-groups-scrape-posts -a claude-code`. Or copy the skill folder (solutions/social-listening/facebook-groups-scrape-posts in browser-act/skills) into .claude/skills/facebook-groups-scrape-posts in your project. Claude Code loads it when a task matches its description.

How do I install Facebook Groups Scrape Posts in Codex?

Run `npx skills add browser-act/skills --skill facebook-groups-scrape-posts -a codex`. Or copy the skill folder (solutions/social-listening/facebook-groups-scrape-posts in browser-act/skills) into .agents/skills/facebook-groups-scrape-posts in your project. Codex loads it when a task matches its description.

Can I use Facebook Groups Scrape Posts in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add browser-act/skills --skill facebook-groups-scrape-posts -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/facebook-groups-scrape-posts, .gemini/skills/facebook-groups-scrape-posts, .github/skills/facebook-groups-scrape-posts and .opencode/skills/facebook-groups-scrape-posts in your project.

What does Facebook Groups Scrape Posts need to run?

Going by SKILL.md and its folder, Facebook Groups Scrape Posts needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Facebook Groups Scrape Posts access the network?

SKILL.md names 1 domain. In commands or code: facebook.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Facebook Groups Scrape Posts safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Facebook Groups Scrape Posts use?

Facebook Groups Scrape Posts is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Facebook Groups Scrape Posts use?

About 2.6k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Facebook Groups Scrape Posts?

Skills that share tags, products or a category with Facebook Groups Scrape Posts: Tmux (trpc-group/trpc-agent-go, 1.8k stars), Ketch (1broseidon/ketch, 697 stars), Crawl4AI Web Scraping (smallnest/goclaw, 598 stars) and Boss Zhipin Scraper (eatmoreduck/boss-zhipin-scraper, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Facebook Groups Scrape Posts?

browser-act (a GitHub organization) maintains it in browser-act/skills, which has 6,114 GitHub stars. The repository holds 87 skills in this directory. The repository was last updated on August 24, 2026.

Source: browser-act/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.