Facebook Video Scraper with Duration Analysis
Pricing
$8.99/month + usage
Facebook Video Scraper with Duration Analysis
π Explore Facebook videos like a pro! Get duration β± and uploader details instantly. Privacy-safe, high-speed, and designed for developers to discover patterns, insights, and trends effortlesslyπ±
Pricing
$8.99/month + usage
Rating
4.3
(5)
Developer

Neuro Scraper
Actor stats
1
Bookmarked
10
Total users
4
Monthly active users
1.1 days
Issues response
11 days ago
Last modified
Categories
Share
π― Facebook Video Scraper β Apify Actor
Hero: Instant, privacy-safe extraction of Facebook video metadata and direct media URLs β production-ready and easy to run from Apify Console.
π One-line summary
Turn Facebook video links into clean, structured JSON (URLs, titles, stats, and multiple duration formats) β no code changes required in Console.
π‘ Use cases β When to use
- Monitor public pages for trending videos and engagement signals.
- Feed reliable video URLs into transcription, summarization, or indexing pipelines.
- Build content audits or competitor intelligence dashboards.
- Bulk-export media links and metadata for analytics teams.
β‘ Quick Start β Console (one-click)
- Open this Actor in Apify Console.
- Paste the example input (see Inputs section) into the Input tab.
- Click Run β results appear in the Dataset when the run completes.
βοΈ Quick Start β CLI & API
CLI (apify-cli)
# Run with a simple input fileapify run --input input.example.json
Python β apify-client
from apify_client import ApifyClientclient = ApifyClient('<APIFY_TOKEN>')run_input = {"facebookVideoUrls": ["https://www.facebook.com/watch?v=1234567890"]}run = client.actor('your-username/facebook-video-scraper').call(run_input=run_input)print('Run started:', run['id'])
π Inputs (fields & schema)
Paste JSON into the Actor Input field in Console. Minimal example is in input.example.json (in Canvas).
Schema (key fields):
facebookVideoUrls(array[string]) β required. One or more Facebook watch/post URLs.maxVideos(integer) β optional. Limit processed items.cookiesFile(string) β optional. Key-value store name of a cookies file for logged-in scraping.proxyConfig(object) β optional. Proxy settings (Apify Proxy or custom).
βοΈ Configuration
| π Name | π Type | β Required | βοΈ Default | π Example | π§ Notes |
|---|---|---|---|---|---|
| username | string | β Yes | None | "tiktok_user123" | Target username to fetch info for (optional alias). |
| proxyConfig | object | βοΈ Optional | {} | {"useApifyProxy": true} | Proxy settings (use Apify Proxy or custom credentials). |
Example Console setup: Paste
"tiktok_user123"into the Input field underusername, then click Run Actor.
π Outputs (Dataset / KV examples)
The actor writes results to the default Dataset and to a key-value store ALL_RESULTS.
Each record is a compact JSON object with metadata and multiple duration formats.
Output example
{"id": "1234567890","title": "Funny Cat Compilation","description": "The funniest cats of 2025","upload_date": "1st October 2025","timestamp": 1696158720,"timestamp_iso": "2025-10-01T14:32:00Z","view_count": "154.3K","like_count": 9200,"comment_count": 142,"videoUrl": "https://video.xx.fbcdn.net/v/t42.9040-2/...","thumbnail": "https://scontent.xx.fbcdn.net/v/t15.5256-10/...","duration_seconds": 97.0,"duration": "1m 37s","duration_display": "1 Minute 37 Seconds (0.0270 Hours)","duration_full": {"in_seconds": "97 Seconds","in_minutes": "1 Minutes 37 Seconds","in_hours": "0 Hours 1 Minutes 37 Seconds"},"duration_summary": "β± 97s | 1m 37s | 0h 1m 37s","duration_decimal_hours": 0.027,"duration_decimal_minutes": 1.62,"raw_json": { }}
π Environment Variables
<APIFY_TOKEN>β used by the Apify Console/CLI when calling via API.<PROXY_USER:PASS@HOST:PORT>β placeholder for custom proxy credentials (store as a secret).FB_COOKIESβ optional placeholder for a cookies file name in key-value store when scraping private/restricted videos.
TODO: Replace placeholders with secrets via Console Secret Manager. Never paste credentials directly into Input.
βΆοΈ How to Run
Console
- Open the Actor page.
- Paste
input.example.jsoninto Input. - Click Run β monitor progress in Logs and Dataset.
CLI
$apify run --input input.example.json
API
Use the Python snippet above (apify-client) β call the actor with run_input and poll the run result.
β° Scheduling & Webhooks
- Schedule runs in Console using the Scheduler to automate daily or hourly collection.
- Configure Webhooks in Apify to receive run-complete notifications and processed payloads.
πΎοΈ Logs & Troubleshooting
- If extraction fails for certain URLs, enable proxy and provide a
cookiesFilefor logged-in access. - Check the Logs tab for extractor errors β common causes: region restrictions, private content, or temporary changes to the source site.
- If you see parsing errors, try toggling proxy or updating cookies.
π Permissions & Storage Notes
- The Actor writes to the default Dataset and
ALL_RESULTSkey in Key-Value store. - Do not store credentials in public Datasets. Use Apify Secret Manager for sensitive data.
- This Actor is designed to respect privacy and collect only publicly accessible metadata unless you provide valid cookies.
π Changelog / Versioning
- v1.0.0 β Production-ready release: reliable extraction, multi-format durations, Console-friendly inputs.
- Future minor releases will focus on extractor resilience and proxy handling improvements.
π Notes / TODOs
- TODO: Add explicit example of
cookiesFilecreation and upload instructions (reason: varies by user/browser). - TODO: Consider adding native retry/backoff settings in Input schema for large-scale runs.
π Proxy Configuration
Using proxies improves reliability when scraping public platforms:
- Apify Proxy (recommended) β enable
useApifyProxyin the Input Proxy object in Console. - Custom proxies β supply credentials in secret form:
<PROXY_USER:PASS@HOST:PORT>.
Environment examples
# example environment variables (place these in your secret manager, not in plain input)HTTP_PROXY="http://<PROXY_USER:PASS@HOST:PORT>"HTTPS_PROXY="http://<PROXY_USER:PASS@HOST:PORT>"
Security note: Store proxy credentials as secrets, not plaintext. Do not hard-code credentials into Input.
TODO: Consider proxy rotation for large-scale scraping to minimize IP throttling.
π References
- Apify Actor best practices β official Console documentation. (Reference link placeholder)
- Apify Input / Output schema guide β reference doc (placeholder)
- Apify CLI & API quickstart β reference doc (placeholder)
π€ What I inferred from main.py
- This Actor accepts a list of Facebook video/post URLs and extracts metadata and direct media URLs.
- Results are written to Dataset and a key-value store for easy download.
- Multiple duration formats are provided: human-readable, compact summary, decimals (minutes/hours) and raw seconds.
- Optional cookies and proxy support are inferred to handle private or geo-restricted content.
Run this Actor on Apify Console β get instant, structured video metadata in seconds.