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

Scrape public posts from Facebook profiles and Pages: text, date, author, reactions by type, comments, shares, views, photos, video links, external links and mentions. Filter by date or paste post URLs. No login. Export JSON, CSV, Excel.

- **URL**: https://apify.com/parsebird/facebook-user-posts-scraper.md
- **Developed by:** [ParseBird](https://apify.com/parsebird) (community)
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.39 / 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 User Posts Scraper

Facebook User Posts Scraper collects public posts from [Facebook](https://www.facebook.com) profiles and Pages, newest first, and returns each post's text, date, author, reactions by type, comments, shares, views, photos, video links, external links, and mentions. You can also scrape individual posts from links you already have.

<table><tr>
<td style="border-left:4px solid #1877F2;padding:12px 16px;font-weight:600">
Enter up to 50 profiles or Pages by handle, URL, or ID, or paste post links, and get one clean row per post with engagement, media, links, and optional video transcripts, filtered by date range, with no Facebook login.
</td>
</tr></table>

<br>

<table>
<tr>
<td colspan="3" style="padding:10px 14px;background:#1877F2;border:none;border-radius:4px 4px 0 0">
<span style="color:#FFFFFF;font-size:14px;font-weight:700;letter-spacing:0.5px">ParseBird Facebook Suite</span>
<span style="color:#D8E6FD;font-size:13px">&nbsp;&nbsp;&bull;&nbsp;&nbsp;Pages, posts, groups, reviews &amp; media</span>
</td>
</tr>
<tr>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-right:none;border-top:none;vertical-align:top;width:33%;background:#E7F0FE">
<a href="https://apify.com/parsebird/facebook-user-posts-scraper" style="color:#1877F2;text-decoration:none;font-weight:700;font-size:13px">Facebook User Posts Scraper</a><br>
<span style="color:#1877F2;font-size:11px;font-weight:600">You are here</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/facebook-page-video-downloader" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Facebook Page Video Downloader</a><br>
<span style="color:#78716C;font-size:11px">Every video on a Page, MP4 links</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/facebook-media-downloader" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Facebook Media Downloader</a><br>
<span style="color:#78716C;font-size:11px">HD/SD links for videos, reels, photos</span>
</td>
</tr>
<tr>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-radius:0 0 0 4px;border-right:none;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/facebook-group-posts-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Facebook Public Group Posts Scraper</a><br>
<span style="color:#78716C;font-size:11px">Posts from public groups</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/facebook-group-profile-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Facebook Group Profile Scraper</a><br>
<span style="color:#78716C;font-size:11px">Members, activity, admins, rules</span>
</td>
<td style="padding:10px 14px;border:1px solid #E7E5E4;border-radius:0 0 4px 0;border-top:none;vertical-align:top;width:33%;background:#FFFFFF">
<a href="https://apify.com/parsebird/facebook-reviews-scraper" style="color:#1C1917;text-decoration:none;font-weight:700;font-size:13px">Facebook Page Reviews Scraper</a><br>
<span style="color:#78716C;font-size:11px">Recommendations, tags, comments</span>
</td>
</tr>
</table>

##### Copy to your AI assistant

Copy this block into ChatGPT, Claude, Cursor, or any LLM to start using this actor.

```text
Use Apify Actor parsebird/facebook-user-posts-scraper to scrape public posts from Facebook profiles and Pages. Example with ApifyClient (Python): client.actor("parsebird/facebook-user-posts-scraper").call(run_input={"targets":["NASA","https://www.facebook.com/BBCNews"],"maxPostsPerTarget":20,"startDate":"2026-09-01"}). Inputs: findPostsBy string "timeline" (default, profile or Page feeds) or "postUrls" (direct post links); targets array of strings (up to 50 handles, @handles, profile or Page URLs, profile.php?id= links, or numeric IDs; used in timeline mode); postUrls array of strings (post, permalink.php, story.php, reel, video, watch, photo, fb.watch, and share links; used in postUrls mode); maxPostsPerTarget integer optional (per profile or Page; empty = all public posts); startDate and endDate strings YYYY-MM-DD optional (timeline mode, UTC, inclusive); includeTranscripts boolean default false (adds spoken captions for videos and reels when Facebook has them). Output: one row per post, newest first per target. Fields (omitted when Facebook doesn't show them): matchedInput, profile {id, name, url, pictureUrl}, postId, postUrl, postType (status | photo | album | video | reel | link | event | other Facebook types), text, transcript, createdAt (ISO 8601), author {id, name, url, pictureUrl}, engagement {commentCount, reactionCount, shareCount, viewCount}, reactions {like, love, care, haha, wow, sad, angry}, media [{type image | video, url, thumbnailUrl, width, height}], attachments [{type, url, title}], externalLinks [string], textReferences [{id, name, url, verified}], paidPartnership, adLibraryId. API docs: https://docs.apify.com/api/client/python/ and https://docs.apify.com/api/client/js/. Token: https://console.apify.com/account/integrations.
```

### What is Facebook User Posts Scraper?

**Facebook User Posts Scraper** is a **Facebook posts scraper and API alternative** for public profiles and Pages. Give it a handle such as `NASA`, a profile or Page URL, or a numeric ID, and it pages through the public timeline the way a logged-out visitor sees it. For every post you get the **text**, **publish time**, **author**, **reaction counts by type**, **comments**, **shares**, **views**, **photos and video links**, **attachments**, **external links**, and the **people, Pages, and links mentioned** in the text.

You don't need a Facebook account, cookies, or a [Graph API](https://developers.facebook.com/docs/graph-api/) token. The easiest way to try it is to open the actor, keep the prefilled `NASA` Page, and click **Start**. The prefilled run saves 10 posts in a few seconds.

### What can Facebook User Posts Scraper do?

- 📰 **Scrape Facebook Page and profile timelines**, newest first, from handles, URLs, `profile.php?id=` links, or numeric IDs.
- 🔗 **Scrape known posts** from post, permalink, story, reel, video, watch, photo, `fb.watch`, and share links.
- 📅 **Filter by date**: set **Posted on or after** and **Posted on or before** to collect one period. The timeline starts at your end date, so you don't pay for newer posts.
- 📊 **Measure engagement**: comments, shares, video views, total reactions, and Like/Love/Care/Haha/Wow/Sad/Angry counts.
- 🖼️ **Get media**: full-size photo links, every photo in an album, and direct MP4 links for videos and reels with thumbnails.
- 🗣️ **Add video transcripts**: turn on **Include video transcripts** to get the spoken captions of videos and reels when Facebook has them.
- 🔎 **See links and mentions**: external links (with Facebook's redirect removed), plus the profiles, Pages, and links named in the text, with verified status.
- ⏱️ **Automate** with [Apify schedules](https://docs.apify.com/platform/schedules), the [Apify API](https://docs.apify.com/api/v2), webhooks, and [integrations](https://apify.com/integrations) such as Google Sheets, Make, Zapier, and Slack.
- 📁 **Export** results as JSON, CSV, Excel, HTML, or XML.

### What data can you extract from Facebook posts?

| Field | Description |
|-------|-------------|
| `postId`, `postUrl`, `postType` | Facebook post ID, link to the post, and its kind (`status`, `photo`, `album`, `video`, `reel`, `link`, `event`, and other Facebook types) |
| `text` | Post text or caption |
| `transcript` | Spoken captions of a video or reel (when requested and available) |
| `createdAt` | Publish time in ISO 8601 (UTC) |
| `author`, `profile` | ID, name, URL, and picture of the poster and of the profile or Page you scraped |
| `engagement` | `commentCount`, `reactionCount`, `shareCount`, and `viewCount` |
| `reactions` | Counts for Like, Love, Care, Haha, Wow, Sad, and Angry |
| `media` | Photos and videos: `type`, direct `url`, `thumbnailUrl`, `width`, `height` |
| `attachments` | Attachment type, URL, and title |
| `externalLinks` | Non-Facebook links in the post |
| `textReferences` | Profiles, Pages, and links named in the text, with `verified` |
| `adLibraryId` | The Page ID used by the [Meta Ad Library](https://www.facebook.com/ads/library/) |
| `matchedInput` | The handle, URL, or post link that produced the row |

Fields that Facebook doesn't show for a post are left out of that row. Zero counts are kept.

### How to scrape posts from a Facebook Page or profile

1. Open [Facebook User Posts Scraper](https://apify.com/parsebird/facebook-user-posts-scraper) and click **Try for free** or **Start**.
2. Keep **Find posts by** on **Profile or Page timeline**, and add handles, URLs, or IDs in **Profiles or Pages**, one per line.
3. Set **Max posts per profile or Page**, or leave it empty to collect every public post.
4. Optionally set **Posted on or after** and **Posted on or before**, and turn on **Include video transcripts**.
5. Click **Start**, then open the **Output** tab or export the results as JSON, CSV, or Excel.

To scrape specific posts instead, switch **Find posts by** to **Known post URLs** and paste the links in **Post URLs**.

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `findPostsBy` | string | No | `timeline` | `timeline` for profile and Page feeds, or `postUrls` for direct post links |
| `targets` | array of strings | In timeline mode | — | Up to 50 handles, @handles, profile or Page URLs, or numeric IDs |
| `postUrls` | array of strings | In postUrls mode | — | Up to 500 public post, reel, video, photo, `fb.watch`, or share links |
| `maxPostsPerTarget` | integer | No | empty (all) | Posts to collect from each profile or Page. Prefilled with 10 |
| `startDate` | string | No | — | Keep posts on or after this `YYYY-MM-DD` date (UTC) |
| `endDate` | string | No | — | Keep posts on or before this `YYYY-MM-DD` date (UTC) |
| `includeTranscripts` | boolean | No | `false` | Add spoken captions for videos and reels when available |
| `proxyConfiguration` | object | No | — | Optional. The actor picks its own network route |

### Input / Output

**Example input**

```json
{
    "targets": ["NASA"],
    "maxPostsPerTarget": 10,
    "includeTranscripts": true
}
```

**Example output** (a real row; signed media links are shortened to `?...` and the transcript is cut)

```json
{
  "matchedInput": "NASA",
  "profile": {
    "id": "100044561550831",
    "name": "NASA - National Aeronautics and Space Administration",
    "url": "https://www.facebook.com/NASA/",
    "pictureUrl": "https://scontent-iad6-1.xx.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png?..."
  },
  "postId": "1641734060655297",
  "postUrl": "https://www.facebook.com/reel/28263630716612782/",
  "postType": "reel",
  "text": "What happens when we detect an asteroid that could pose a threat to Earth? ... https://go.nasa.gov/46Jm361",
  "transcript": "This asteroid 2024 YR4 might get interesting. There was a chance that it could impact Earth. The ATLAS survey, operated by the University of Hawaii, finds about 200 to 250 near-Earth objects per year. ...",
  "createdAt": "2026-09-28T15:27:19.000Z",
  "author": {
    "id": "100044561550831",
    "name": "NASA - National Aeronautics and Space Administration",
    "url": "https://www.facebook.com/NASA",
    "pictureUrl": "https://scontent-den2-1.xx.fbcdn.net/v/t39.30808-1/243095782_416661036495945_3843362260429099279_n.png?..."
  },
  "engagement": {
    "commentCount": 121,
    "reactionCount": 3060,
    "shareCount": 243
  },
  "reactions": {
    "like": 2768,
    "love": 190,
    "care": 34,
    "haha": 9,
    "wow": 54,
    "sad": 3,
    "angry": 2
  },
  "media": [
    {
      "type": "video",
      "url": "https://video-den2-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQPAt66ZFvCSw640umVoipvMTj0Ezv17TRR2Rru-AHqtFKWq1iJiU2JmnqPD6hHgG-6MEW7eE_qF00sj176Fb-RLagcjm38vGtV5GnQgNVRxHQ.mp4?...",
      "thumbnailUrl": "https://scontent-den2-1.xx.fbcdn.net/v/t15.5256-10/828077842_1438664754882336_518284358948485934_n.jpg?...",
      "width": 608,
      "height": 1080
    }
  ],
  "attachments": [
    { "type": "Video", "url": "https://www.facebook.com/reel/28263630716612782/" }
  ],
  "externalLinks": ["https://go.nasa.gov/46Jm361"],
  "textReferences": [
    {
      "id": "NjQyMTgzOTU5MjA4MTA3Omh0dHBzXGEvL2dvLm5hc2EuZ292LzQ2Sm0zNjE6OkRlZmF1bHQ6OjoxNjQxNzM0MDYwNjU1Mjk3Og==",
      "url": "https://go.nasa.gov/46Jm361"
    }
  ],
  "adLibraryId": "54971236771"
}
```

Download results from the **Output** tab in JSON, CSV, Excel, HTML, or XML.

### Python API example

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")

run = client.actor("parsebird/facebook-user-posts-scraper").call(
    run_input={
        "targets": ["NASA", "https://www.facebook.com/BBCNews"],
        "maxPostsPerTarget": 50,
        "startDate": "2026-09-01",
    }
)

for post in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(post["createdAt"], post["postType"], post.get("engagement", {}).get("reactionCount"), post["postUrl"])
```

### JavaScript API example

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });

const run = await client.actor('parsebird/facebook-user-posts-scraper').call({
    targets: ['NASA', 'https://www.facebook.com/BBCNews'],
    maxPostsPerTarget: 50,
    startDate: '2026-09-01',
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((post) => console.log(post.createdAt, post.postType, post.engagement?.reactionCount, post.postUrl));
```

See the [Python client docs](https://docs.apify.com/api/client/python/) and [JavaScript client docs](https://docs.apify.com/api/client/js/) for more options.

### Use cases

- **Social media monitoring**: schedule daily runs with **Posted on or after** set to yesterday to catch every new post from brand, news, or government Pages.
- **Competitor analysis**: compare posting frequency, formats, and reactions across rival Pages.
- **Content research**: find a Page's best-performing posts by reactions, comments, and shares.
- **Media and PR**: archive public posts with their links and mentions for reporting.
- **AI and NLP pipelines**: feed post text and video transcripts into sentiment analysis, topic modeling, or LLM summaries.

### How it works

1. The actor opens each profile or Page as a logged-out visitor and reads its public timeline, newest first.
2. It keeps loading older posts until it reaches **Max posts per profile or Page**, the start of your date range, or the end of the timeline.
3. In **Known post URLs** mode, it opens each link (following `fb.watch` and share links) and reads that post.
4. Each post becomes one row. With **Include video transcripts** on, it downloads the caption file of each captioned video or reel and adds it as plain text.

### How much does it cost to scrape Facebook posts?

**What is the price per Facebook post?**

The actor uses pay-per-event pricing: you pay per post saved, and platform usage is included.

| Event | Free plan | Bronze | Silver | Gold |
|-------|-----------|--------|--------|------|
| `post-scraped` | $0.00299 (**$2.99 / 1,000**) | $0.00279 (**$2.79 / 1,000**) | $0.00259 (**$2.59 / 1,000**) | $0.00239 (**$2.39 / 1,000**) |

One `post-scraped` event is one post row in the dataset. Profiles, Pages, and links that fail are not charged, and a post found twice is saved once. The prefilled 10-post run costs about $0.03 on the Free plan, and 1,000 posts cost $2.99. Transcripts don't cost extra. Apify's free plan includes monthly platform credits you can use to try the actor.

### Is it legal to scrape Facebook posts?

**Is scraping public Facebook posts legal?**

The actor only reads posts that Facebook shows to anyone without logging in. Scraping public data is generally legal in many jurisdictions, but posts can contain personal data covered by laws such as GDPR and CCPA, and photos and videos are protected by copyright. Have a legitimate reason to collect the data, respect [Facebook's Terms](https://www.facebook.com/terms.php), and consult your lawyer if unsure. Read more in Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

### Other Facebook scrapers and related Actors

| Actor | Best for |
|-------|----------|
| [Facebook Page Video Downloader](https://apify.com/parsebird/facebook-page-video-downloader) | Every video from a Page's Videos tab with MP4 links |
| [Facebook Media Downloader](https://apify.com/parsebird/facebook-media-downloader) | HD and SD links for single videos, reels, and photos |
| [Twitter (X) Video Downloader](https://apify.com/parsebird/twitter-video-downloader) | Videos and GIFs from tweets |
| [Instagram Reels Audio Scraper](https://apify.com/parsebird/instagram-reels-audio-scraper) | Reels that use a given Instagram sound |
| [Threads Search Scraper](https://apify.com/parsebird/threads-search-scraper) | Posts from Threads by keyword |
| [Video & Audio Transcriber](https://apify.com/parsebird/video-audio-transcriber) | Transcribing videos that have no captions |

### FAQ

**Which profiles and Pages work?**
Public Pages and public profiles, including profiles in professional mode such as `zuck`. Use a handle (`NASA` or `@NASA`), a URL (`https://www.facebook.com/NASA`, `m.facebook.com`, `profile.php?id=`), or a numeric ID. The same profile entered in two forms is scraped once. Group, event, and watch links are skipped with a message in the log.

**How many posts can I get?**
The actor keeps loading posts as long as Facebook returns them. In our tests the NASA Page went back more than six months (180+ posts) without stopping, and Coca-Cola's timeline reached 2018. Leave **Max posts per profile or Page** empty to collect everything Facebook shows.

**How do the date filters work?**
Dates are in UTC and both ends are inclusive. With **Posted on or before** set, the timeline starts from that date instead of today, so you don't pay for newer posts. Collection stops once posts are older than **Posted on or after**.

**Which posts get transcripts?**
Videos and reels with captions on Facebook, either auto-generated or uploaded by the Page. Videos without captions have no `transcript` field. For those, use our [Video & Audio Transcriber](https://apify.com/parsebird/video-audio-transcriber) on the video's `media.url`.

**Why are some fields missing from a row?**
The actor only includes what Facebook shows publicly. Status updates have no `media`, many posts have no external links, and view counts only appear on some videos. Missing fields are left out instead of being set to null.

**What is `adLibraryId`?**
The Page ID that the [Meta Ad Library](https://www.facebook.com/ads/library/) uses, so you can look up the Page's ads. It's included for Pages that have one.

**How long do media links work?**
Photo and video links are signed by Facebook and expire after a few days. Download the files you need soon after the run.

**Can I scrape private profiles or groups?**
No. The actor only reads content that Facebook shows to logged-out visitors.

**Can I run it on a schedule or from my app?**
Yes. Use [Apify schedules](https://docs.apify.com/platform/schedules), call it from the [API tab](https://apify.com/parsebird/facebook-user-posts-scraper/api), or connect it to Make, Zapier, Google Sheets, or Slack through [integrations](https://apify.com/integrations).

**Where can I report issues?**
Open the **Issues** tab on the actor page with your input and run ID.

# Changelog

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

# Actor input Schema

## `findPostsBy` (type: `string`):

Choose 'Profile or Page timeline' to collect posts from the profiles and Pages in 'Profiles or Pages'. Choose 'Known post URLs' to scrape the post links in 'Post URLs'.

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

Add up to 50 public profiles or Pages, one per line: a handle (NASA), @handle, profile or Page URL (https://www.facebook.com/NASA, profile.php?id=...), or numeric ID. Used when 'Find posts by' is 'Profile or Page timeline'.

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

Add public Facebook post, reel, photo, or video links, one per line: /posts/..., permalink.php, story.php, /reel/..., /videos/..., watch?v=..., photo links, fb.watch, and /share/ links. Used when 'Find posts by' is 'Known post URLs'.

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

Stop after this many posts from each profile or Page. Leave empty to collect every public post Facebook returns.

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

Keep posts published on or after this date (UTC). Collection stops once the timeline reaches older posts.

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

Keep posts published on or before this date (UTC). The timeline starts from this date instead of today.

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

Add the spoken captions of video and reel posts as 'transcript' when Facebook has captions (auto-generated or uploaded). Adds one small download per captioned video.

## `proxyConfiguration` (type: `object`):

No proxy setup is needed. The actor picks its own network route and switches to Apify Proxy when Facebook limits requests.

## Actor input object example

```json
{
  "findPostsBy": "timeline",
  "targets": [
    "NASA"
  ],
  "maxPostsPerTarget": 10,
  "includeTranscripts": false
}
```

# Actor output Schema

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

No description

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parsebird/facebook-user-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/4bkgsfA613O46uEKj/builds/sD9eqnawG7PKa9VdE/openapi.json
