# Facebook Posts Scraper: Groups, Pages & Profiles (`luzivanlt/facebook-posts-scraper`) Actor

Posts from public Facebook groups, Pages and profiles with reaction, comment and share counts. $2 per 1,000 posts. Photos and videos, newest first, back to a date you choose.

- **URL**: https://apify.com/luzivanlt/facebook-posts-scraper.md
- **Developed by:** [Luzi](https://apify.com/luzivanlt) (community)
- **Categories:** Social media, Lead generation, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 posts

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook Posts Scraper: Groups, Pages & Profiles

Get the posts from public Facebook groups, Pages and profiles, each with its
reaction, comment and share counts and its photos and videos: newest first,
back to a date you choose. No Facebook account, login or cookies needed.

### What does this Actor do?

You give it links to public Facebook groups, Pages or profiles. For each link
it reads the feed the way a logged-out visitor sees it, starting with the
newest post. It saves one row per post until it reaches your date or your post
limit.

Each post comes with:

- the post's text, and the text of the post it shares, if it shares one
- when it was posted (UTC)
- who posted it: name, Facebook id, profile link and picture
- its reaction, comment and share counts, and its reactions by type (like,
  love, haha, …) when the post has any
- links to its photos and videos, with their sizes and Facebook's description
  of each photo
- the group, Page or profile it came from
- a link to the post

When a post has them, it also comes with the comments Facebook shows with it,
the hashtags, mentions and links in its text, the post it shares, and a sale
post's item and price.

### Why use it?

- **Keep up without scrolling.** Follow market listings, community news, brand
  mentions or a competitor's announcements in the groups and Pages you care
  about, without opening Facebook.
- **Get a steady feed.** Schedule it daily with `1 day` and receive each day's
  new posts.
- **Use the data anywhere.** Download as JSON, CSV or Excel, or send it to
  your own tools through Apify's API and integrations.

### How to use it

1. Paste one or more links into **Groups, Pages or profiles**.
2. In **Only posts newer than**, choose how far back to read: a date such as
   `2026-10-01`, or a period such as `3 days`.
3. Optionally, set **Max posts per link**.
4. Click **Start**. When the run ends, open the **Output** tab to view the
   posts or download them.

Run it with no input to see a sample: up to 50 posts from one public group,
charged as usual.

#### Links that work

| Link         | Looks like                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------- |
| Public group | `https://www.facebook.com/groups/1007033107457891`                                          |
| Page         | `https://www.facebook.com/nasa`                                                             |
| Profile      | `https://www.facebook.com/<username>` or `https://www.facebook.com/profile.php?id=<number>` |

Mobile links (`m.facebook.com`) and links carrying tracking parameters
(`?mibextid=…`, `?ref=…`) work too. They are cleaned up, and a link pasted
twice is read once.

Use the link of the group, Page or profile itself. Links to a single post and
share links (`facebook.com/share/…`) are not supported yet. Paste the links
into the list: uploading a file of links is not supported yet.

### Input

| Field                                            | What it does                                                                                                                                                        | Default |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| **Groups, Pages or profiles** (`startUrls`)      | The links to read. Required.                                                                                                                                        | —       |
| **Only posts newer than** (`onlyPostsNewerThan`) | The oldest post to keep. A date (`YYYY-MM-DD`, counted from midnight UTC), or a period back from the start of the run: `N days`, `N weeks`, `N months` or `N years` | `1 day` |
| **Max posts per link** (`maxPostsPerLink`)       | Stop reading a link after this many posts, from 1 to 10,000                                                                                                         | `50`    |
| **Only new posts** (`onlyNewItems`)              | Return only the posts an earlier run did not; see New items only below                                                                                              | off     |

Example input:

```json
{
  "startUrls": [
    { "url": "https://www.facebook.com/groups/1007033107457891" },
    { "url": "https://www.facebook.com/nasa" }
  ],
  "onlyPostsNewerThan": "3 days",
  "maxPostsPerLink": 50
}
```

### New items only

Turn on **Only new posts** (`onlyNewItems`) for a scheduled run, or a re-run
of the same task. Each run then returns only the posts it has not returned
before: it reads each link back to a day before the last run that read it, and
skips the posts an earlier run saved. Skipped posts are neither saved nor
charged; each new post is charged as usual. Each link read is still charged
its link event ($0.002), new posts or not.

- Runs with other settings, or from another task, keep their own list, so two
  schedules on one link never skip each other's posts.
- If a link stops at **Max posts per link**, the posts past that point are not
  returned later. Set the maximum above what one link gets between runs.
- Set **Only posts newer than** to more than the time between runs plus a day
  (the daily task uses `1 week`): a shorter window, such as the default `1 day`
  on a daily schedule, ends each walk before it reaches back a day before the
  last run. The first run reads the whole window, up to the maximum per link.
- The list lives in your Apify account, in a key-value store named
  `facebook-posts-scraper-monitor`. Delete it to start afresh.

### Output

One row per post. An example, with the text and links shortened and made-up
counts:

```json
{
  "post_id": "1656760789152624",
  "url": "https://www.facebook.com/NASA/posts/pfbid0UQkYmBMPZYZi3s8yUheTZjKVMfZjtCmoz1S8SMEYDU49FZz8ehJJDJViGam7K3yGl",
  "posted_at": "2026-10-14T15:16:24.000Z",
  "text": "Have you seen our new episode of Planetary Defenders yet? …",
  "shared_text": null,
  "author_name": "NASA - National Aeronautics and Space Administration",
  "author_id": "100044561550831",
  "source_name": "NASA - National Aeronautics and Space Administration",
  "source_type": "page_or_profile",
  "source_id": "100044561550831",
  "source_url": "https://www.facebook.com/nasa",
  "reaction_count": 2410,
  "reactions": { "like": 1980, "love": 352, "wow": 61, "care": 12, "haha": 5 },
  "comment_count": 87,
  "share_count": 143,
  "media": [
    {
      "type": "photo",
      "id": "1656760742485962",
      "url": "https://scontent.xx.fbcdn.net/v/…/1.jpg?…",
      "width": 2048,
      "height": 1365,
      "image_text": "May be an image of outer space"
    },
    {
      "type": "video",
      "id": "1656760755819294",
      "url": "https://video.xx.fbcdn.net/v/…/hd.mp4?…",
      "hd_url": "https://video.xx.fbcdn.net/v/…/hd.mp4?…",
      "sd_url": "https://video.xx.fbcdn.net/v/…/sd.mp4?…",
      "thumbnail_url": "https://scontent.xx.fbcdn.net/v/…/thumb.jpg?…",
      "width": 1280,
      "height": 720,
      "duration_ms": 61000
    }
  ],
  "photo_count": 4,
  "author_url": "https://www.facebook.com/NASA",
  "author_picture_url": "https://scontent.xx.fbcdn.net/v/…/p.jpg?…",
  "page_ad_library": { "id": "100000000000099", "is_business_page_active": false },
  "top_comments": [
    {
      "comment_id": "1656790012345678",
      "text": "Can't wait to watch it!",
      "author_name": "Alex Example",
      "author_id": "100000000000001",
      "author_url": null,
      "created_at": "2026-10-14T16:02:11.000Z",
      "reply_count": 3,
      "url": "https://www.facebook.com/NASA/posts/pfbid0UQk…?comment_id=1656790012345678"
    }
  ],
  "hashtags": ["#PlanetaryDefense"],
  "mentions": [],
  "links": ["https://science.nasa.gov/planetary-defense/"],
  "shared_post": null,
  "sale": null,
  "story_id": "UzpfSTEwMDA0NDU2MTU1MDgzMTo…",
  "feedback_id": "ZmVlZGJhY2s6MTY1Njc2MDc4OTE1MjYyNA=="
}
```

| Field                              | What it holds                                                                                                                                                                                                                       |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `post_id`                          | Facebook's id for the post                                                                                                                                                                                                          |
| `url`                              | A link to the post                                                                                                                                                                                                                  |
| `posted_at`                        | When it was posted, in UTC (ISO 8601)                                                                                                                                                                                               |
| `text`                             | The post's text. Empty for a post with only photos or a video                                                                                                                                                                       |
| `shared_text`                      | The text of the post this one shares, if it shares one                                                                                                                                                                              |
| `author_name`, `author_id`         | Who posted it                                                                                                                                                                                                                       |
| `source_name`                      | The name of the group, Page or profile                                                                                                                                                                                              |
| `source_type`                      | `group` or `page_or_profile`                                                                                                                                                                                                        |
| `source_id`                        | Facebook's id for the group, Page or profile                                                                                                                                                                                        |
| `source_url`                       | The link the post was read from                                                                                                                                                                                                     |
| `reaction_count`                   | How many reactions the post has, all types together                                                                                                                                                                                 |
| `reactions`                        | The reactions by type: `like`, `love`, `care`, `haha`, `wow`, `sad`, `angry`. Only the types the post has; empty when it has none                                                                                                   |
| `comment_count`                    | How many comments it has                                                                                                                                                                                                            |
| `share_count`                      | How many times it was shared                                                                                                                                                                                                        |
| `media`                            | Its photos and videos. Each has `type` (`photo` or `video`), `id`, `url`, `width` and `height`. A photo adds `image_text`, Facebook's description of the image; a video adds `hd_url`, `sd_url`, `thumbnail_url` and `duration_ms`  |
| `photo_count`                      | The photos and videos in the post (the album's full count when Facebook shows more than it sends, so `media` can list fewer)                                                                                                        |
| `author_url`, `author_picture_url` | The author's profile link and picture, when Facebook shows them                                                                                                                                                                     |
| `page_ad_library`                  | The Page or profile record Facebook links to the author: its `id` and Facebook's `is_business_page_active` flag, when Facebook shows one                                                                                            |
| `top_comments`                     | The comments Facebook shows with the post in the feed, usually one or two and never all of them: `comment_id`, `text`, `author_name`, `author_id`, `author_url`, `created_at`, `reply_count`, `url`                                 |
| `hashtags`, `mentions`, `links`    | The hashtags, the people and Pages mentioned (`name`, `id`, `url`) and the web links written in the text                                                                                                                            |
| `shared_post`                      | The post this one shares, if it shares one: `post_id`, `story_id`, `url`, `posted_at`, `author_name`, `author_id`, `author_url`, `media` and `sale`                                                                                 |
| `sale`                             | For a group sale post: the item's `id`, `title`, `price` as shown, `price_amount` (that price as a number, when Facebook's amount matches it), `currency`, and whether it `is_sold`, `is_live`, `is_pending` or `is_on_marketplace` |
| `story_id`, `feedback_id`          | Facebook's other ids for the post                                                                                                                                                                                                   |

Not included: all of a post's comments and their replies (only the few
Facebook shows with the post), video view counts, and the photo and video
files themselves (you get their links).

