# Facebook Post Downloader (`codenest/facebook-post-downloader`) Actor

Get comprehensive Facebook post data including videos, photos & reels. Each post returns metadata (uploader, date, engagement), direct download URLs for multiple quality variants, separate audio tracks, thumbnails, and technical specs (codec, resolution, bitrate) in structured JSON format.

- **URL**: https://apify.com/codenest/facebook-post-downloader.md
- **Developed by:** [CodeNest](https://apify.com/codenest) (community)
- **Categories:** Social media, Videos, Automation
- **Features:** Limited permissions
- **Stats:** 23 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 scraped facebook posts

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Post Downloader - Ultimate Post & Media Extraction Tool

**Effortlessly download Facebook posts with our powerful **Facebook Post Downloader**! This Apify actor enables bulk extraction of photos, videos, Reels, captions, engagement metrics, comments, and direct downloadable media URLs.**

***

### 📋 Overview

Need to archive Facebook content, download videos, or analyze engagement? This **Facebook Post Downloader** delivers:

- 🖼️ **Multi-Format Support** - Photos, videos, Reels, and photo sets
- 📊 **Full Engagement Data** - Likes, comments, shares, and views
- 💬 **Comment Extraction** - Comments with author details and timestamps
- 🎬 **Direct Download URLs** - HD/SD video variants and image URLs
- 🎵 **Audio Extraction** - Separate audio tracks from videos
- 🌐 **Proxy Support** - Residential proxy with country targeting

Perfect for content archivists 📚, social media managers 📈, researchers 🔬, and marketers 📊!

***

### ⭐ Core Capabilities of Facebook Post Downloader

#### 🎞️ Multi-Post Type Support

- **Photo Posts** - Single image extraction with high-quality URLs
- **Photoset Posts** - Multiple images from album-style posts
- **Reel Posts** - Short-form vertical video downloads
- **Video Posts** - Standard video and shared video content

#### 📊 Engagement Metrics

- **Like Counts** - Formatted engagement numbers
- **Comment Counts** - Total comments on posts
- **Share Counts** - Post share statistics
- **View Counts** - Video and Reel view metrics

#### 💬 Comment Extraction

- **Comment Text** - Full comment content
- **Author Details** - Commenter name, ID, and profile URL
- **Timestamps** - Comment creation times
- **Comment Limit Control** - Set maximum comments to extract

#### 🎬 Complete Media Downloads

- **Photo Download URLs** - Direct image links
- **Reel Download URLs** - Direct Reel video links
- **Video Variants** - Multiple quality options (HD/SD)
- **Audio Tracks** - Separate audio file extraction
- **Thumbnails** - High-quality preview images

#### 🔍 Content Metadata

- **Captions** - Full post text and descriptions
- **Hashtags** - Extracted hashtags from captions
- **Mentions** - Extracted @mentions
- **Uploader Info** - Name, ID, and profile URL
- **Publish Dates** - Exact timestamps and relative dates

***

### ⚙️ Input Configuration

Simply enter Facebook post URLs, configure comment extraction, and click "Start". Input looks like this:

```json
{
  "include_comments": true,
  "urls": [
    {
      "url": "https://web.facebook.com/share/p/186YkWA625/"
    },
    {
      "url": "https://web.facebook.com/reel/946299641855647"
    },
    {
      "url": "https://www.facebook.com/share/v/1Gkf8TA6hh/"
    },
    {
      "url": "https://web.facebook.com/share/p/1PRSUvJ5UU/"
    },
    {
      "url": "https://web.facebook.com/reel/2288811528631804"
    }
  ],
  "max_comments": 25,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

#### 📝 Input Specifications

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `urls` | Array | ✅ Yes | - | Facebook post, Reel, or video URLs to download |
| `url` | String | ✅ Yes | - | Valid Facebook post URL |
| `include_comments` | Boolean | ❌ No | false | Extract comments from posts |
| `max_comments` | Integer | ❌ No | 10 | Maximum comments to extract per post |
| `proxy.useApifyProxy` | Boolean | ❌ No | false | Enable Apify proxy rotation |
| `proxy.apifyProxyGroups` | Array | ❌ No | - | Proxy groups (e.g., "RESIDENTIAL") |
| `proxy.apifyProxyCountry` | String | ❌ No | - | Target country code (e.g., "US") |

***

### 📤 Output Structure

Your **Facebook Post Downloader** produces comprehensive post data with media URLs and comments:

```json
[
  {
    "url": "https://www.facebook.com/amanullah.t.9/posts/pfbid02...",
    "input_url": "https://web.facebook.com/share/p/186YkWA625/",
    "title": "Dutch Bangla Bank Math...",
    "description": "Dutch Bangla Bank Math...",
    "caption": "Dutch Bangla Bank Math...",
    "post_type": "photo",
    "uploader": "Aman Ullah",
    "uploader_id": "100002938917817",
    "uploader_url": "https://www.facebook.com/100002938917817",
    "published_time": 1786704241,
    "date": "2026-08-14T10:44:01Z",
    "post_date": "Friday, August 14, 2026 at 3:44 AM",
    "relative_date": "about a month ago",
    "like_count": "424",
    "comment_count": "28",
    "share_count": "86",
    "hashtags": ["DBBL", "viralpost"],
    "mentions": [],
    "comments": [
      {
        "id": "Y29tbWVudDoyNzg2MjU2MzI4MDA5MTU5NV8xMTE2MDgzODIxMDgxOTQy",
        "text": "#ব্যাংক প্রিলি গাইডলাইন ব্যাচ...",
        "author": "Aman Ullah",
        "author_id": "100002938917817",
        "author_url": "https://www.facebook.com/100002938917817",
        "created_time": 1786704263
      }
    ],
    "images": [
      {
        "url": "https://scontent-ord5-2.xx.fbcdn.net/v/t39.99422-6/...",
        "quality": "high",
        "type": "photo"
      }
    ],
    "images_count": 1,
    "photo_download_url": "https://scontent-ord5-2.xx.fbcdn.net/v/t39.99422-6/...",
    "video_variants": [],
    "thumbnail_url": "https://scontent-ord5-2.xx.fbcdn.net/v/t39.99422-6/...",
    "recent_comments_count": 10,
    "scraped_at": "2026-09-13T16:59:20.358284Z"
  }
]
```

#### 📖 Output Field Documentation

**🔹 Post Identification**
| Field | Description |
|-------|-------------|
| `url` | Resolved Facebook post URL |
| `input_url` | Original URL provided as input |
| `post_type` | Type: photo, video, reel, photoset |
| `title` | Post title or heading |
| `description` | Full post description |
| `caption` | Post caption text |

**🔹 Uploader Information**
| Field | Description |
|-------|-------------|
| `uploader` | Name of post author |
| `uploader_id` | Facebook user ID |
| `uploader_url` | Profile URL |

**🔹 Engagement Metrics**
| Field | Description |
|-------|-------------|
| `like_count` | Number of likes/reactions |
| `comment_count` | Total comment count |
| `share_count` | Total share count |
| `view_count` | Video/Reel view count |
| `recent_comments_count` | Comments captured in this run |

**🔹 Temporal Data**
| Field | Description |
|-------|-------------|
| `published_time` | Unix timestamp of publication |
| `date` | ISO 8601 formatted date |
| `post_date` | Human-readable date string |
| `relative_date` | Relative time (e.g., "about a month ago") |

**🔹 Content Tags**
| Field | Description |
|-------|-------------|
| `hashtags` | Extracted hashtags from caption |
| `mentions` | Extracted @mentions |
| `tags` | Tagged entities |

**🔹 Comments Data**
| Field | Description |
|-------|-------------|
| `comments` | Array of comment objects |
| `comments.id` | Unique comment ID |
| `comments.text` | Full comment text |
| `comments.author` | Commenter name |
| `comments.author_id` | Commenter user ID |
| `comments.author_url` | Commenter profile URL |
| `comments.created_time` | Comment timestamp |

**🔹 Media Assets**
| Field | Description |
|-------|-------------|
| `images` | Array of image objects |
| `images.url` | Direct image URL |
| `images.quality` | Image quality (high) |
| `images_count` | Total number of images |
| `photo_download_url` | Primary image download URL |
| `thumbnail_url` | Post thumbnail URL |
| `reel_download_url` | Direct Reel video download URL |

**🔹 Video & Audio**
| Field | Description |
|-------|-------------|
| `video_variants` | Array of video quality options |
| `video_variants.quality` | "hd" or "sd" |
| `video_variants.url` | Direct video URL |
| `video_variants.ext` | File extension (mp4) |
| `audio_download_url` | Direct audio track URL |
| `audio_variants` | Array of audio options |
| `audio_variants.format_id` | Audio format identifier |
| `audio_variants.ext` | Audio extension (m4a) |
| `audio_variants.tbr` | Audio bitrate |

***

### 🎨 Key Features of This Facebook Post Downloader

#### 🖼️ Multi-Format Media Support

- **Photo Posts** - Single high-quality image extraction
- **Photoset Posts** - Multiple images with individual URLs
- **Reels** - Vertical short-form video downloads
- **Videos** - Standard video content with quality variants

#### 🎬 Complete Video Downloads

- **HD Quality** - High-definition video variants
- **SD Quality** - Standard definition for smaller files
- **Direct CDN URLs** - No re-encoding, original quality
- **Multiple Formats** - MP4 video and M4A audio

#### 💬 Comment Intelligence

- **Comment Text** - Full comment content extraction
- **Author Details** - Names, IDs, and profile URLs
- **Timestamps** - Precise comment creation times
- **Configurable Limits** - Control max comments extracted

#### 📊 Engagement Analytics

- **Reaction Counts** - Likes and reaction metrics
- **Comment Counts** - Total discussion volume
- **Share Counts** - Viral reach indicators
- **View Counts** - Video and Reel performance

#### 🔍 Metadata Extraction

- **Hashtag Detection** - All hashtags from captions
- **Mention Detection** - All @mentions extracted
- **Uploader Info** - Complete author details
- **Temporal Data** - Multiple date formats

***

### 💡 Use Cases for Facebook Post Downloader

- **📚 Content Archivists** - Preserve important Facebook posts
- **📈 Social Media Managers** - Download content for repurposing
- **🔬 Researchers** - Analyze engagement and comment patterns
- **📊 Marketers** - Track competitor content performance
- **🎬 Video Editors** - Source footage and audio tracks
- **📱 App Developers** - Build Facebook content aggregators
- **📰 Journalists** - Archive newsworthy social media posts

***

### ✨ Why Choose Our Facebook Post Downloader?

- **⚡ Fast Extraction** - Concurrent processing with proxy support
- **🎯 100% Accurate** - Preserves original quality and metadata
- **📦 Complete Data** - Everything from captions to audio tracks
- **🔄 Regular Updates** - Adapts to Facebook changes
- **🛡️ Production Ready** - Reliable with various post types
- **💰 Cost Efficient** - Optimized for minimal compute time
- **🔒 Privacy Focused** - No personal data stored or shared

***

### ⚠️ Limitations

- Only works with publicly accessible Facebook posts
- Private or restricted posts are not accessible
- Some posts may have limited media availability
- High-volume scraping may trigger rate limits
- Comment extraction limited by max_comments setting

***

### 📧 Need Custom Features for Your Facebook Post Downloader?

Want **additional post types**, **specific comment filters**, **custom output formats**, **advanced analytics**, or **automated reporting**?

✉️ Email **<codenest2.0@gmail.com>** for tailored enterprise solutions!

***

# Actor input Schema

## `urls` (type: `array`):

List of public Facebook post URLs. Accepts photos, multi-image photosets, carousels, videos, and reels in any combination.

## `include_comments` (type: `boolean`):

Toggle ON to extract recent comments for each post (charges additional pay-per-event fee). Toggle OFF to scrape only media and basic post metrics at standard rate.

## `max_comments` (type: `integer`):

Maximum number of recent comments to extract per post (applicable when Include Comments is ON).

## `proxy` (type: `object`):

Proxy settings for requests. Apify Residential Proxy is recommended to prevent Facebook IP rate limits and geo-blocks.

## `cookie_header` (type: `string`):

Optional. Paste the raw Cookie header from your browser DevTools (Network tab -> any facebook.com request -> Headers -> Cookie). This unlocks login-gated posts and full comment threads.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://www.facebook.com/reel/1831270064408357"
    },
    {
      "url": "https://www.facebook.com/watch/?v=783325287492075"
    },
    {
      "url": "https://www.facebook.com/photo/?fbid=122101517096109874"
    }
  ],
  "include_comments": false,
  "max_comments": 25,
  "proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "US"
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Tabular overview of scraped Facebook posts with authors, post types, published dates, likes, comments, shares, views, and captions.

## `allResults` (type: `string`):

Complete dataset containing full post metadata, high-resolution photos, direct MP4 video downloads, audio files, metrics, and comments.

## `outputRecord` (type: `string`):

Consolidated JSON array of all scraped posts stored in the default Key-Value Store.

# 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 = {
    "urls": [
        {
            "url": "https://www.facebook.com/reel/1831270064408357"
        },
        {
            "url": "https://www.facebook.com/watch/?v=783325287492075"
        },
        {
            "url": "https://www.facebook.com/photo/?fbid=122101517096109874"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("codenest/facebook-post-downloader").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 = { "urls": [
        { "url": "https://www.facebook.com/reel/1831270064408357" },
        { "url": "https://www.facebook.com/watch/?v=783325287492075" },
        { "url": "https://www.facebook.com/photo/?fbid=122101517096109874" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("codenest/facebook-post-downloader").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 '{
  "urls": [
    {
      "url": "https://www.facebook.com/reel/1831270064408357"
    },
    {
      "url": "https://www.facebook.com/watch/?v=783325287492075"
    },
    {
      "url": "https://www.facebook.com/photo/?fbid=122101517096109874"
    }
  ]
}' |
apify call codenest/facebook-post-downloader --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,codenest/facebook-post-downloader"
        }
    }
}
```

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/enjWJwwuwL3logi2z/builds/bCNxJhhxgfkE7fLGo/openapi.json
