Facebook Groups Posts & Comments Scraper avatar

Facebook Groups Posts & Comments Scraper

Pricing

$19.99/month + usage

Go to Apify Store
Facebook Groups Posts & Comments Scraper

Facebook Groups Posts & Comments Scraper

Gather high-quality data from public Facebook groups—posts, comments, reactions, images, and contextual metadata. Designed for researchers, brands, and developers needing accurate, scalable group insights for analytics or automation.

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

SimpleAPI

SimpleAPI

Maintained by Community

Actor stats

1

Bookmarked

78

Total users

2

Monthly active users

4 days ago

Last modified

Share

📘 Facebook Groups Posts & Comments Scraper

Scrape posts (and optionally comments) from public Facebook groups. This Apify actor discovers Facebook's internal GraphQL feed automatically, paginates the group feed, and returns structured data: post text, author profile, a full reaction-type breakdown, photo/video/shared-link attachments, absolute timestamps, derived lead-gen fields, and optional per-post comments in a separate child dataset.

Keywords: facebook groups scraper, facebook group posts, facebook comments scraper, facebook data extraction, social media scraper, facebook reactions, lead generation, facebook group monitoring, facebook posts export, facebook engagement data.

Features

  • 🔎 Automatic discovery of the group node_id, GraphQL doc_id, and pagination cursor.
  • 👍 Full reaction breakdown — like, love, haha, wow, sad, angry, care + total.
  • 👤 Author details — id, name, profile URL, profile picture, and __typename (User/Page).
  • 🖼️ Attachments — photos, videos (playable URL / HD / thumbnail / duration), shared links (URL/title/description), and albums.
  • 🕒 Absolute timetimestamp (epoch), date (ISO 8601), and scrapedAt.
  • 🗂️ Post type label — text / photo / video / link / album / reshare.
  • 🧮 Derived fields (no AI) — hashtags, mentions, links, emails, phones, engagementScore, postAgeDays.
  • 🚫 Filters — include/exclude keywords, minLikes / minComments / minShares, and date range (onlyPostsNewerThan / onlyPostsOlderThan).
  • 💬 Comments (opt-in) — interleaved right after each post (type: "comment", isChild: true, linked via parentId), mirrored to a per-run comments-<runId> dataset. resultsLimit counts POSTS only; comments are additional and capped by maxComments.
  • 🤖 Optional AI enrichment — sentiment, language, topics, buy-intent and lead-signal on post text via your own LLM key (off by default, multi-provider).
  • 🌐 Proxy — your proxyConfiguration is honored; residential is the default when none is set.

Input

FieldTypeDescription
startUrlsarrayPublic Facebook group URLs (required).
resultsLimitintegerMax number of POSTS (parents). Comments are extra. Default 20.
viewOptionenumFeed order: CHRONOLOGICAL / RECENT_ACTIVITY / TOP_POSTS / CHRONOLOGICAL_LISTINGS.
keywordsarrayKeep posts containing any of these words.
excludeKeywordsarrayDrop posts containing any of these words.
minLikes / minComments / minSharesintegerMinimum engagement thresholds.
onlyPostsNewerThan / onlyPostsOlderThandateAbsolute (2024-01-15) or relative ("2 weeks").
searchGroupKeyword / searchGroupYearstringClient-side search / year filter.
includeCommentsbooleanCollect comments per post (opt-in).
maxCommentsintegerCap comments per post (0 = no cap). Default 10.
aiEnhancementbooleanEnable AI enrichment (off by default).
aiModelenumLLM model; provider auto-detected from the name.
aiApiKeysecretLLM provider API key (or set the provider env var).
maxRequestRetriesintegerRetries per GraphQL request. Default 3.
proxyConfigurationproxyProxy settings (residential by default).
cookieStringsecretOptional logged-in cookies (c_user + xs) for reliability / closed groups.

Example input

{
"startUrls": ["https://www.facebook.com/groups/cheapmealideas/"],
"resultsLimit": 20,
"viewOption": "RECENT_ACTIVITY",
"excludeKeywords": ["spam"],
"minLikes": 5,
"onlyPostsNewerThan": "30 days",
"includeComments": true,
"maxComments": 10
}

Output

Each post row (type: "post", isChild: false) contains: id, postId, url, date, timestamp, scrapedAt, user (id/name/profileUrl/profilePicture/__typename), text, postType, reaction breakdown (reactionLikeCountreactionCareCount, topReactionsCount), likesCount, commentsCount, sharesCount, attachments, topComments, feedbackId, groupTitle, facebookId, and derived fields (hashtags, mentions, links, emails, phones, engagementScore, postAgeDays). When AI is enabled: aiSentiment, aiLanguage, aiTopics, aiBuyIntent, aiLeadSignal.

Each comment row (type: "comment", isChild: true) is interleaved after its post and contains parentId, parentUrl, id, url, date, text, user, likesCount, threadingDepth. Comment rows are also mirrored to a separate comments-<runId> dataset.

How it works

  1. Fetches the group page HTML through the proxy and extracts the GraphQL parameters and CSRF tokens.
  2. Paginates the GroupsCometFeedRegularStoriesPaginationQuery feed, deduplicating posts across pages and across retry attempts.
  3. Normalizes each story node into the output schema and computes derived fields.
  4. Applies filters, then charges and pushes accepted posts; when enabled, collects and interleaves comments.

Notes & limitations

  • Only public groups are reliably accessible without authentication. For closed/private groups, provide cookieString.
  • Facebook may serve a login wall to some IPs; the actor retries on fresh residential IPs and reports a clear error if it persists.
  • Date filters are applied client-side after extraction.
  • Comment collection returns the comments exposed by Facebook's feed payload for each post (typically the top/most-relevant comments), capped by maxComments. Exhaustive comment pagination for very high-comment posts may be partial.

Compliance

Scrape only public data and respect Facebook's Terms and applicable laws (including GDPR/CCPA). You are responsible for how you use the collected data.