Facebook Video Scraper with Duration Analysis
by neuro-scraper
Automatically scrape Facebook video duration & uploader details. A privacy-safe, fast tool for developers to analyze video trends and content patterns.
Opens on Apify.com
About Facebook Video Scraper with Duration Analysis
Ever needed to pull data from Facebook videos but got stuck manually checking durations or hunting for uploader info? I've been there. This Facebook Video Scraper was built to solve exactly that. It automates the tedious work, letting you extract video duration and uploader details in a structured format. It’s fast, respects privacy by not requiring a login for public content, and spits out clean JSON or CSV you can use immediately. I use it for a few key things: analyzing content patterns (like what video length performs best in a niche), tracking competitor upload schedules, or gathering metadata for research projects. It saves hours of manual clicking. You just point it at a profile, page, group, or hashtag, and it fetches the public video data. It’s developer-friendly, so you can easily pipe the results into your own scripts for further analysis or visualization. If you're looking to understand Facebook video trends without the grunt work, this is the script that makes it straightforward.
What does this actor do?
Facebook Video Scraper with Duration Analysis is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.
Key Features
- Cloud-based execution - no local setup required
- Scalable infrastructure for large-scale operations
- API access for integration with your applications
- Built-in proxy rotation and anti-blocking measures
- Scheduled runs and webhooks for automation
How to Use
- Click "Try This Actor" to open it on Apify
- Create a free Apify account if you don't have one
- Configure the input parameters as needed
- Run the actor and download your results
Documentation
Facebook Video Scraper with Duration Analysis
Extract structured metadata and direct video URLs from public Facebook videos. This Apify Actor outputs clean JSON data, including multiple formatted duration fields, without requiring code changes.
Overview
The actor processes Facebook video links (watch or post URLs) and returns detailed metadata. It's designed for production use, handling tasks like content monitoring, data pipeline ingestion, and bulk exports for analytics.
Key Features
- Structured Metadata: Extracts titles, descriptions, view/like/comment counts, upload dates, thumbnails, and direct video URLs.
- Comprehensive Duration Analysis: Provides duration in seconds, a formatted string (e.g., "1m 37s"), a display string, a detailed breakdown object, and decimal hours/minutes.
- Flexible Input: Accepts one or multiple video URLs.
- Configurable: Optional limits, proxy support, and cookie-based authentication for restricted content.
- Multiple Run Methods: Use via Apify Console, CLI, or API.
How to Use
Apify Console (Quickest)
- Open the Actor in Apify Console.
- Paste your input JSON (see Input Schema below) into the Input tab.
- Click Run. Results are available in the Dataset upon completion.
CLI & API
Using the Apify CLI:
apify run --input input.example.json
Using the Apify Client for Python:
from apify_client import ApifyClient
client = 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)
Input Schema
Provide input as a JSON object. The only required field is facebookVideoUrls.
| Field | Type | Required | Description |
|---|---|---|---|
facebookVideoUrls |
Array[string] | Yes | One or more Facebook video URLs (watch or post links). |
maxVideos |
integer | No | Limit the number of videos to process. |
cookiesFile |
string | No | Key-value store name of a cookies file for scraping logged-in content. |
proxyConfig |
object | No | Proxy configuration (Apify Proxy or custom). |
Minimal Input Example:
{
"facebookVideoUrls": ["https://www.facebook.com/watch?v=1234567890"]
}
Output
The actor saves results to the default Dataset. Each item is a JSON object containing:
- Core Metadata:
id,title,description,upload_date,view_count,like_count,comment_count. - Media URLs:
videoUrl(direct link),thumbnail. - Timestamps:
timestamp(Unix),timestamp_iso(ISO 8601). - Duration Fields: Multiple formats including
duration_seconds,duration(e.g., "1m 37s"),duration_display, a detailedduration_fullobject, and decimal values. - Raw Data: The
raw_jsonfield contains the full extracted data.
Example Output Snippet:
{
"id": "1234567890",
"title": "Funny Cat Compilation",
"duration_seconds": 97.0,
"duration": "1m 37s",
"duration_display": "1 Minute 37 Seconds (0.0270 Hours)",
"videoUrl": "https://video.xx.fbcdn.net/v/t42.9040-2/...",
"view_count": "154.3K"
}
Configuration & Secrets
APIFY_TOKEN: Required for API/CLI access. Manage in Apify Console.- Proxy Credentials: Store custom proxy details (
PROXY_USER:PASS@HOST:PORT) as a Secret in the Console. Never paste credentials directly into the input. FB_COOKIES: For private videos, upload a cookies file to the key-value store and reference its name via this environment variable or thecookiesFileinput.
Categories
Common Use Cases
Market Research
Gather competitive intelligence and market data
Lead Generation
Extract contact information for sales outreach
Price Monitoring
Track competitor pricing and product changes
Content Aggregation
Collect and organize content from multiple sources
Ready to Get Started?
Try Facebook Video Scraper with Duration Analysis now on Apify. Free tier available with no credit card required.
Start Free TrialActor Information
- Developer
- neuro-scraper
- Pricing
- Paid
- Total Runs
- 53
- Active Users
- 11
Related Actors
🏯 Tweet Scraper V2 - X / Twitter Scraper
by apidojo
Instagram Scraper
by apify
TikTok Scraper
by clockworks
Instagram Profile Scraper
by apify
Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.
Learn more about ApifyNeed Professional Help?
Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.
Trusted by millions | Money-back guarantee | 24/7 Support