Facebook Reels Play Count Scraper avatar

Facebook Reels Play Count Scraper

Pricing

from $0.00005 / actor start

Go to Apify Store
Facebook Reels Play Count Scraper

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

Rishab

Rishab

Maintained by Community

Actor stats

2

Bookmarked

102

Total users

51

Monthly active users

2 days 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:

  • ❤️ reactions, 💬 comments, 🔁 shares, ▶️ video views
  • 📝 caption, 👤 author, 🕒 timestamp, 🖼️ thumbnail
  • 🔗 handles /reel/, /share/p|r|v/, /watch/, /photo, fb.watch
  • 🛡️ resilient Playwright workers + cookie support

Upgrade path: use this play-count actor for pure view numbers at scale, and the Posts & Reels Scraper when you also need reactions, comments & shares.

⚡ Instagram Post & Reel Scraper

➡️ Open on Apify

Take the same paste-a-link workflow to Instagram. Fast, cheap, and built for scale:

  • 👀 videoPlayCount (views/plays), likes, comments
  • 📝 caption, hashtags, mentions, music, owner
  • 💰 lightweight HTTP — cheapest way to get IG link metrics
  • 🤖 MCP-ready for Cursor / Claude / GPT agents

Cross-platform: already tracking Facebook video views here? Add Instagram metrics with one more Actor and cover both platforms from one toolkit.

One author, one workflow, every platform:

ActorBest forOpen
▶️ Facebook Video Play Count Scraper (this actor)Exact Facebook play counts at scaleYou're here
📘 Facebook Posts & Reels ScraperReactions, comments, shares, plays + caption/authorOpen →
Instagram Post & Reel ScraperFast, cheap Instagram link metricsOpen →
🎬 YouTube Video & Shorts ScraperFast YouTube views, likes, comments from URLOpen →

What it does

  1. Takes a list of Facebook URLs (via startUrls or a pasted urlsText block).
  2. Extracts the numeric video id from each URL (?v=, /videos/…, /reel/…, /watch/…).
  3. Reel URLs are auto-converted before scraping: /reel/{id}https://www.facebook.com/watch/?v={id}. Watch URLs are used as-is.
  4. Fetches the page HTML (optionally through Apify proxy), rotating the IP on every retry.
  5. Parses the exact play_count for the target video id from the embedded JSON payloads.
  6. 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

FieldTypeDefaultDescription
startUrlsarray of {url}Facebook URLs to scrape.
urlsTextstringAlternative to startUrls, one URL per line.
maxConcurrencyint12Parallel fetches.
requestTimeoutSecsint20Per-request HTTP timeout.
maxRetriesPerUrlint3Retries per URL, each with a fresh proxy IP.
useProxybooltrueToggle proxy usage. Set false to run with no proxy (direct actor IP).
proxyConfigurationobject{ 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 root
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# install Apify CLI (one-time, via npm)
npm install -g apify-cli
# run the actor locally using the example input
apify 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 token
apify 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 init
git add .
git commit -m "Apify actor: facebook play count scraper with DATACENTER proxy rotation"
git branch -M main
git remote add origin https://github.com/shanskarBansal/facebook-playcount-scraper.git
git push -u origin main

🚀 Explore the rest of the toolkit

Scraping social media? Don't stop at play counts:

All share the same no-login, paste-a-link, MCP-ready design. 💚