# 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:** [Seemu Scraping](https://apify.com/seemuapps) (community)
- **Categories:** SEO tools, Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 54 total users, 4 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/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

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(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 '{
  "profile": "https://www.facebook.com/nasa"
}' |
apify call seemuapps/facebook-posts-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,seemuapps/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/HvhWq2sNL4YguwPfY/builds/qw9V6FVG7hvNC8a6z/openapi.json
