Apify example task · whoareyouanas/facebook-group-scraper

Create a text digest of public CDC Facebook posts

Collect a small text and engagement sample from the public CDC Page. Use timestamps and source links to assemble a weekly publication digest.

Actor
Facebook Group & Page Scraper - Posts, Comments & Reactions
Result limit
5 (maxPosts)
Estimated cost
Up to $0.05
Run options
Actor defaults

Example updated 2026-11-20 · actor build 0.1.18 · runs in your own Apify account

01 / About the actor

Facebook Group & Page Scraper - Posts, Comments & Reactions

Export posts from Facebook groups and Pages with text, reactions, supported comments, media references, author information, and optional entity metadata. A run can mix several group and Page sources.

Groups and Pages

Use one startUrls list for public groups, brand Pages, creator Pages, and other supported feeds.

More post context

Include comments, media, and group or Page details when the source exposes them.

Repeatable collection

Control run size, date cutoff, concurrency, and request timeouts for saved tasks or API calls.

02 / Input

The exact input this example runs.

startUrls is required. Set maxPosts deliberately and choose whether comments, media, and entity information are needed. Private-group workflows require valid user-supplied cookies and existing access.

input.json · facebook-page-text-digest
{
  "maxPosts": 5,
  "maxConcurrency": 1,
  "includeComments": false,
  "includeMedia": false,
  "startUrls": [
    {
      "url": "https://www.facebook.com/CDC"
    }
  ],
  "viewOption": "CHRONOLOGICAL",
  "includeGroupInfo": false
}
Input fields used by this example, their values and what they control
FieldValue in this exampleWhat it controls
maxPostsChange this5Maximum number of posts to scrape per group or Page. The scraper will stop scrolling once this limit is reached. Set to a lower value for faster runs.
maxConcurrency1Number of browser tabs to run in parallel. Keep at 1 for stability. Increase to 2-3 only if you need faster scraping and have sufficient memory. Higher values increase memory usage.
includeCommentsChange thisfalseWhether to scrape top-level comments for each post. Disabled by default to keep runs faster and cheaper; enable it when you need richer data.
includeMediaChange thisfalseWhether to include image/video URLs in output and allow browser media downloads while scraping. Disable this to reduce residential proxy bandwidth usage; text, post metadata, reactions, and counts will still be scraped where available.
startUrlsChange thishttps://www.facebook.com/CDCURLs of Facebook groups OR Pages to scrape. Group example: https://www.facebook.com/groups/123456789 — Page example: https://www.facebook.com/ohpollyfashion. You can mix groups and Pages in the same run.
viewOptionChange this"CHRONOLOGICAL"How posts should be sorted when scraping the feed.
includeGroupInfoChange thisfalseWhether to scrape entity metadata. For groups: name, description, member count, privacy status, admins, rules. For Pages: name, description, follower count, like count, page category, verified status, cover photo.
Other inputs you can add (6)
Deployed actor input fields, types, defaults, and descriptions
FieldType / requiredDefaultPurpose
onlyPostsNewerThanstringNot specifiedOnly scrape posts published after this date. Use ISO 8601 format (e.g. 2024-01-01 or 2024-06-15T00:00:00Z). Leave empty to scrape all posts up to maxPosts limit.
cookiesarrayNot specifiedPaste your Facebook cookies as a JSON array to access private/closed groups or login-walled Pages. Export the full facebook.com cookie set from your logged-in browser for best reliability. At minimum, include 'c_user' and 'xs'; companion cookies such as 'fr', 'datr', 'sb', and 'wd' are recommended.
requestHandlerTimeoutSecsinteger600Maximum time in seconds to spend scraping a single group or Page. Targets with many posts need longer timeouts. Default of 600 seconds (10 minutes) handles most cases.

Minimum: 60 · Maximum: 1200

minResultsPerMinuteinteger20Stops slow targets after the grace period when result velocity is below this value. This protects pay-per-result margins on blocked or low-yield pages. Set to 0 to disable.

Minimum: 0 · Maximum: 1000

costGuardGracePeriodSecsinteger120How long each target can run before the minimum-results-per-minute guard is enforced.

Minimum: 30 · Maximum: 1200

proxyUrlstringNot specifiedAdd your Apify Proxy URL for reliable scraping. Format: http://groups-RESIDENTIAL:[email protected]:8000. Get your token from Apify Console. External proxies (BrightData, Oxylabs) also work.

03 / Make it yours

