# Facebook Video Downloader (`scraper-mind/facebook-video-downloader`) Actor

Elevate your media download workflow with our Facebook Video Downloader API  the all-in-one solution for Facebook Downloader. Enjoy the best in Facebook video downloader technology, complete with separate and merged download options, and bulk processing capabilities for every use case

- **URL**: https://apify.com/scraper-mind/facebook-video-downloader.md
- **Developed by:** [Scraper Mind](https://apify.com/scraper-mind) (community)
- **Categories:** Videos, Social media, Automation
- **Stats:** 92 total users, 3 monthly users, 99.8% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00/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 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

## Facebook Video Downloader & Facebook Reels Downlaoder API

Transform your media extraction workflow with our powerful **Facebook Video Downloader API** – the ultimate solution for anyone searching for a reliable **Facebook video downloader**. Designed to handle bulk processing (1000+ URLs and more), this API not only extracts high-quality download links for Facebook videos but also supports advanced features for both long videos and reels.

---

### Overview

Our Facebook Video Downloader API is a robust tool for extracting essential media links and metadata from Facebook videos. Whether you need a quick download for a Facebook reel or a full-resolution download for a long video, our API delivers:

- **Optimized Resolutions for Facebook:** Download videos in 1080p, 720p, 640p, 540p, 480p, 360p, 270p, or 240p – the only resolutions available on Facebook.
- **Video & Audio Separation:** For high-resolution videos (where Facebook does not provide a merged stream), our API provides separate video and audio links, ensuring you get the best quality for your download needs.
- **Progressive (Merged) Downloads:** For low-resolution videos, receive a single merged audio+video link—ideal for quick downloads and simple workflows.
- **Rich Metadata:** Gain access to details such as original URL, requested and provided resolutions, download type, thumbnails, titles, authors, durations, channels, and more.
- **Bulk URL Processing:** Efficiently process 1000+ URLs at once—even import URLs from TXT files—making it ideal as a scalable **Facebook video downloader** solution.
- **Residential Proxy Integration (Optional):** To ensure maximum performance and overcome regional limitations, the API can be configured to use a residential proxy by default.

---

### Key Features

- **Multiple Resolution Options:**  
  Choose from 1080p, 720p, 640p, 540p, 480p, 360p, 270p, or 240p. Whether you’re a professional editor or a casual user, our API adapts to your resolution requirements.
  
- **Separate & Progressive Download Links:**  
  - **High Resolution Downloads:** Returns separate video and audio links for optimal quality—perfect for users who require distinct streams for advanced editing.
  - **Low Resolution Downloads:** Provides a merged (progressive) link when available, simplifying the download process.
  
- **Comprehensive Metadata:**  
  Every download delivers detailed information including:
  - `original_url`
  - `requested_resolution`
  - `provided_resolution`
  - `download_type`
  - `downloadable_video_link` (Video)
  - `downloadable_audio_link` (Audio)
  - `title`
  - `author`
  - `thumbnail`
  - `duration` (formatted in hours/minutes/seconds)
  - `channel`
  - `source`
  - `video_type`
  - `note`
  - `prog_video_type`
  - `prog_resolution`
  - `prog_video_format`
  - `prog_downloadable_link`
  
- **Bulk Processing & File Input:**  
  Process thousands of URLs in one go with support for JSON or TXT file imports—making it the top choice for any professional or personal **Facebook video downloader**.

- **Residential Proxy Integration:**  
  By default, the API can leverage a residential proxy to maximize download success rates. This ensures reliable performance when downloading high-resolution content.

- **Customizable Options:**  
  Need merged audio+video streams for high resolutions or have custom processing requirements? Contact us for tailored solutions that perfectly fit your workflow.

---

### How It Works

1. **Input JSON Data:**  
   Supply your Facebook video URLs and configuration via JSON. If no custom proxy settings are provided, the API automatically uses default proxy settings to optimize performance.
   
2. **Media Extraction Process:**  
   The API extracts all available formats from each video. It intelligently selects:
   - The best progressive (merged) stream for low resolutions.
   - Separate video and audio streams for high resolutions.
   - A backup progressive download link representing the latest available merged option (ideal for quick downloads).
   
3. **Output JSON Data:**  
   After processing, you receive a JSON array for every URL containing all extracted download links and metadata—perfect for integration into your applications or workflows.

---

### Input & Output Examples

#### Input JSON Demo

```json
{
  "proxy": {
    "useResidentialProxy": true,
    "proxyGroups": ["RESIDENTIAL"],
    "proxyCountry": "US"
  },
  "video_urls": [
    { "url": "https://facebook.com/your_video_link_1" },
    { "url": "https://facebook.com/your_video_link_2" }
  ],
  "desired_resolution": "1080p"
}
````

## Output JSON Demo

```json
[
  {
    "original_url": "https://facebook.com/your_video_link_1",
    "requested_resolution": "1080p",
    "provided_resolution": "720p",
    "download_type": "separate",
    "downloadable_video_link": "https://download.video.example.com/abcd1234",
    "downloadable_audio_link": "https://download.audio.example.com/wxyz5678",
    "title": "Amazing Facebook Video Title",
    "author": "John Doe",
    "thumbnail": "https://facebook.com/thumbnail.jpg",
    "duration": "5m 30s",
    "channel": "John Doe Channel",
    "source": "facebook",
    "video_type": "long video",
    "note": "Separate streams provided for high resolution.",
    "prog_video_type": "Video+Audio",
    "prog_resolution": "480p",
    "prog_video_format": "mp4",
    "prog_downloadable_link": "https://download.progressive.example.com/efgh9012"
  },
  {
    "original_url": "https://facebook.com/your_video_link_2",
    "requested_resolution": "1080p",
    "provided_resolution": "1080p",
    "download_type": "merged",
    "downloadable_video_link": "https://download.video.example.com/ijkl3456",
    "downloadable_audio_link": "https://download.audio.example.com/mnop7890",
    "title": "Exciting Facebook Reel",
    "author": "Jane Smith",
    "thumbnail": "https://facebook.com/reel-thumbnail.jpg",
    "duration": "45s",
    "channel": "Jane Smith Channel",
    "source": "facebook",
    "video_type": "reel",
    "note": "Merged stream available.",
    "prog_video_type": "Video+Audio",
    "prog_resolution": "720p",
    "prog_video_format": "mp4",
    "prog_downloadable_link": "https://download.progressive.example.com/qrst2345"
  }
]
```

***

### Additional Information

#### Proxy Usage:

- **Default Option:** If no custom proxy settings are provided, the API defaults to using a residential proxy configuration, ensuring optimal download success.
- **User Control:** Users can supply their own proxy settings to manage performance or cost considerations.

#### Custom Script Options:

For users requiring a version that returns a merged audio+video stream even for high resolutions, please contact us for a custom solution tailored to your workflow.

#### Bulk Processing & File Input:

Efficiently handle **1000+ URLs** and import them from **TXT files**, making our solution the top choice for professional-grade Facebook video downloader applications.

***

### Getting Started

#### 1. Subscribe & Deploy:

Sign up for our service and deploy the actor via our platform. Get started with a versatile Facebook video downloader that meets all your needs.

#### 2. Prepare Your Input:

Format your input **JSON (or TXT file)** with URLs and desired resolution as shown above.

#### 3. Run the Actor:

Execute the actor to receive your output JSON containing all essential download links and metadata.

#### 4. Seamless Integration:

Easily integrate this API into your applications or workflows using the straightforward JSON input/output format.

***

### Support

Our dedicated team is available **24/7** for support and inquiries. Whether you need help with integration or have questions about using the API as a Facebook video downloader, we're here to help.

# Actor input Schema

## `video_urls` (type: `array`):

List of Facebook video URLs to process.

## `requested_resolution` (type: `string`):

Select your desired resolution.

## Actor input object example

```json
{
  "video_urls": [
    {
      "url": "https://www.facebook.com/share/v/18zL4zNBNJ/"
    },
    {
      "url": "https://www.facebook.com/share/r/168H2dZLPu/"
    }
  ],
  "requested_resolution": "1080p"
}
```

# 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 = {
    "video_urls": [
        {
            "url": "https://www.facebook.com/share/v/18zL4zNBNJ/"
        },
        {
            "url": "https://www.facebook.com/share/r/168H2dZLPu/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraper-mind/facebook-video-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 = { "video_urls": [
        { "url": "https://www.facebook.com/share/v/18zL4zNBNJ/" },
        { "url": "https://www.facebook.com/share/r/168H2dZLPu/" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scraper-mind/facebook-video-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 '{
  "video_urls": [
    {
      "url": "https://www.facebook.com/share/v/18zL4zNBNJ/"
    },
    {
      "url": "https://www.facebook.com/share/r/168H2dZLPu/"
    }
  ]
}' |
apify call scraper-mind/facebook-video-downloader --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Video Downloader",
        "description": "Elevate your media download workflow with our Facebook Video Downloader API  the all-in-one solution for Facebook Downloader. Enjoy the best in Facebook video downloader technology, complete with separate and merged download options, and bulk processing capabilities for every use case",
        "version": "1.0",
        "x-build-id": "ifSOQapMbcdv9sz0J"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraper-mind~facebook-video-downloader/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraper-mind-facebook-video-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/scraper-mind~facebook-video-downloader/runs": {
            "post": {
                "operationId": "runs-sync-scraper-mind-facebook-video-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/scraper-mind~facebook-video-downloader/run-sync": {
            "post": {
                "operationId": "run-sync-scraper-mind-facebook-video-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": [
                    "video_urls"
                ],
                "properties": {
                    "video_urls": {
                        "title": "Facebook Video URLs",
                        "type": "array",
                        "description": "List of Facebook video URLs to process.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "requested_resolution": {
                        "title": "Requested Resolution",
                        "enum": [
                            "1080p",
                            "720p",
                            "640p",
                            "540p",
                            "480p",
                            "360p",
                            "270p",
                            "240p"
                        ],
                        "type": "string",
                        "description": "Select your desired resolution.",
                        "default": "1080p"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