### How much does it cost?

One extra event, $0.002 per link read; nothing else is added.

You pay for what you get:

- **$2 per 1,000 posts** ($0.002 a post). Each post is charged once per run,
  even when Facebook shows it twice.
- **$0.002 per link read.** A link that could not be read is not charged.

So 50 posts from each of 3 links costs $0.306. If you set a maximum cost for
a run, the Actor stops when it reaches it and keeps every post saved so far.

### How long does a run take?

The Actor reads one page of a feed at a time, about 3 posts per page, and
paces its requests. Expect roughly 40 posts a minute. In testing, 50 posts
from each of two groups, plus a Page's posts, took under 3 minutes.

### Good to know

- **Only public content.** The Actor sees what a logged-out visitor sees.
  Private groups and posts behind a login are not available. How far back you
  can go also depends on what Facebook shows a logged-out visitor.
- **One bad link does not stop the run.** The other links carry on, and the
  run's status lists the links that could not be read, for example
  `Saved 42 posts from 2 links. Could not read: https://…`. The run fails only
  when no link could be read.
- **No new posts is not an error.** `Saved 0 posts from 3 links.` means every
  link was read and nothing was newer than your date.
- **Running it daily?** A post close to the cut-off can appear in two runs:
  turn on **Only new posts**, or remove repeats by `post_id`.
