# Facebook User Posts Scraper (`maximedupre/facebook-user-posts-scraper`) Actor

Collect public posts from Facebook profiles, Pages, and known post URLs. Get post text, URLs, author details, dates, engagement counts, reactions, media, and links in structured dataset rows when Facebook exposes them.

- **URL**: https://apify.com/maximedupre/facebook-user-posts-scraper.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Social media, Marketing, Developer tools
- **Stats:** 13 total users, 8 monthly users, 97.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 public 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/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 user posts for public profile and Page research

Researchers, social media teams, and developers can collect public [Facebook](https://www.facebook.com/) posts from profiles and Pages in one run. The Actor returns structured rows with the submitted target, post text and URL, plus profile and author details, dates, engagement counts, reactions, media, attachments, and links when Facebook exposes them. This gives you data for content tracking, creator research, competitor research, reporting, public profile monitoring, and data enrichment without copying posts by hand.

- Run a **[Facebook Post Scraper](https://apify.com/maximedupre/facebook-user-posts-scraper/examples/facebook-post-scraper)** to save one known public entry as a structured row.
- Use the **[Facebook Timeline Scraper](https://apify.com/maximedupre/facebook-user-posts-scraper/examples/facebook-timeline-scraper)** to export posts from a profile or Page feed.
- Use a **[Facebook Page Posts Scraper](https://apify.com/maximedupre/facebook-user-posts-scraper/examples/facebook-page-posts-scraper)** to collect Page updates with text and engagement data.
- Use a **[Facebook Profile Posts Scraper](https://apify.com/maximedupre/facebook-user-posts-scraper/examples/facebook-profile-posts-scraper)** to collect profile updates with dates and author details.
- Use the **[Facebook Posts Scraper](https://apify.com/maximedupre/facebook-user-posts-scraper/examples/facebook-posts-scraper)** to export post URLs, text, media, and engagement fields.
- Run the **[Facebook User Posts Scraper](https://apify.com/maximedupre/facebook-user-posts-scraper/examples/facebook-user-posts-scraper)** to combine profile or Page targets and known URLs in one run.

#### 📦 Facebook post data

**What you get**

Each successful public post is one dataset row. Some values are null or empty when Facebook does not expose them. If the same post is found through another submitted target or URL, the Actor keeps the first eligible saved match and ignores later matches.

- **Source trace** — `matchedInput`, `postId`, and `postUrl` show which submitted value first found the post and identify the source post.
- **Post details** — `postType`, `text`, `transcript`, and `createdAt` describe the public post when Facebook exposes them.
- **People and pages** — `profile` and `author` hold public IDs, names, URLs, and picture URLs when available.
- **Engagement** — `engagement` holds public comment, reaction, share, and video view counts; `reactions` holds the visible reaction breakdown.
- **Media and links** — `media`, `attachments`, `externalLinks`, and `textReferences` hold source-visible media, attachment, link, and referenced profile or Page data.
- **Extra labels** — `paidPartnership` and `adLibraryId` are returned when Facebook exposes them.

#### 🚀 Run Facebook timeline and post exports

**How to run**

1. Open the Actor input tab.
2. Add public profile or Page targets in **Profile or Page targets**.
3. Add known public post URLs in **Known post URLs** when you have them. Either list can be used alone, or you can use both.
4. Set **Maximum posts per profile or Page** for each timeline. If you leave it empty, the Actor returns all available posts until Facebook has no more public posts.
5. Add optional `Start date` and `End date` values in `YYYY-MM-DD` format.
6. Turn on **Request video transcripts** only when you need spoken captions or transcripts. This can make the run slower.
7. Start the Actor and open the dataset.

For a first run, keep the prefilled public target and default settings. Replace it after you confirm the output shape.

#### ⚙️ Input

**Input fields**

Use either input list or both. Timeline limits and dates apply only to profile or Page targets. Direct post URLs are handled separately.

| Field | Type | What it does |
|---|---|---|
| `targets` | array of strings | Accepts handles, `@handles`, full profile or Page URLs, or numeric IDs for timeline posts. |
| `postUrls` | array of strings | Accepts direct public Facebook post, reel, photo, video, or supported permalink URLs. |
| `maxPostsPerTarget` | integer | Sets an optional limit for each profile or Page timeline. If left empty, the Actor returns all available posts until Facebook has no more public posts. |
| `startDate` | string | Keeps timeline posts on or after this `YYYY-MM-DD` date when Facebook shows a publish date. |
| `endDate` | string | Keeps timeline posts on or before this `YYYY-MM-DD` date when Facebook shows a publish date. |
| `includeTranscripts` | boolean | Requests spoken captions or transcripts for video and reel posts when available. This can make the run slower. |

**Successful run input**

This example is copied from a successful current-beta run:

```json
{
  "targets": [
    "NASA"
  ],
  "maxPostsPerTarget": 1,
  "includeTranscripts": false
}
```

#### 🧾 Output

**Output shape**

The default dataset has one successful-post shape. The table includes every public field in the dataset schema. Null values and empty arrays mean Facebook did not expose that value for that row.

The `results` output link opens the default dataset. Each item in it is one successful public post row.

| Field | Type | What it does |
|---|---|---|
| matchedInput | string | Shows the submitted target or known post URL that first found this row. |
| profile | object | Holds the public profile or Page linked to the post. |
| profile.id | string or null | Gives the Facebook profile or Page ID when shown. |
| profile.name | string or null | Gives the public profile or Page name when shown. |
| profile.url | string or null | Gives the public profile or Page URL when shown. |
| profile.pictureUrl | string or null | Gives the profile picture URL when shown. |
| postId | string | Gives the stable Facebook ID for the post, reel, video, photo, or story. |
| postUrl | string | Gives the Facebook URL for opening the post. |
| postType | string or null | Gives the post kind, such as a photo, video, or reel, when shown. |
| text | string or null | Gives the post text or caption when available. |
| transcript | string or null | Gives spoken captions or a transcript when requested and available for a video or reel. |
| createdAt | string or null | Gives the post time as an ISO timestamp when Facebook shows it. |
| author | object | Holds public author details for the post. |
| author.id | string or null | Gives the Facebook author ID when shown. |
| author.name | string or null | Gives the public author name when shown. |
| author.url | string or null | Gives the public author URL when shown. |
| author.pictureUrl | string or null | Gives the author's profile picture URL when shown. |
| engagement | object | Holds public comment, reaction, share, and video view counts when shown. |
| engagement.commentCount | integer or null | Gives the public comment count when shown. |
| engagement.reactionCount | integer or null | Gives the total public reaction count when shown. |
| engagement.shareCount | integer or null | Gives the public share count when shown. |
| engagement.viewCount | integer or null | Gives the public video or reel view count when shown. |
| reactions | object of integer counts | Gives the count for each reaction type when Facebook shows the breakdown. |
| media | array of objects | Lists images, thumbnails, and direct video URLs found in the post. |
| media\[].type | string or null | Gives the media kind, such as image or video, when known. |
| media\[].url | string | Gives the direct URL for the media item. |
| media\[].thumbnailUrl | string or null | Gives the media thumbnail URL when available. |
| media\[].width | integer or null | Gives the media width in pixels when known. |
| media\[].height | integer or null | Gives the media height in pixels when known. |
| attachments | array of objects | Lists links and other attachments found with the post. |
| attachments\[].type | string or null | Gives the attachment kind when known. |
| attachments\[].url | string or null | Gives the attachment URL when available. |
| attachments\[].title | string or null | Gives the attachment title when shown. |
| externalLinks | array of strings | Lists non-Facebook links found in the post. |
| textReferences | array of objects | Lists public profiles, Pages, or links named in the post text. |
| textReferences\[].id | string or null | Gives the reference ID when shown. |
| textReferences\[].name | string or null | Gives the referenced profile, Page, or link name when shown. |
| textReferences\[].url | string or null | Gives the URL for the referenced profile, Page, or link when shown. |
| textReferences\[].verified | boolean or null | Says whether Facebook marks the referenced profile or Page as verified. |
| paidPartnership | boolean or null | Says whether Facebook marks the post as a paid partnership. |
| adLibraryId | string or null | Gives the Facebook Ad Library Page ID when shown for the post or Page. |

**Example Facebook post**

The shortened row below is a genuine row from a successful current-beta run. It keeps public values that show the post, author, engagement, links, and media; long URLs and extra nested entries use the valid JSON string "..." as an omission marker.

```json
{
  "matchedInput": "NASA",
  "profile": {
    "id": "100044561550831",
    "name": "NASA - National Aeronautics and Space Administration",
    "url": "https://www.facebook.com/NASA",
    "pictureUrl": "..."
  },
  "postId": "1593834455445258",
  "postUrl": "https://www.facebook.com/reel/1071298452521377/",
  "postType": "story",
  "text": "Is your name part of our legacy of exploration and discovery?\n\nAhead of its launch later this month, we installed a plaque on the Nancy Grace Roman Space Telescope holding an SD card with over one million submitted names, continuing our tradition of leaving humanity’s mark on the cosmos.",
  "transcript": null,
  "createdAt": "2026-08-03T19:22:45.000Z",
  "author": {
    "id": "100044561550831",
    "name": "NASA - National Aeronautics and Space Administration",
    "url": "https://www.facebook.com/NASA",
    "pictureUrl": "..."
  },
  "engagement": {
    "commentCount": 1,
    "reactionCount": 75,
    "shareCount": 10,
    "viewCount": 71
  },
  "reactions": {
    "like": 60,
    "love": 14,
    "haha": 1
  },
  "media": [
    {
      "type": "image",
      "url": "...",
      "thumbnailUrl": null,
      "width": null,
      "height": null
    },
    "..."
  ],
  "attachments": [
    {
      "type": "StoryAttachment",
      "url": "https://www.facebook.com/reel/1071298452521377/",
      "title": null
    }
  ],
  "externalLinks": [],
  "textReferences": [
    {
      "id": "100064368862583",
      "name": "Nancy Grace Roman Space Telescope",
      "url": "https://www.facebook.com/NASARoman",
      "verified": true
    },
    "..."
  ],
  "paidPartnership": null,
  "adLibraryId": null
}
```

#### 💳 Pricing

**How charges work**

This Actor uses pay-per-event pricing. You are charged for each public post saved to the dataset. A run with no saved public post does not create a public-post event. Skipped, private, unavailable, and duplicate posts are not saved as public post rows.

#### 🔌 Integrations

**Connect your results**

Use the Apify API to start runs and read dataset items. Schedule recurring runs, send finished runs to webhooks, or connect the dataset to supported Apify integrations. Export the dataset as JSON, CSV, Excel, XML, RSS, or HTML.

https://www.youtube.com/watch?v=bNACk1\_S\_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

**Limits and caveats**

This Actor only collects public Facebook data that is visible without a user-provided Facebook account. It does not bypass privacy controls, collect private profile content, scrape groups, scrape Marketplace, or import your Facebook session. Private, unavailable, or unsupported targets are skipped without creating placeholder rows.

Facebook may expose fewer timeline posts than your requested limit for some public profiles or Pages. Date filters apply to the rows that Facebook exposes to the Actor. If a profile has no public posts available, the Actor skips that target and continues with the rest of your input list.

Use the exported data responsibly and follow Facebook's terms, Apify's terms, and applicable privacy, data protection, and platform rules.

#### ❓ FAQ

##### Do I need Facebook cookies, a login, or a Meta API key?

No. The Actor reads public Facebook post data and does not ask for user-provided cookies, login details, or a Meta API key.

##### Can I collect posts from profiles and Pages in one run?

Yes. Add profile or Page handles, full URLs, numeric IDs, or direct post URLs. You can use both input lists together.

##### Can I use a direct Facebook post URL without a timeline target?

Yes. Add known public post, reel, photo, video, or supported permalink URLs in **Known post URLs**. Timeline limits and dates do not change those direct URLs.

##### What happens when the same post is found through two inputs?

The Actor saves the first eligible occurrence and ignores later matches for that source post. The row shows the first submitted value that found it; it does not combine later matches into that row.

##### Why did I get fewer posts than my limit?

The limit is a maximum, not a promise. Facebook may expose fewer public posts for a profile or Page, or a date filter may remove posts after they are found.

##### Are comments returned as separate dataset rows?

No. The Actor returns post rows. It can include public comment counts in `engagement` when Facebook exposes them, but comments or replies are not separate records.

##### Can I request transcripts for video and reel posts?

Yes. Turn on **Request video transcripts**. A transcript is returned only when it is requested and Facebook exposes spoken captions or transcript text, and this option can make the run slower.

##### Does the Actor download Facebook media files?

No. It returns media and thumbnail URLs when Facebook exposes them. It does not mirror or download the source files.

##### Can it collect private profiles, groups, or Marketplace content?

No. It collects public posts from profiles, Pages, and supported direct post URLs. Private, friends-only, login-only, deleted, unavailable, group, and Marketplace content is outside its scope.

### 📝 Changelog

**1.1: Add optional video transcript enrichment**

- Request spoken captions or transcripts for video and reel posts when Facebook exposes them.
- Include transcript results and a readable table view for researching saved posts.

**v1.0**

- Added the stable public post row format with profile, author, engagement, reactions, media, attachment, link, and reference data.

**v0.1**

- Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~facebook-user-posts-scraper/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [Facebook Media Downloader](https://apify.com/maximedupre/facebook-media-downloader) — Get direct source-hosted links from known public Facebook videos, reels, and photos.
- [Facebook Page Video Downloader](https://apify.com/maximedupre/facebook-page-video-downloader) — Export public Page video metadata and playable URLs from Page video libraries.
- [Facebook Reviews Scraper](https://apify.com/maximedupre/facebook-reviews-scraper) — Collect public Page recommendations with reviewer details and visible engagement.
- [Facebook Page Transparency Scraper](https://apify.com/maximedupre/facebook-page-transparency-scraper) — Review public Page or Profile transparency details and Meta Ad Library creatives.
- [LinkedIn Posts Scraper](https://apify.com/maximedupre/linkedin-posts-scraper) — Collect public LinkedIn profile, company, and direct post data for cross-platform post research.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `targets` (type: `array`):

Enter handles, @handles, full profile or Page URLs, or numeric IDs for timeline posts.

## `postUrls` (type: `array`):

Enter direct Facebook URLs for public posts, reels, photos, videos, or supported post permalinks.

## `maxPostsPerTarget` (type: `integer`):

Optional limit for each profile or Page timeline. If empty, collect all available posts until Facebook has no more public posts.

## `startDate` (type: `string`):

For profile or Page timelines, keep posts on or after this date when Facebook shows the publish date. Use YYYY-MM-DD.

## `endDate` (type: `string`):

For profile or Page timelines, keep posts on or before this date when Facebook shows the publish date. Use YYYY-MM-DD.

## `includeTranscripts` (type: `boolean`):

Request spoken captions or transcripts for video and reel posts. This optional step may make the run slower.

## Actor input object example

```json
{
  "targets": [
    "NASA"
  ],
  "maxPostsPerTarget": 1,
  "includeTranscripts": false
}
```

# Actor output Schema

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

Saved rows with post, profile, author, text, engagement, media, and link data.

# 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 = {
    "targets": [
        "NASA"
    ],
    "maxPostsPerTarget": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/facebook-user-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 = {
    "targets": ["NASA"],
    "maxPostsPerTarget": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/facebook-user-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 '{
  "targets": [
    "NASA"
  ],
  "maxPostsPerTarget": 1
}' |
apify call maximedupre/facebook-user-posts-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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