# Facebook Post Scraper (`kingscraper/facebook-post-scraper`) Actor

📘📥 Extract complete Facebook post data
🖼️🎥 Photos, videos & reels included📊👍 Engagement metrics (likes, comments, shares)🔗⚡ Direct CDN links + multiple video qualities👤📝 Uploader info & timestamps🧾💻 All data in clean JSON format

- **URL**: https://apify.com/kingscraper/facebook-post-scraper.md
- **Developed by:** [King Scraper](https://apify.com/kingscraper) (community)
- **Categories:** Social media, Videos, Developer tools
- **Stats:** 26 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$12.99/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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 Post Scraper - Ultimate Social Media Extraction Tool 🚀

**Extract photos, videos, and metadata from Facebook posts with our powerful **Facebook Post Scraper**! Whether you need a reliable **Facebook Video Downloader** or comprehensive **Facebook Reels Downloader**, this enterprise-grade Apify actor delivers complete post data with CDN links and engagement metrics.**

***

### 📋 Overview

Stop manually saving content from Facebook. Our **Facebook Post Scraper** automates the entire process, giving you instant access to:

- 📸 **Photo Downloads** - High-resolution images from any public post
- 🎥 **Video Extraction** - Multiple quality options with our advanced **Facebook Video Downloader**
- 🔄 **Reels Support** - Full **Facebook Reels Downloader** functionality for short-form content
- 📊 **Complete Metadata** - Likes, comments, shares, uploader info, and timestamps
- 🔗 **Direct CDN URLs** - No expiration links for seamless integration

Perfect for social media managers 📱, content creators 🎬, data analysts 📈, and digital archivists 💾!

***

### ⚡ Core Capabilities

#### 🎯 Post Type Detection

- **Auto-Classification** - Automatically identifies photos, videos, reels, and text posts
- **Multi-format Support** - Handles mixed-content posts seamlessly
- **Smart Parsing** - Extracts all available media from single posts

#### 🎬 Advanced Video Features

Our built-in **Facebook Video Downloader** offers:

- **Multiple Resolutions** - From 360p to 1080p and beyond
- **Audio Separation** - Extract audio tracks from videos
- **Format Selection** - MP4, M4A, and original container formats
- **Quality Tier Detection** - SD, HD, and mobile-optimized versions
- **Codec Information** - Video/audio codec specs for editing workflows

#### 📸 **Facebook Reels Downloader** Capabilities

- **Reel-Specific Extraction** - Optimized for Facebook Reels format
- **Vertical Video Support** - Perfect aspect ratio preservation
- **Trending Content Access** - Download viral reels with metadata

#### 📊 Engagement Analytics

- **Like Counts** - Real-time engagement numbers
- **Comment Metrics** - Total comment counts
- **View Tracking** - Video view statistics
- **Timestamps** - Precise upload dates and times
- **Uploader Details** - Profile names, IDs, and URLs

***

### 🔧 Input Configuration

Simply paste your Facebook post URLs in the input section and click "Start". The **Facebook Post Scraper** accepts multiple URLs in a single run!

```json
{
  "post_urls": [
    {
      "url": "https://www.facebook.com/share/p/16vf9TBjLb/"
    },
    {
      "url": "https://www.facebook.com/share/v/1A7Z5yNtWV/"
    },
    {
      "url": "https://www.facebook.com/share/v/1CPiJLohQG/"
    }
  ]
}
```

#### 📝 Input Specifications

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `post_urls` | Array | Yes | List of Facebook post URLs to process |
| `url` | String | Yes | Valid Facebook post URL (photo, video, reel, or text post) |

**Supported URL Formats:**

- `/share/p/` - Shared photo posts
- `/share/v/` - Shared video posts
- `/reel/` - Facebook Reels
- `/videos/` - Video watch pages
- `/posts/` - Text/image posts

***

### 📤 Output Structure

Our **Facebook Post Scraper** returns comprehensive data for each processed URL. Here's what you'll get:

```json
[
  {
    "post_type": "photo",
    "title": "Md Selim Reza",
    "description": "একজন সৎ কর্মকর্তা যখন সাধারণ মানুষের হকের পক্ষে দাঁড়ান, তখন তাঁকে তর্জনী উঁচিয়ে ধমক দেওয়া হয় কেন?\n১০০০ টাকা কেজি দরে খেজুর বিক্রির কারণ জানতে চাওয়া কি কোনো অপরাধ? ন্যায্য দামের প্রশ্ন তোলা কি অন্যায়?...",
    "uploader": "Md Selim Reza",
    "upload_date": "2026-02-22T18:00:03",
    "like_count": 160111,
    "comment_count": 18541,
    "thumbnail": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.30808-6/639233398_2417126435383474_5153584243199859781_n.jpg?stp=dst-jpg_tt6&cstp=mx1280x1901&ctp=p600x600&_nc_cat=100&ccb=1-7&_nc_sid=295ae4&_nc_ohc=i47SMYAS0o4Q7kNvwFpkhpS&_nc_oc=AdloRhbC0C11g8m26FL-NZ60dkNr13jNWW83xhYJviiQhZ27O9MzJQFbRqs6vC0pWig&_nc_zt=23&_nc_ht=scontent-iad3-2.xx&_nc_gid=DNUJVU-6KhSbdAzUYeTbVw&_nc_ss=8&oh=00_AfzfEsSqhWpHCT_R6Iej8nSllfKaL5D0wXGE6T4TSKrBZg&oe=69B0648A",
    "og_type": "video.other",
    "og_url": "https://www.facebook.com/SelimOfficealm/posts/%E0%A6%8F%E0%A6%95%E0%A6%9C%E0%A6%A8-%E0%A6%B8%E0%A7%8E-%E0%A6%95%E0%A6%B0%E0%A7%8D%E0%A6%AE%E0%A6%95%E0%A6%B0%E0%A7%8D%E0%A6%A4%E0%A6%BE-%E0%A6%AF%E0%A6%96%E0%A6%A8-%E0%A6%B8%E0%A6%BE%E0%A6%A7%E0%A6%BE%E0%A6%B0%E0%A6%A3-%E0%A6%AE%E0%A6%BE%E0%A6%A8%E0%A7%81%E0%A6%B7%E0%A7%87%E0%A6%B0-%E0%A6%B9%E0%A6%95%E0%A7%87%E0%A6%B0-%E0%A6%AA%E0%A6%95%E0%A7%8D%E0%A6%B7%E0%A7%87-%E0%A6%A6%E0%A6%BE%E0%A6%81%E0%A7%9C%E0%A6%BE%E0%A6%A8-%E0%A6%A4%E0%A6%96%E0%A6%A8-%E0%A6%A4%E0%A6%BE%E0%A6%81%E0%A6%95%E0%A7%87-%E0%A6%A4%E0%A6%B0%E0%A7%8D%E0%A6%9C%E0%A6%A8%E0%A7%80-%E0%A6%89%E0%A6%81%E0%A6%9A%E0%A6%BF%E0%A7%9F%E0%A7%87-%E0%A6%A7/2417126468716804/",
    "media_urls": [
      {
        "url": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.30808-6/639233398_2417126435383474_5153584243199859781_n.jpg?stp=dst-jpg_tt6&cstp=mx1280x1901&ctp=p600x600&_nc_cat=100&ccb=1-7&_nc_sid=295ae4&_nc_ohc=i47SMYAS0o4Q7kNvwFpkhpS&_nc_oc=AdloRhbC0C11g8m26FL-NZ60dkNr13jNWW83xhYJviiQhZ27O9MzJQFbRqs6vC0pWig&_nc_zt=23&_nc_ht=scontent-iad3-2.xx&_nc_gid=DNUJVU-6KhSbdAzUYeTbVw&_nc_ss=8&oh=00_AfzfEsSqhWpHCT_R6Iej8nSllfKaL5D0wXGE6T4TSKrBZg&oe=69B0648A",
        "type": "image",
        "format_note": "og:image"
      }
    ],
    "input_url": "https://www.facebook.com/share/p/16vf9TBjLb/"
  },
  {
    "post_type": "video",
    "title": "PLAY FREE NOW",
    "description": "Command tanks, jets, ships in War Thunder. Sign up free and get a free bonus pack!",
    "uploader": "War Thunder",
    "uploader_id": "100064560884924",
    "uploader_url": "https://www.facebook.com/100064560884924",
    "upload_date": "20260119",
    "timestamp": 1768826592,
    "duration": 30,
    "view_count": 5171311,
    "like_count": 7427,
    "comment_count": 294,
    "thumbnail": "https://scontent-iad3-1.xx.fbcdn.net/v/t15.5256-10/618115078_25034321019580478_4854502351819611431_n.jpg?stp=dst-jpg_s960x960_tt6&_nc_cat=1&ccb=1-7&_nc_sid=50ce42&_nc_ohc=pOLbQ2IW8pQQ7kNvwGVCjDh&_nc_oc=AdkUgzZ9Ut5cwd4-K1JHXTP_iIMlfUco6TmpwCNzfGx5tmyoFSsNpP1QpCXhD23kehI&_nc_zt=23&_nc_ht=scontent-iad3-1.xx&_nc_gid=waJnTW57N1T3wrN1jc_U0Q&_nc_ss=8&oh=00_AfxUeyllod52f4EsFUGq3sSX0jSi1KH59DU2Rz2xDI_GDA&oe=69B0611B",
    "og_type": "video.other",
    "og_url": "https://www.facebook.com/reel/904798082021093/",
    "webpage_url": "https://www.facebook.com/WarThunder/videos/904798082021093/?rdid=x7haYr4oVBEnwmNM&share_url=https%3A%2F%2Fwww.facebook.com%2Fshare%2Fv%2F1A7Z5yNtWV%2F",
    "media_urls": [
      {
        "url": "https://video-iad3-1.xx.fbcdn.net/o1/v/t2/f2/m412/AQMgEJkBkC3wfVvpKJnKGY34L3A-BlvaqJYBy_goAdSzhYoCCp1CpRIC9UgODhkL6TADBr8oZZ1bEhknaPquY5mnP-s_lA7GCrMeGpE.mp4?_nc_cat=1&_nc_sid=9ca052&_nc_ht=video-iad3-1.xx.fbcdn.net&_nc_ohc=ZCYARQNcklEQ7kNvwFm47Jq&efg=eyJ2ZW5jb2RlX3RhZyI6ImRhc2hfbG5faGVhYWNfdmJyM19hdWRpbyIsInZpZGVvX2lkIjo5MDQ3OTgwODIwMjEwOTMsIm9pbF91cmxnZW5fYXBwX2lkIjowLCJjbGllbnRfbmFtZSI6InVua25vd24iLCJ4cHZfYXNzZXRfaWQiOjg3MjM4MDk4OTEyNDg2OCwiYXNzZXRfYWdlX2RheXMiOjQ1LCJ2aV91c2VjYXNlX2lkIjoxMDEzOSwiZHVyYXRpb25fcyI6MzAsImJpdHJhdGUiOjY5MDEwLCJ1cmxnZW5fc291cmNlIjoid3d3In0=&ccb=17-1&_nc_gid=waJnTW57N1T3wrN1jc_U0Q&_nc_ss=8&_nc_zt=28&oh=00_AfwXLN0zlPpHYXa5OG9Q-mldadLclP_juEOr32_J31pUMw&oe=69B04F9C",
        "type": "audio only",
        "ext": "m4a",
        "format_id": "1277453051156956a",
        "format_note": "DASH audio"
      },
      {
        "url": "https://video-iad3-2.xx.fbcdn.net/o1/v/t2/f2/m412/AQMViouesdOaHyfx83Fmu7GfgT3bp0iIaquwX4jzWpkRVYW4eO2J2ExEFL7-xt_e_NTzz0MNI5sNcm5l715XxdbcPq6RTSncG2MkDI87mQ.mp4?_nc_cat=105&_nc_sid=8bf8fe&_nc_ht=video-iad3-2.xx.fbcdn.net&_nc_ohc=qnYgMosi258Q7kNvwGWMoBx&efg=eyJ2ZW5jb2RlX3RhZyI6Inhwdl9wcm9ncmVzc2l2ZS5GQUNFQk9PSy4uQzMuNjQwLnN2ZV9zZCIsInhwdl9hc3NldF9pZCI6ODcyMzgwOTg5MTI0ODY4LCJhc3NldF9hZ2VfZGF5cyI6NDUsInZpX3VzZWNhc2VfaWQiOjEwMTM5LCJkdXJhdGlvbl9zIjozMCwidXJsZ2VuX3NvdXJjZSI6Ind3dyJ9&ccb=17-1&_nc_gid=waJnTW57N1T3wrN1jc_U0Q&_nc_ss=8&_nc_zt=28&oh=00_AfyXIBObAferl7zV6xQN9dYyd5JopE9cJMYRJdVr0qwqpg&oe=69B05011&bitrate=570661&tag=sve_sd",
        "type": "video+audio",
        "ext": "mp4",
        "format_id": "sd"
      },
      {
        "url": "https://video-iad3-1.xx.fbcdn.net/o1/v/t2/f2/m366/AQNxdEP2xB3dF2z0qsOgS63uY0O0Yy4Fh9Y7D9gI_yOf0_Wb_pDRlh928P6o7uXdmwS5ri4UIvPwBfifs4UdcV-E5ncSQpPa4_F11LV5oYhZng.mp4?_nc_cat=1&_nc_sid=5e9851&_nc_ht=video-iad3-1.xx.fbcdn.net&_nc_ohc=bFkhMS6iC9wQ7kNvwFa90RN&efg=eyJ2ZW5jb2RlX3RhZyI6Inhwdl9wcm9ncmVzc2l2ZS5GQUNFQk9PSy4uQzMuMTI4MC5kYXNoX2gyNjQtYmFzaWMtZ2VuMl83MjBwIiwieHB2X2Fzc2V0X2lkIjo4NzIzODA5ODkxMjQ4NjgsImFzc2V0X2FnZV9kYXlzIjo0NSwidmlfdXNlY2FzZV9pZCI6MTAxMzksImR1cmF0aW9uX3MiOjMwLCJ1cmxnZW5fc291cmNlIjoid3d3In0%3D&ccb=17-1&vs=674ef4c1650ad436&_nc_vs=HBksFQIYRWZiX2VwaGVtZXJhbC9CQzRFRkE5RkY2QTQyRTk5RjhENjM1RUQ0NzE4Q0I5Ml9tdF8xX3ZpZGVvX2Rhc2hpbml0Lm1wNBUAAsgBEgAVAhhAZmJfcGVybWFuZW50L0UyNDk2RDQ2N0YzMDU0MDYyMkRGMDNDNkU1NTBDREJBX2F1ZGlvX2Rhc2hpbml0Lm1wNBUCAsgBEgAoABgAGwKIB3VzZV9vaWwBMRJwcm9ncmVzc2l2ZV9yZWNpcGUBMRUAACaIxLnvoNuMAxUCKAJDMywXQD4AAAAAAAAYGWRhc2hfaDI2NC1iYXNpYy1nZW4yXzcyMHARAHUCZbaeAQA&_nc_gid=waJnTW57N1T3wrN1jc_U0Q&_nc_ss=8&_nc_zt=28&oh=00_Afzd52_akceUwR-f27L121U-TSPUmle2cwl4xv7UEtLQsA&oe=69B04A9C&bitrate=2402262&tag=dash_h264-basic-gen2_720p",
        "type": "video+audio",
        "ext": "mp4",
        "format_id": "hd"
      }
]
```

#### 📊 Output Field Documentation

##### 📋 Post Metadata

| Field | Description |
|-------|-------------|
| `post_type` | Content type: `photo`, `video`, `reel`, or `text` |
| `title` | Post title or uploader name |
| `description` | Full post caption/text content |
| `uploader` | Name of the content creator |
| `uploader_id` | Facebook profile/page ID |
| `uploader_url` | Direct link to uploader's profile |
| `upload_date` | Publication timestamp (ISO or YYYYMMDD format) |
| `timestamp` | Unix timestamp (when available) |

##### 📈 Engagement Metrics

| Field | Description |
|-------|-------------|
| `like_count` | Total likes/reactions on the post |
| `comment_count` | Number of comments |
| `view_count` | Video view count (for video posts) |
| `duration` | Video length in seconds (for videos/reels) |

##### 🎬 Media Assets (using **Facebook Video Downloader** & **Facebook Reels Downloader**)

| Field | Description |
|-------|-------------|
| `thumbnail` | High-quality preview image URL |
| `og_type` | Open Graph media type |
| `og_url` | Original Open Graph URL |
| `webpage_url` | Full Facebook watch/post URL |

##### 📦 Media URLs Array

| Field | Description |
|-------|-------------|
| `url` | Direct CDN link to media file |
| `type` | Media type: `video+audio`, `video only`, `audio only`, `image` |
| `ext` | File extension: `mp4`, `m4a`, `jpg`, etc. |
| `format_id` | Unique identifier for each quality |
| `format_note` | Format description (DASH video, DASH audio, etc.) |
| `resolution` | Video dimensions (e.g., `1280x720`) |
| `vcodec` | Video codec specification |
| `acodec` | Audio codec specification |

***

### 🎯 Quality Options Available

Our **Facebook Video Downloader** automatically detects multiple quality tiers:

1. **4K/HD Quality** - 1080p to 1440p for high-resolution content
2. **Standard HD** - 720p with balanced file size
3. **SD Quality** - 480p for mobile viewing
4. **Audio Only** - Separate M4A audio tracks
5. **Merged Output** - Combined video+audio files

The **Facebook Reels Downloader** specifically optimizes for:

- **Vertical Format** - Perfect 9:16 aspect ratio
- **Mobile Optimization** - Lower bitrates for quick downloads
- **High Quality** - Original reels quality preserved

***

### 💼 Use Cases

#### 📱 Social Media Managers

- Archive client content with our **Facebook Post Scraper**
- Download videos using the **Facebook Video Downloader** for repurposing
- Save trending reels with the **Facebook Reels Downloader** for inspiration

#### 🎥 Content Creators

- Extract raw footage from Facebook videos
- Download audio tracks for remixes
- Save reaction videos and comments for analysis

#### 📊 Data Analysts

- Track engagement metrics over time
- Analyze video performance patterns
- Study viral content characteristics

#### 🏢 Digital Agencies

- Bulk download client portfolios
- Create content backups
- Monitor competitor strategies

#### 💾 Archivists & Researchers

- Preserve culturally significant content
- Document social media trends
- Build research datasets

***

### 🏆 Why Choose Our Facebook Post Scraper?

- ✅ **All-in-One Solution** - Photos, videos, reels, and metadata in one tool
- ✅ **Bulk Processing** - Handle hundreds of URLs per run
- ✅ **No Login Required** - Works with public Facebook content
- ✅ **High Resolution** - Access original quality media
- ✅ **Structured Data** - Clean JSON output for easy integration
- ✅ **Regular Updates** - Maintained for Facebook platform changes
- ✅ **Fast Performance** - Optimized extraction algorithms
- ✅ **Proxy Support** - Bypass rate limits with residential IPs

***

### ⚠️ Limitations

- Only works with **public** Facebook posts (private content requires login)
- Subject to Facebook's rate limiting and CDN restrictions
- Some older posts may have expired CDN links
- Video quality depends on original upload resolution

***

### 🔗 Related Actors in Our Social Media Suite

#### 🎥 **YouTube Tools**

- [YouTube Video Downloader](https://apify.com/kingscraper/youtube-video-downloader)
- [YouTube Shorts Downloader](https://apify.com/kingscraper/youtube-shorts-downloader)
- [YouTube Mp3/Thumbnail & Audio Scraper](https://apify.com/kingscraper/youtube-mp3-thumbnail-audio-scraper)
- [Youtube Video and MP3 Downloader](https://apify.com/kingscraper/youtube-video-and-mp3-downloader)

#### 📘 **Snapchat Tools**

- [Snapchat Story Downloader](https://apify.com/kingscraper/snapchat-story-downloader)
- [Snapchat Spotlight Downloader](https://apify.com/kingscraper/snapchat-spotlight-downloader)

#### 📘 **Facebook Scraper Tools**

- [Facebook Reels Downloader](https://apify.com/kingscraper/facebook-reels-downloader)
- [Facebook Video Post Downloader](https://apify.com/kingscraper/facebook-video-post-downloader)
- [Facebook Reels And Thumbnail Downloader](https://apify.com/kingscraper/facebook-reels-and-thumbnail-downloader)

#### 📘 **Instagram Scraper Tools**

- [Instagram Reels Scraper](https://apify.com/kingscraper/instagram-reels-scraper)
- [Instagram Photo Scraper](https://apify.com/kingscraper/instagram-photo-scraper)
- [Instagram Video Downloader](https://apify.com/kingscraper/instagram-video-downloader)

#### 📘 **Pinterest Scraper Tools**

- [Pinterest Video and Image Downloader](https://apify.com/kingscraper/pinterest-video-and-image-downloader)

#### 📘 **TikTok Scraper Tools**

- [TikTok Thumbnail & Audio Scraper](https://apify.com/kingscraper/tiktok-thumbnail-audio-scraper)
- [Tiktok Video And Thumbnail Downloader](https://apify.com/kingscraper/tiktok-video-and-thumbnail-downloader)

### ✉️ Need Custom Development?

Looking for enhanced features? We offer custom solutions:

- **Higher Resolution Access** - Unlock original quality downloads
- **Private Content Support** - Login-based extraction
- **Scheduled Scraping** - Automated recurring runs
- **Custom Data Fields** - Additional metadata extraction
- **API Integration** - Connect with your existing systems
- **White-label Solutions** - Branded tools for your agency

📧 Email **<mehedy7613@gmail.com>** for:

- Custom pricing quotes
- Feature requests
- Enterprise licensing
- Technical support
- Bulk discounts

# Actor input Schema

## `post_urls` (type: `array`):

List of public Facebook post URLs to scrape. Supports:
Photos  - facebook.com/share/p/{id}/, facebook.com/photo/?fbid={id}
Videos  - facebook.com/watch/?v={id}, facebook.com/videos/{id}
Reels   - facebook.com/reel/{id}, web.facebook.com/reel/{id}

## Actor input object example

```json
{
  "post_urls": [
    {
      "url": "https://www.facebook.com/reel/2652862285088171"
    },
    {
      "url": "https://www.facebook.com/share/p/17Qxe5Z7i1_/"
    }
  ]
}
```

# 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 = {
    "post_urls": [
        {
            "url": "https://www.facebook.com/reel/2652862285088171"
        },
        {
            "url": "https://www.facebook.com/share/p/17Qxe5Z7i1_/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kingscraper/facebook-post-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 = { "post_urls": [
        { "url": "https://www.facebook.com/reel/2652862285088171" },
        { "url": "https://www.facebook.com/share/p/17Qxe5Z7i1_/" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("kingscraper/facebook-post-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 '{
  "post_urls": [
    {
      "url": "https://www.facebook.com/reel/2652862285088171"
    },
    {
      "url": "https://www.facebook.com/share/p/17Qxe5Z7i1_/"
    }
  ]
}' |
apify call kingscraper/facebook-post-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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