- **Counts are as of the run.** Reactions, comments and shares are counted
  when the post is read; the same post read later can show more.
- **Photo and video links expire.** They are Facebook's own links and stop
  working after some days, so download the files you need soon after the run.

### More Actors from us

- [Facebook Ads Library Scraper: Meta Ads by Keyword or Page](https://apify.com/luzivanlt/facebook-ads-library-scraper): Meta Ad Library ads by keyword, Page or Ad Library link, with text, images, videos and dates.
- [Facebook Comments Scraper: With Replies](https://apify.com/luzivanlt/facebook-comments-scraper): Comments and replies from public Facebook posts, reels and videos, with reactions by type.
- [Facebook Pages Scraper: Contacts, Followers & Ratings](https://apify.com/luzivanlt/facebook-pages-scraper): Facebook Page details from links: exact follower count, phone, email, address, websites.
- [AliExpress Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/aliexpress-products-scraper): Every product of an AliExpress search to its last page, with exact sold counts and ratings.
- [Amazon Product Scraper: Search Results & Prices](https://apify.com/luzivanlt/amazon-products-scraper): Every product on Amazon's search pages to the last page, sponsored marked, with monthly sales.
- [App Store Reviews Scraper: All Reviews, Not 500](https://apify.com/luzivanlt/app-store-reviews-scraper): Every written App Store review of an app, not just the newest 500.
- [Google Play Reviews Scraper: Device, Star Filter & Replies](https://apify.com/luzivanlt/google-play-reviews-scraper): Google Play reviews with the device each was written on, a star filter and the developer's reply.
- [Instagram Posts Scraper: Likes, Comments & Dates](https://apify.com/luzivanlt/instagram-posts-scraper): A public Instagram profile's posts, newest first, each with its like count, comment count and exact date.
- [Lazada Reviews Scraper: Newest First, Sub-Ratings & Photos](https://apify.com/luzivanlt/lazada-reviews-scraper): The newest reviews of any Lazada product first, with separate stars for product, seller and delivery.

### Use it from an AI agent or the API

One call starts a run and returns its items (Apify waits up to 300 seconds; for a
longer run, start it with `POST /v2/acts/…/runs` and read its dataset):

```text
POST https://api.apify.com/v2/acts/luzivanlt~facebook-posts-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
```

With the sample input as its JSON body:

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/1007033107457891"
    }
  ],
  "onlyPostsNewerThan": "1 day",
  "maxPostsPerLink": 50
}
```

Its inputs, in the order of the input form:

| Input                                        | What it takes                                                                                                                                                                                                                 | Default   |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `startUrls` (Groups, Pages or profiles)      | Links to public Facebook groups, Pages or profiles: a group (https://www.facebook.com/groups/1007033107457891), a Page (https://www.facebook.com/nasa) or a profile (facebook.com/\<username> or profile.php?id=\<number>). | —         |
| `onlyPostsNewerThan` (Only posts newer than) | A date (YYYY-MM-DD) or a period back from now, such as 1 day or 2 weeks.                                                                                                                                                      | `"1 day"` |
| `maxPostsPerLink` (Max posts per link)       | Stop reading a link after this many posts.                                                                                                                                                                                    | `50`      |
| `onlyNewItems` (Only new posts)              | Turn this on for a scheduled run, or a re-run of the same task: each run then returns only the posts it has not returned before, reading each link back to a day before the last run that read it.                            | —         |

Apify's MCP server, `https://mcp.apify.com`, lists it as `luzivanlt/facebook-posts-scraper`. To give an
AI agent this Actor as a tool, add the server to the agent's MCP config:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=luzivanlt/facebook-posts-scraper"
    }
  }
}
```

The client signs in with OAuth, or add `"headers": { "Authorization": "Bearer <APIFY_TOKEN>" }`.

Charged per post delivered; the sample input above costs at most $0.11.

### FAQ

**Do I need a Facebook account or cookies?**
No. The Actor reads public posts without logging in.

**Why could a link not be read?**
The group may be private, or the link may point to a single post or be a share
link. Facebook also refuses a request now and then; running again later
usually works.

**Can I get comments, reactions or images?**
Yes, for what Facebook shows with each post: its reaction, comment and share
counts, its reactions by type when it has any, links to its photos and videos,
and the one or two comments Facebook shows under it. All of a post's comments
and their replies are not included yet.

**Can I run it from my own code, on a schedule, or with other apps?**
Yes. Like any Apify Actor, you can start it through the Apify API, run it on a
schedule, and connect it to other apps with Apify's integrations and webhooks.

### Is it legal to scrape Facebook?

This Actor reads only public posts that anyone can see without logging in.
The results include the names of the people who wrote the posts, which is
personal data protected by laws such as the GDPR in the EU. Only collect
personal data when you have a legitimate reason to, and check Facebook's terms
and the laws that apply to you. If you are unsure, ask a lawyer.

### Support

Found a problem or missing a feature? Open an issue on the **Issues** tab and
include the run's link.

***

This Actor is not affiliated with, endorsed by or sponsored by Meta Platforms,
Inc. Facebook is a trademark of Meta Platforms, Inc.

# Changelog

This Actor's version history is a separate document: https://apify.com/luzivanlt/facebook-posts-scraper/changelog.md

# Actor input Schema

## `startUrls` (type: `array`):

Links to public Facebook groups, Pages or profiles: a group (https://www.facebook.com/groups/1007033107457891), a Page (https://www.facebook.com/nasa) or a profile (facebook.com/<username> or profile.php?id=<number>). Mobile links and tracking parts work too. Links to a single post and share links are not supported. Each link read costs $0.002. Example: https://www.facebook.com/nasa

## `onlyPostsNewerThan` (type: `string`):

A date (YYYY-MM-DD) or a period back from now, such as 1 day or 2 weeks. A date counts from midnight UTC; a period is days, weeks, months or years. 1 day if left empty; a date in the future is refused. How far back you can go depends on what Facebook shows a logged-out visitor. Example: 3 days

## `maxPostsPerLink` (type: `integer`):

Stop reading a link after this many posts. From 1 to 10,000; 50 if left empty. You pay $0.002 a post saved, plus $0.002 per link read, so 50 posts from one link cost at most $0.102.

## `onlyNewItems` (type: `boolean`):

Turn this on for a scheduled run, or a re-run of the same task: each run then returns only the posts it has not returned before, reading each link back to a day before the last run that read it. Skipped posts are neither saved nor charged; each new post is charged as usual. Each link read is still charged its link event ($0.002), new posts or not. Runs with other settings, or from another task, keep their own list. Off by default.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/1007033107457891"
    }
  ],
  "onlyPostsNewerThan": "1 day",
  "maxPostsPerLink": 50
}
```

# Actor output Schema

## `posts` (type: `string`):

Every post the run saved, one row per post.

## `allFields` (type: `string`):

The same rows with every field.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.facebook.com/groups/1007033107457891"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("luzivanlt/facebook-posts-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "startUrls": [{ "url": "https://www.facebook.com/groups/1007033107457891" }] }

# Run the Actor and wait for it to finish
run = client.actor("luzivanlt/facebook-posts-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.facebook.com/groups/1007033107457891"
    }
  ]
}' |
apify call luzivanlt/facebook-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,luzivanlt/facebook-posts-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/sjlDRNxe8JvQ5vn4M/builds/F9vetYK0CYE3jFJWr/openapi.json