Change these fields for your own research.

  1. 01 · maxPosts

    Max Posts

    Maximum number of posts to scrape per group or Page. The scraper will stop scrolling once this limit is reached. Set to a lower value for faster runs.

    Example: 5

  2. 02 · includeComments

    Include Comments

    Whether to scrape top-level comments for each post. Disabled by default to keep runs faster and cheaper; enable it when you need richer data.

    Example: false

  3. 03 · includeMedia

    Include Media URLs

    Whether to include image/video URLs in output and allow browser media downloads while scraping. Disable this to reduce residential proxy bandwidth usage; text, post metadata, reactions, and counts will still be scraped where available.

    Example: false

  4. 04 · startUrls

    Facebook Group or Page URLs

    URLs of Facebook groups OR Pages to scrape. Group example: https://www.facebook.com/groups/123456789 — Page example: https://www.facebook.com/ohpollyfashion. You can mix groups and Pages in the same run.

    Example: https://www.facebook.com/CDC

  5. 05 · viewOption

    Post View / Sort Order

    How posts should be sorted when scraping the feed.

    Example: "CHRONOLOGICAL"

  6. 06 · includeGroupInfo

    Include Group / Page Info

    Whether to scrape entity metadata. For groups: name, description, member count, privacy status, admins, rules. For Pages: name, description, follower count, like count, page category, verified status, cover photo.

    Example: false

Run it in three steps

  1. Open the example on Apify and select Try for free to copy it into your Apify account.
  2. Replace the sample values above with your own target and keep the limit small.
  3. Start the run, then export the dataset as JSON, CSV or Excel.

04 / Output

What the results table shows.

Columns in the “Overview” view

postId

Post ID

postUrl

Post URL

groupName

Group / Page Name

groupUrl

Group / Page URL

authorName

Author Name

authorProfileUrl

Author Profile URL

authorId

Author ID

text

Text

postType

Post Type

timestamp

Timestamp

formattedDate

Formatted Date

likesCount

Likes

lovesCount

Loves

hahaCount

Haha

wowCount

Wow

sadCount

Sad

angryCount

Angry

totalReactions

Total Reactions

commentsCount

Comments

sharesCount

Shares

images

Images

videos

Videos

topComments

Top Comments

source

Source

scrapeDate

Scrape Date

A view selects columns for the table. The full JSON export keeps every field, including nested arrays and objects.

05 / Cost

What this example costs to run.

At most about $0.05: up to 5 results at $0.01 each (Post Scraped) plus $0.00005 per GB of memory for the start event. Fewer results cost less. The live Pricing tab on Apify is authoritative.

Prices checked 2026-11-22. Set a run spending limit in Apify when you widen the input.

06 / API

Run the same input from your code.

This call starts a billable run of Facebook Group & Page Scraper - Posts, Comments & Reactions with this example's input and returns the dataset items when it finishes. Synchronous calls wait up to five minutes; for longer runs, POST to /runs instead and read the run's default dataset when it succeeds. Keep the token in an environment variable.

cURL · run and return the results
curl --request POST \
  'https://api.apify.com/v2/acts/whoareyouanas~facebook-group-scraper/run-sync-get-dataset-items?format=json' \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{"maxPosts":5,"maxConcurrency":1,"includeComments":false,"includeMedia":false,"startUrls":[{"url":"https://www.facebook.com/CDC"}],"viewOption":"CHRONOLOGICAL","includeGroupInfo":false}'

Coverage & interpretation

Check the result before relying on it.

Questions

About this example.

What does the "Create a text digest of public CDC Facebook posts" example collect?

Collect a small text and engagement sample from the public CDC Page. Use timestamps and source links to assemble a weekly publication digest. It runs Facebook Group & Page Scraper - Posts, Comments & Reactions, published by whoareyouanas on Apify.

Which input does this example use?

Max Posts (maxPosts) set to 5; Include Comments (includeComments) set to false; Include Media URLs (includeMedia) set to false; Facebook Group or Page URLs (startUrls) set to https://www.facebook.com/CDC; Post View / Sort Order (viewOption) set to "CHRONOLOGICAL"; Include Group / Page Info (includeGroupInfo) set to false. The full JSON input is shown on this page.

How much does it cost to run this example?

At most about $0.05: up to 5 results at $0.01 each (Post Scraped) plus $0.00005 per GB of memory for the start event. Fewer results cost less. The live Pricing tab on Apify is authoritative.

How do I change it for my own research?

Open the example on Apify and select Try for free to copy it into your account, then edit Max Posts, Include Comments, Include Media URLs, Facebook Group or Page URLs, Post View / Sort Order, Include Group / Page Info. Keep the result limit small for the first run and check the output before scaling up.

Can I run it from the API or on a schedule?

Yes. Send the same JSON input to the Facebook Group & Page Scraper - Posts, Comments & Reactions run endpoint with your Apify API token, or save the copied task in your Apify account and add a schedule. Results land in the run's default dataset as JSON, CSV or Excel.

More examples

Related tasks you can copy.

Guides

Read more about this workflow.