# Facebook Posts Scraper (`seemuapps/facebook-posts-scraper`) Actor

Scrape posts from any public Facebook Page or profile  text, reactions, comments, shares, video URLs, view counts, and author details.

- **URL**: https://apify.com/seemuapps/facebook-posts-scraper.md
- **Developed by:** [Andrew](https://apify.com/seemuapps) (community)
- **Categories:** SEO tools, Social media, Lead generation
- **Stats:** 15 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.49 / 1,000 post results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Facebook Posts Scraper

Extract posts from any public Facebook Page or profile - text, engagement counts, video URLs, and author details. No login required.

### What you get

- **Post content**: caption text, direct URL, and canonical permalink
- **Engagement**: total reactions, a per-type reaction breakdown (like/love/care/haha/wow/sad/anger), comments, and video view counts
- **Media**: image URLs, and SD/HD video URLs plus thumbnail for video posts
- **Author**: name, short name, and profile ID
- **Timestamps**: exact publish time (ISO 8601)
- Paginated output: each run returns a cursor so you can fetch a profile's full history across multiple runs
- Export to JSON, CSV, or Google Sheets directly from the Apify console

### Use cases

- Competitor content and posting-cadence analysis
- Audience research and engagement benchmarking
- Lead generation and brand monitoring
- Building content datasets for reporting

### How to use

1. Enter a Facebook **Page or profile** - a full URL (`https://www.facebook.com/nasa`), a handle (`nasa`), or a numeric Page ID
2. Set **Max Posts** (default 100; set 0 for unlimited)
3. Run the actor - results appear in the **Dataset** tab
4. To fetch more, open the **Key-value store** tab → copy the `NEXT_PAGE_ID` value → paste it into **Page ID** on your next run. If `NEXT_PAGE_ID` is `null`, you've fetched everything.

### Output format

Each dataset record:

```json
{
  "postId": "1234567890",
  "url": "https://www.facebook.com/nasa/posts/1234567890",
  "permalink": "https://www.facebook.com/1234567890",
  "text": "A new view of the cosmos …",
  "publishTime": "2026-06-30T14:02:11.000Z",
  "reactionCount": 48213,
  "reactions": { "like": 41200, "love": 5100, "care": 900, "haha": 400, "wow": 500, "sad": 80, "anger": 33 },
  "commentCount": 1922,
  "viewCount": null,
  "isVideo": false,
  "videoSdUrl": null,
  "videoHdUrl": null,
  "thumbnailUrl": null,
  "images": ["https://scontent.xx.fbcdn.net/…"],
  "authorId": "100064...",
  "authorName": "NASA",
  "authorShortName": "NASA",
  "scrapedAt": "2026-07-01T09:00:00.000Z"
}
```

### Notes

- Works on **public** Pages and profiles only.
- Free-tier runs are capped at 50 posts; paid plans remove the limit.

# Actor input Schema

## `profile` (type: `string`):

Facebook Page/profile URL (e.g. https://www.facebook.com/nasa), a handle (e.g. nasa), or a numeric Page ID.

## `maxItems` (type: `integer`):

Maximum number of posts to scrape. Set 0 for unlimited (caps at platform timeout).

## `pageId` (type: `string`):

Optional. Paste NEXT\_PAGE\_ID from the previous run's Key-value store to fetch the next page of posts.

## Actor input object example

```json
{
  "profile": "https://www.facebook.com/nasa",
  "maxItems": 100
}
```

# Actor output Schema

## `results` (type: `string`):

Each record contains postId, url, permalink, text, publishTime, reactionCount, reactions (per-type breakdown: like/love/care/haha/wow/sad/anger), commentCount, viewCount, isVideo, videoSdUrl, videoHdUrl, thumbnailUrl, images, and author fields (authorId, authorName, authorShortName).

## `nextPageId` (type: `string`):

NEXT\_PAGE\_ID record in the default key-value store. Paste into Page ID on the next run to resume; null when the profile is fully exhausted.

# 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 = {
    "profile": "https://www.facebook.com/nasa"
};

// Run the Actor and wait for it to finish
const run = await client.actor("seemuapps/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 = { "profile": "https://www.facebook.com/nasa" }

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

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

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

```

## CLI example

```bash
echo '{
  "profile": "https://www.facebook.com/nasa"
}' |
apify call seemuapps/facebook-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=seemuapps/facebook-posts-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/HvhWq2sNL4YguwPfY/builds/I4H4HRb8Fvr9PPs5l/openapi.json
