# Facebook Media Downloader (`maximedupre/facebook-media-downloader`) Actor

Download public Facebook videos and reels. Get direct media links, thumbnails, captions, engagement counts, source URLs, and scrape timestamps for exports, APIs, schedules, and integrations.

- **URL**: https://apify.com/maximedupre/facebook-media-downloader.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Social media, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.50 / 1,000 media items

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

### 📥 What does Facebook Media Downloader do?

Facebook Media Downloader downloads media from public Facebook video and reel URLs. Add one or more Facebook watch, reel, video, mobile, or share URLs and get a clean dataset with direct media links, thumbnails, captions, engagement counts, source URLs, and scrape timestamps.

Use it as a lightweight Facebook video downloader, Facebook reel downloader, or Facebook media extractor when you need structured data instead of a one-off browser download. The actor does not need Facebook cookies, a Facebook account, or a Meta API key.

This actor is built for public videos and reels only. Private, friends-only, deleted, expired, login-only, photo, and story URLs are skipped cleanly instead of being presented as successful downloads.

### ✅ What can you download?

- Public Facebook watch videos
- Public Facebook reels
- Public Facebook video URL variants
- Mobile Facebook video links
- Facebook share links that resolve to public videos or reels

The actor returns the best direct media URL it can find and keeps all available media versions in `downloadLinks`, including HD and SD links when Facebook exposes them publicly.

### 📊 What data do you get?

Each saved media item can include:

- `facebookId` - the public Facebook media identifier
- `mediaType` - video, reel, or unknown when Facebook does not expose a clearer type
- `url` and `sourceUrl` - the submitted URL and resolved source URL
- `downloadUrl` - the preferred direct media download link
- `downloadLinks` - all discovered media versions with quality labels
- `thumbnailUrl` - preview image when available
- `caption`, `authorName`, and `publishedAt` - public post details when exposed
- `durationSeconds`, `width`, and `height` - media metadata when available
- `engagement` - public reaction, comment, share, and view counts when available
- `scrapedAt` - timestamp for the extraction run

Enable technical metadata if you also want lightweight details such as bitrate tags, file extension, or parsed dimensions from the media URL.

### 🚀 How to use it

1. Paste one or more public Facebook video or reel URLs.
2. Choose the maximum number of media items to save.
3. Pick the preferred quality: best available, HD when available, or SD when available.
4. Run the actor and open the dataset.

For a quick first run, start with one URL and the default settings. Once the output shape looks right, add up to 100 URLs and run the actor on a schedule or through the Apify API.

### 🔌 API and automation

Facebook Media Downloader works well in no-code and developer workflows. You can run it manually in Apify Console, schedule recurring downloads, call it from the Apify API, or connect the dataset to webhooks, Make, Zapier, Google Sheets, cloud storage, or your own data pipeline.

The output is available as JSON, CSV, Excel, XML, RSS, and HTML through Apify dataset exports. That makes it easy to build a Facebook video API workflow without maintaining your own scraper, proxy setup, or media parsing logic.

### 💾 Optional file storage

By default, the actor returns direct media links found on the public Facebook page. If you enable file saving, it also downloads the primary media file and stores it in the run key-value store, giving you an Apify storage URL for that run.

Use file saving when you need a more durable run artifact. Leave it disabled when direct download links are enough and you want the lightest, fastest run.

### ⚖️ Limits and privacy

This actor only works with public Facebook media that can be accessed without logging in. It does not bypass Facebook privacy controls, does not use internal Facebook authentication, and does not fetch private posts, friends-only posts, private group content, or account-only stories.

Some public Facebook pages may expose captions, thumbnails, engagement counts, or HD links differently. When a field is not publicly available, the actor leaves it empty and still saves the usable media item when a direct media URL is found.

### 💸 Pricing

This actor uses pay-per-event pricing. You are charged only for each public media item that is found and saved. Skipped, unsupported, private, deleted, or login-only URLs do not create paid media-item events.

The Free plan price is set for low-cost testing, and paid Apify plans get a lower per-item price for production use.

### ❓ FAQ

**Can it download private Facebook videos?**

No. It only downloads public Facebook videos and reels that Facebook exposes without login. It does not use your account, cookies, or internal authentication.

**Does it support Facebook photos or stories?**

No. The public contract is videos and reels. Photo and story URLs often require login or short-lived access, so they are treated as unsupported unless Facebook exposes usable public media on the page.

