You need to programmatically fetch public Facebook Reel/video metadata and download MP4s for an internal workflow this week. By the end of this guide, you’ll have a working Python integration that starts an async download job, polls for completion, and saves the MP4, plus a quick way to fetch metadata-only—using the Facebook Premium Downloader API on Zyla API Hub.
What this API does and when to use it
The Facebook Premium Downloader API provides two capabilities for public Facebook Reels and videos:
- Start an async download job that yields a downloadable MP4 from Facebook’s CDN once complete.
- Fetch video information (metadata) without running a download workflow.
Typical use cases include automated editorial ingestion, UGC curation queues, compliance archiving, or any backend where you need the MP4 file or metadata for a public Reel/video. The API expects public Facebook URLs such as /reel/…, /watch/?v=, /videos/…, or fb.watch/…
Getting started on Zyla API Hub
Open the Facebook Premium Downloader API listing on Zyla API Hub and subscribe. Zyla uses one account, one API key, and a subscription + quota model—no per-call billing. For this API, you can start a 7-day trial or use 50 requests to validate your integration. There is no Free Plan. Check the API page for current access options and pricing.
Once subscribed, you’ll receive an API key. All requests shown below pass the key as Authorization: Bearer YOUR_API_KEY.
Authentication and headers
- Header: Authorization: Bearer YOUR_API_KEY
- All examples below use the Zyla Hub URL paths for this listing. Do not call origin hosts directly.
Endpoints overview
1) Video Information
Retrieve metadata for a public Facebook Reel/video without initiating a download job.
- Method: GET
- URL: https://zylalabs.com/api/13612/facebook-premium-downloader-api/30379/video-information
- Required params:
- url (string): The public Facebook video URL (example provided below)
cURL (copy-paste ready):
curl -s -X GET "https://zylalabs.com/api/13612/facebook-premium-downloader-api/30378/download?url=https%3A%2F%2Fwww.facebook.com%2Freel%2F1716864869572990%2F&format=mp4" \
-H "Authorization: Bearer YOUR_API_KEY"
Example JSON response:
{
"success": true,
"id": "ddbea44c8fee0af86c40da80b9fcebb71b43f2ec",
"image": "https://scontent-phl2-1.xx.fbcdn.net/v/t51.82787-15/783144007_18064358021738741_5417564166543599844_n.jpg?_nc_cat=102&ccb=1-7&_nc_sid=a27664&_nc_ohc=K3uWHXdnAsgQ7kNvwGYgRLm&_nc_oc=AdrBUhuPSyDpnRP-zBbXB4TK1V0E2f2mz-aGg6GbrFjlKwZbfFAH6ynNbPHxceeh_rw&_nc_zt=23&_nc_ht=scontent-phl2-1.xx&_nc_gid=XrcbYmbN8ZuG357GCmVnIA&_nc_ss=7a289&oh=00_AQJv9a3kURRiH1Uri6TBWExvljPutu75Ucj18F-X6BhbPg&oe=6AA48A83",
"progress_url": "https://fb-download.zylalabs.com/api/progress?id=ddbea44c8fee0af86c40da80b9fcebb71b43f2ec",
"message": "Job started. Poll progress_url every 3–5 seconds until progress is 100, then use download_url."
}
What you’ll actually use:
- post_id: The Facebook ID you can store for future reconciliation.
- title, duration, likes: Lightweight context for UI or indexing.
- image: Thumbnail URL for previews.
- url: Canonical source link.
2) Download
Start an async download job for a public Facebook Reel/video. The response provides a job id and a progress_url. Poll that URL every 3–5 seconds until progress is 100, then use download_url from that response (the MP4 is served by Facebook’s CDN; the Hub does not proxy binary media).
- Method: GET
- URL: https://zylalabs.com/api/13612/facebook-premium-downloader-api/30378/download
- Required params:
- url (string): The public Facebook video URL (example provided below)
- format (string): mp4
cURL (copy-paste ready):
Example JSON response:
What you’ll actually use:
- id: Your job reference for logs.
- progress_url: Poll this URL until progress is 100; then read download_url from that response to fetch the MP4.
- image: Convenient thumbnail while the job runs.
Python implementation: start job, poll, and save MP4
The snippet below does the following:
- Calls Download to start a job for the provided Reel URL.
- Polls progress_url every few seconds.
- When progress reaches 100, fetches download_url and streams the MP4 to disk.
import os
import time
import requests
API_KEY = os.getenv("ZYLA_API_KEY", "YOUR_API_KEY")
VIDEO_URL = "https://www.facebook.com/reel/1716864869572990/"
def start_download_job(video_url: str) -> dict:
hub_url = "https://zylalabs.com/api/13612/facebook-premium-downloader-api/30378/download"
params = {
"url": video_url,
"format": "mp4"
}
resp = requests.get(hub_url, headers={"Authorization": f"Bearer {API_KEY}"}, params=params, timeout=30)
resp.raise_for_status()
return resp.json()
def poll_progress(progress_url: str, interval_seconds: int = 4, max_wait_seconds: int = 180) -> dict:
deadline = time.time() + max_wait_seconds
last = None
while time.time() < deadline:
r = requests.get(progress_url, timeout=30)
r.raise_for_status()
data = r.json()
# Expect fields like "progress" and "download_url" when complete.
progress = data.get("progress")
if progress is not None:
print(f"progress={progress}")
last = data
if isinstance(progress, int) and progress >= 100:
return data
time.sleep(interval_seconds)
raise TimeoutError("Download job did not reach 100% in time")
def save_mp4(download_url: str, out_path: str):
with requests.get(download_url, stream=True, timeout=120) as r:
r.raise_for_status()
with open(out_path, "wb") as f:
for chunk in r.iter_content(chunk_size=8192):
if chunk:
f.write(chunk)
if __name__ == "__main__":
job = start_download_job(VIDEO_URL)
if not job.get("success"):
raise RuntimeError(f"Download job failed to start: {job}")
print(f"Job started: id={job.get('id')}")
print(f"Thumbnail: {job.get('image')}")
progress_url = job["progress_url"]
result = poll_progress(progress_url)
mp4_url = result.get("download_url")
if not mp4_url:
raise RuntimeError(f"No download_url found in progress response: {result}")
output_file = "facebook_reel.mp4"
print(f"Downloading: {mp4_url}")
save_mp4(mp4_url, output_file)
print(f"Saved to {output_file}")
Notes:
- Polling interval: 3–5 seconds per the endpoint guidance. The example uses 4s.
- Timeouts: Adjust max_wait_seconds depending on your queue latency budget.
- Binary media: The actual MP4 is served from Facebook’s CDN via download_url; it’s not proxied by the Hub.
Practical usage patterns
- Metadata gate: Call Video Information first to validate a URL, extract post_id, and display the thumbnail in your UI. Only kick off Download if the user confirms ingestion.
- Queue worker: Start Download jobs in your web process, enqueue the progress_url, and let a worker poll and persist the MP4.
- Idempotency: Store the job id alongside the source URL and your asset ID. If a request is retried, you can decide whether to reuse or start a fresh job.
- File naming: Combine post_id from Video Information with a timestamp for deterministic filenames (e.g., 1716864869572990.mp4).
- Caching: If you process the same Reel multiple times, skip re-downloading unchanged content using your own store keyed by post_id.
Detailed walkthrough: end-to-end flow
Step 1 — (Optional) Fetch video metadata
Use Video Information to quickly verify a public URL and present details to users prior to downloading:
Step 2 — Start the async download job
Call Download with the same URL and format=mp4:
Persist id and progress_url from the response. The message field reminds you to poll every few seconds until ready.
Step 3 — Poll progress_url and download
Every 3–5 seconds, GET the provided progress_url. When progress reaches 100, read download_url and stream the MP4 to disk or object storage. The Hub does not proxy binary media; your application downloads directly from the CDN URL returned by the progress endpoint.
Billing, quotas, and environment setup
- Billing model: Subscription + quota. Not pay-per-call.
- Trial: Your first API can start with a 7-day trial or 50 requests. No Free Plan.
- Environment: Store YOUR_API_KEY in your secret manager (or as ZYLA_API_KEY in development).
- Retries: For transient network issues on progress_url or the final MP4 request, use exponential backoff.
Error handling and edge cases
- Private or unavailable videos: The API targets public Reels/videos. If a URL is not public, expect failures or incomplete data.
- Polling budget: Ensure your worker respects queue SLAs; increase max_wait_seconds if your workloads are large or the source CDN is slow.
- Storage lifecycle: After saving the MP4, move it to cold storage if you expect rare replays; retain post_id to avoid re-fetching.
Real-world use cases
- Editorial review pipelines: Enrich submissions by showing title, duration, and thumbnail before download.
- Compliance archiving: Capture MP4 and metadata for audit trails with job id and post_id recorded for traceability.
- Dataset curation: Use Video Information to filter by duration or presence of likes before spending quota on downloads.
Call this API from AI agents via MCP
If you use Claude Code, Cursor, Windsurf, or any MCP-compatible client, you can route calls through Zyla’s MCP endpoint. Provide your Zyla API key to the MCP endpoint and let the agent orchestrate calls with the same Authorization: Bearer flow.
Docs: MCP
Production checklist
- Set Authorization: Bearer YOUR_API_KEY on every request.
- Use only public Facebook URLs in supported formats (/reel/…, /watch/?v=, /videos/…, fb.watch/…).
- Poll progress_url every 3–5 seconds; wait for progress == 100 before accessing download_url.
- Stream-download the MP4 to avoid large memory buffers.
- Log job id, source URL, and final file path for observability.
FAQ
Does the API proxy the MP4 file?
No. The Hub starts the job and returns a progress_url. Once complete, use download_url from the progress response to download the MP4 directly from Facebook’s CDN.
Can I use private or unlisted Facebook videos?
The endpoints are for public Reels/videos. If a URL isn’t public, metadata and downloads may fail.
What authentication header should I send?
Authorization: Bearer YOUR_API_KEY on every request to the Zyla Hub URLs.
How should I poll the job?
Poll progress_url every 3–5 seconds. When progress is 100, read download_url and save the file.
Is there a free plan?
No Free Plan. Your first API can start with a 7-day trial or 50 requests. Check the item page for current access and pricing.
Ready to implement? Start your integration and validate end-to-end with a trial on the listing page: Start 7-day trial on Facebook Premium Downloader API.