> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/use-cases/facebook-group-data-api>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/use-cases/facebook-group-data-api.mdx>

---

# Facebook group data API

Paginated posts from public Facebook groups — text, authors, timestamps, engagement — same JSON envelope as other platforms.

Public Facebook groups carry local listings, vendor comparisons, and support threads — no Graph API export for polling. Headless Chrome breaks on login walls and DOM rewrites; private groups are out of scope.

GET /v1/facebook/groups/posts returns normalized posts with cursor pagination. Check data.lookupStatus; filter keywords client-side.

## Endpoints

| Method | Path | What it does |
| --- | --- | --- |
| GET | `/v1/facebook/groups` | About-page profile for a public group URL or numeric groupId — name, privacy, visibility, member counts, admins, activity, and rules. Use this to identify a community before you poll its feed. |
| GET | `/v1/facebook/groups/posts` | Core feed for a public group URL. Pass sortBy=chronological for timeline order, chronologicalListings for marketplace-style buy/sell groups, recentActivity when you care about threads with fresh comments, or top for high-engagement posts in the window. |
| GET | `/v1/facebook/posts/comments` | Comment thread on a group post permalink — useful when the post text is thin but replies carry the signal (pricing negotiations, vendor recommendations, complaint details). |
| GET | `/v1/facebook/profiles` | Resolve a public page or profile URL when you need to link post authors to a business page, location tag, or cross-platform handle in your graph. |

## Workflow

1. **Map groups to monitoring jobs.** Start with a spreadsheet of public group URLs — city-specific buy/sell, vertical hobby, franchise ops, local services. Tag each row with the sort order it needs: chronologicalListings for marketplace groups, recentActivity when replies matter more than the original post.
2. **Poll feeds on your cadence.** Hit /v1/facebook/groups/posts per group on a cron or queue worker. Page with data.page.nextCursor until it is null. Each page is a separate billed lookup — budget weekly sweeps differently from hourly buy/sell watches.
3. **Extract intent from post text.** No server-side keyword filter on this route. Fetch pages, match on body text client-side: "ISO", "recommend", "moving sale", competitor names, SKU fragments. Dedupe by post ID before writing to your warehouse or firing Slack webhooks.
4. **Pull comments when threads carry the signal.** A one-line "anyone know a good plumber in Round Rock?" post often gets the real answer in replies. Pass the post URL to /v1/facebook/posts/comments and score the thread, not just the headline.
5. **Enrich for local business intel.** Buy/sell and local service groups encode geography in the group itself — you already know the metro. Join post timestamps with your territory model. Flag listings under market price, recurring vendor mentions, or complaint patterns about a brand you track.
6. **Scale community management review.** Moderation teams watching dozens of brand-owned or partner groups can pre-filter new posts against policy rules before a human opens Facebook. Route high-risk matches to a review queue; archive everything else for trend reports.

## Example: buy/sell group with listing sort

```bash
curl -sS \
  -H "x-api-key: YOUR_API_KEY" \
  -G "https://api.socialfetch.dev/v1/facebook/groups/posts" \
  --data-urlencode "url=https://www.facebook.com/groups/austin-buy-sell-trade" \
  --data-urlencode "sortBy=chronologicalListings"
```

## Why teams skip DIY Facebook scrapers

- Facebook sits beside Instagram, Threads, Reddit, and web utilities under one API key — cross-platform studies do not need a separate scraper repo per network.
- Each page returns a small batch of posts with predictable credit cost; no surprise egress bills from a headless browser farm.
- When Meta changes feed markup, your integration keeps the same field names — you are not rewriting CSS selectors on every deploy.
- lookupStatus tells you found vs not_found vs lookup_failed before you parse items; infrastructure failures are not charged.
- Credits do not expire between monthly research windows — poll ten groups weekly or two hundred during a market entry sprint on the same balance.
- No published rate cap beyond your credit balance; concurrency is capped at 200 requests in flight per workspace, and requests over that get an uncharged 503 with Retry-After.