**Can I choose HD or SD?**

Yes. Use the preferred quality setting to promote the best available, HD, or SD version as the primary `downloadUrl`. All discovered versions are still kept in `downloadLinks`.

**Can I run it from code?**

Yes. Run the actor through the Apify API, pass your Facebook URLs in the `urls` input field, and read the default dataset when the run finishes.

### 📝 Changelog

- 0.1: Initial release.

### 🆘 Support

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

### 🔗 Other actors

- [Instagram Downloader API ↗](https://apify.com/maximedupre/instagram-downloader-api) - Download public Instagram post and reel media with metadata.
- [TikTok Video Downloader ↗](https://apify.com/maximedupre/tiktok-video-downloader) - Save TikTok video and audio media from public video URLs.
- [Pinterest Video Downloader ↗](https://apify.com/maximedupre/pinterest-video-downloader) - Download Pinterest pin videos and images from public pin URLs.
- [Facebook Reviews Scraper ↗](https://apify.com/maximedupre/facebook-reviews-scraper) - Extract public Facebook Page reviews for brand and location research.
- [TikTok Story Viewer ↗](https://apify.com/maximedupre/tiktok-story-viewer) - Export active public TikTok stories with media links and metadata.

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

# Actor input Schema

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

Public Facebook video or reel URLs to process. Supports watch, reel, videos, mobile, and share URL variants. Photo and story URLs usually require login, so they are not supported targets.
## `maxItems` (type: `integer`):

Maximum number of public media items to save across all URLs.
## `preferredQuality` (type: `string`):

Choose which direct media link should be promoted as the primary download URL when multiple versions are available.
## `saveFiles` (type: `boolean`):

When enabled, downloads the primary media file and saves it to the run key-value store so you get a more durable Apify storage URL.
## `includeTechnicalMetadata` (type: `boolean`):

Include lightweight technical details parsed from Facebook media URLs, such as bitrate tags, dimensions, and file extension when available.

## Actor input object example

```json
{
  "urls": [
    "https://www.facebook.com/watch?v=665006239776998",
    "https://www.facebook.com/reel/3019177848274825"
  ],
  "maxItems": 100,
  "preferredQuality": "best",
  "saveFiles": false,
  "includeTechnicalMetadata": false
}
````

# Actor output Schema

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

Open the dataset with direct media links, thumbnails, captions, engagement counts, source links, and scrape timestamps.

# 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": [
        "https://www.facebook.com/watch?v=665006239776998",
        "https://www.facebook.com/reel/3019177848274825"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/facebook-media-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": [
        "https://www.facebook.com/watch?v=665006239776998",
        "https://www.facebook.com/reel/3019177848274825",
    ] }

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

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Media Downloader",
        "description": "Download public Facebook videos and reels. Get direct media links, thumbnails, captions, engagement counts, source URLs, and scrape timestamps for exports, APIs, schedules, and integrations.",
        "version": "0.1",
        "x-build-id": "XfLyis1bb8CulEp4X"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~facebook-media-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-facebook-media-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/maximedupre~facebook-media-downloader/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-facebook-media-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/maximedupre~facebook-media-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-facebook-media-downloader",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "Facebook video or reel URLs",
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "description": "Public Facebook video or reel URLs to process. Supports watch, reel, videos, mobile, and share URL variants. Photo and story URLs usually require login, so they are not supported targets.",
                        "items": {
                            "type": "string",
                            "minLength": 1
                        }
                    },
                    "maxItems": {
                        "title": "Max media items",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of public media items to save across all URLs.",
                        "default": 100
                    },
                    "preferredQuality": {
                        "title": "Preferred quality",
                        "enum": [
                            "best",
                            "hd",
                            "sd"
                        ],
                        "type": "string",
                        "description": "Choose which direct media link should be promoted as the primary download URL when multiple versions are available.",
                        "default": "best"
                    },
                    "saveFiles": {
                        "title": "Save media files to Apify storage",
                        "type": "boolean",
                        "description": "When enabled, downloads the primary media file and saves it to the run key-value store so you get a more durable Apify storage URL.",
                        "default": false
                    },
                    "includeTechnicalMetadata": {
                        "title": "Include technical metadata",
                        "type": "boolean",
                        "description": "Include lightweight technical details parsed from Facebook media URLs, such as bitrate tags, dimensions, and file extension when available.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
