Facebook Reels Play Count Scraper
Pricing
from $0.00005 / actor start
Facebook Reels Play Count Scraper
Scrapes exact play counts for Facebook video / reel / watch URLs. Uses Apify datacenter proxies for IP rotation.
Pricing
from $0.00005 / actor start
Rating
5.0
(1)
Developer
Celine
Maintained by CommunityActor stats
2
Bookmarked
353
Total users
144
Monthly active users
a month ago
Last modified
Categories
Share
Facebook Video Play Count Scraper β Apify Actor
An Apify Actor that extracts the exact play_count
for Facebook video / reel / watch URLs, using Apify datacenter proxies for IP rotation.
It is a port of the original local CLI scraper (facebook_playcount_scraper.py) to the
Apify platform, so the detection logic (video-id extraction + HTML parsing) is unchanged.
β Need more than play counts? Meet the full social scraping toolkit
This actor is laser-focused on exact Facebook play counts. If you need richer engagement data or want to cover Instagram too, these sibling Actors from the same author plug into the exact same workflow β paste links in, get clean JSON out, no login required, MCP-ready for AI agents. π
π Facebook Posts & Reels Scraperβ‘οΈ Open on Apify Go beyond play counts. Paste any public Facebook post / reel / photo / video / share URL and get the full engagement picture:
|
β‘ Instagram Post & Reel Scraperβ‘οΈ Open on Apify Take the same paste-a-link workflow to Instagram. Fast, cheap, and built for scale:
|
One author, one workflow, every platform:
| Actor | Best for | Open |
|---|---|---|
| βΆοΈ Facebook Video Play Count Scraper (this actor) | Exact Facebook play counts at scale | You're here |
| π Facebook Posts & Reels Scraper | Reactions, comments, shares, plays + caption/author | Open β |
| β‘ Instagram Post & Reel Scraper | Fast, cheap Instagram link metrics | Open β |
| π¬ YouTube Video & Shorts Scraper | Fast YouTube views, likes, comments from URL | Open β |
What it does
- Takes a list of Facebook URLs (via
startUrlsor a pastedurlsTextblock). - Extracts the numeric video id from each URL (
?v=,/videos/β¦,/reel/β¦,/watch/β¦). - Reel URLs are auto-converted before scraping:
/reel/{id}βhttps://www.facebook.com/watch/?v={id}. Watch URLs are used as-is. - Fetches the page HTML (optionally through Apify proxy), rotating the IP on every retry.
- Parses the exact
play_countfor the target video id from the embedded JSON payloads. - Pushes one record per URL to the actor's default dataset.
Output record shape
{"url": "https://www.facebook.com/watch/?v=1234567890","video_id": "1234567890","play_count": 482311,"status": "ok"}
status is one of:
okβ play count found.invalid_video_idβ URL did not contain a recognisable video id.play_count_not_foundβ page fetched, but no matching play count in HTML.request_failed: β¦β all retries failed. The suffix indicates the last error (e.g.http_429,timeout,request_failed: ConnectError).
Input
| Field | Type | Default | Description |
|---|---|---|---|
startUrls | array of {url} | β | Facebook URLs to scrape. |
urlsText | string | β | Alternative to startUrls, one URL per line. |
maxConcurrency | int | 12 | Parallel fetches. |
requestTimeoutSecs | int | 20 | Per-request HTTP timeout. |
maxRetriesPerUrl | int | 3 | Retries per URL, each with a fresh proxy IP. |
useProxy | bool | true | Toggle proxy usage. Set false to run with no proxy (direct actor IP). |
proxyConfiguration | object | { useApifyProxy: true, apifyProxyGroups: [] } | Apify proxy config (ignored when useProxy is false). |
Example input lives at ./.actor/input.example.json.
IP rotation
The actor calls Actor.create_proxy_configuration(actor_proxy_input=β¦) and then
requests a new proxy URL per attempt with a unique session_id, so every retry
is guaranteed to go through a different upstream Apify datacenter IP:
proxy_url = await proxy_configuration.new_url(session_id=f"fb_{abs(hash(url))}_{attempt}")
That session id is also what Apify uses to pin a given IP β by bumping the attempt counter, we explicitly break stickiness after a failure, which is the usual pattern for recovering from rate-limits/soft-blocks on datacenter proxies.
If you want residential proxies instead, edit the input and pass:
"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"]}
Local development
Requires Python 3.11 and the Apify CLI.
# from the project rootpython -m venv .venvsource .venv/bin/activatepip install -r requirements.txt# install Apify CLI (one-time, via npm)npm install -g apify-cli# run the actor locally using the example inputapify run --purge --input-file=.actor/input.example.json
Results land in storage/datasets/default/.
Deploy to the Apify platform
apify login # paste your Apify API tokenapify push # builds the Docker image and pushes the actor
apify push uses .actor/actor.json + .actor/Dockerfile to build the actor on
Apify, and .actor/input_schema.json to render the input form in the Apify Console.
After the push you can either:
-
Run it from the Apify Console UI.
-
Trigger it from the API:
curl -X POST "https://api.apify.com/v2/acts/<USERNAME>~facebook-playcount-scraper/runs?token=$APIFY_TOKEN" \-H "Content-Type: application/json" \-d @.actor/input.example.json
Project layout
.βββ .actor/β βββ actor.json # actor metadata + dataset viewβ βββ Dockerfile # build config (apify/actor-python:3.11)β βββ input_schema.json # UI / API input schemaβ βββ input.example.json # sample input for `apify run`βββ src/β βββ __main__.py # `python -m src` entrypointβ βββ main.py # Apify actor logic + proxy rotationβ βββ parser.py # video-id + play_count extractionβββ facebook_playcount_scraper.py # original standalone CLI (kept for reference)βββ requirements.txtβββ .dockerignoreβββ .gitignoreβββ README.md
Push to GitHub
git initgit add .git commit -m "Apify actor: facebook play count scraper with DATACENTER proxy rotation"git branch -M maingit remote add origin https://github.com/celine/facebook-playcount-scraper.gitgit push -u origin main
π Explore the rest of the toolkit
Scraping social media? Don't stop at play counts:
- π Facebook Posts & Reels Scraper β reactions, comments, shares & plays from any Facebook link.
- β‘ Instagram Post & Reel Scraper β fast, cheap Instagram views, likes & comments from a URL.
- π¬ YouTube Video & Shorts Scraper β YouTube views, likes, comments, channel & more from a URL.
All share the same no-login, paste-a-link, MCP-ready design. π