Internal Facebook video scraper service — multi-provider, no API key required.
Live: https://fb.xcasper.space
Share: Facebook · Twitter/X · WhatsApp
Part of: CASPER TECH API Hub — 260+ free API endpoints
fb-scraper is a lightweight internal Node.js HTTP service that powers the Facebook video downloader endpoints on the CASPER TECH API Hub (apis.xcasper.space). It runs on the VPS at 127.0.0.1:5757 and is not publicly exposed — all traffic comes from the Next.js API layer.
It provides three scraping strategies, each targeting a different upstream provider:
- fdown.net (Puppeteer) — navigates fdown.net via a headless Chromium browser, submits the Facebook URL, and extracts
fbcdn.netdirect download links. HD/SD detected via URL pattern (/m366/= HD,/m412/= SD). - savefrom.net (Puppeteer) — drives en1.savefrom.net with a stealth browser session, extracts quality-labelled download links and thumbnail.
- snapsave.app (vm-decode, no browser) — posts to
snapsave.app/action.phpvia plain HTTP, receives obfuscated JavaScript, executes it inside a Node.jsvmsandbox with a mockeddocument.getElementByIdsetter, and parses the decoded HTML ford.rapidcdn.appJWT-proxied download links. No Puppeteer required — ~250ms response time.
Built and maintained by TRABY CASPER under the CASPER TECH umbrella.
| Name | TRABY CASPER |
| Organisation | CASPER TECH |
| Country | Kenya |
| Website | xcasper.space |
| GitHub | @Casper-Tech-ke |
| Role | Founder & Lead Developer |
CASPER TECH is a Kenyan tech initiative building free, accessible developer tools and APIs for African and global developers. fb-scraper is a core internal service of the CASPER TECH API Hub — apis.xcasper.space.
All endpoints accept the Facebook URL via ?url= query parameter.
| Method | Path | Provider | Strategy |
|---|---|---|---|
| GET | /health |
— | Health check and uptime |
| GET | /scrape?url=FB_URL |
fdown.net | Puppeteer (Chromium headless) |
| GET | /scrape-sf?url=FB_URL |
savefrom.net | Puppeteer (Chromium headless) |
| GET | /scrape-snap?url=FB_URL |
snapsave.app | Pure HTTP + vm sandbox |
- Node.js 18 or higher
- Chromium installed (for Puppeteer endpoints)
- PM2 (recommended for production)
# Clone the repo
git clone https://github.com/Casper-Tech-ke/fb-scraper.git
cd fb-scraper
# Install puppeteer-core (and node-fetch if not on Node 18+)
npm install puppeteer-core node-fetch
# Set your Chromium path in server.js (default: /usr/bin/chromium)
# CHROMIUM = '/usr/bin/chromium'
# Run directly
node server.js
# Or run with PM2
pm2 start server.js --name fb-scraper
pm2 saveThe service listens on 127.0.0.1:5757 by default. To change the port, update PORT at the top of server.js.
apt-get install -y chromium-browser
# or
apt-get install -y chromium- Go to render.com → New Web Service
- Connect GitHub → select
Casper-Tech-ke/fb-scraper - Configure:
| Setting | Value |
|---|---|
| Environment | Node |
| Build Command | npm install puppeteer-core node-fetch |
| Start Command | node server.js |
| Port | 5757 |
Puppeteer note: Render free tier does not ship Chromium by default. Add the Puppeteer buildpack in Settings → Buildpacks. Without it, only
/scrape-snap(no browser) will work.
# Environment variable (Render dashboard)
CHROMIUM_PATH=/usr/bin/google-chrome-stable- Go to koyeb.com → Create App
- Select GitHub →
Casper-Tech-ke/fb-scraper - Configure:
| Setting | Value |
|---|---|
| Run Command | node server.js |
| Port | 5757 |
| Plan | Nano (free) — snap endpoint only / Micro for full Puppeteer |
Docker deploy (recommended for Puppeteer): Use a
Dockerfilethat installs Chromium. Example:
FROM node:20-slim
RUN apt-get update && apt-get install -y chromium --no-install-recommends
WORKDIR /app
COPY . .
RUN npm install puppeteer-core node-fetch
ENV CHROMIUM_PATH=/usr/bin/chromium
EXPOSE 5757
CMD ["node", "server.js"]- Go to replit.com → Create Repl
- Select Import from GitHub → paste
https://github.com/Casper-Tech-ke/fb-scraper - In the Shell tab:
npm install puppeteer-core node-fetch- Create or update
.replit:
run = "node server.js"
⚠️ Important: Chromium/Puppeteer is NOT available on Replit free tier. Only/scrape-snap(snapsave.app vm-decode — no browser) will work. To use/scrapeand/scrape-sf, upgrade to Replit Core.
# Health check
curl "http://127.0.0.1:5757/health"
# fdown.net scraper (HD + SD fbcdn.net links)
curl "http://127.0.0.1:5757/scrape?url=https://www.facebook.com/reel/1234567890"
# savefrom.net scraper
curl "http://127.0.0.1:5757/scrape-sf?url=https://www.facebook.com/reel/1234567890"
# snapsave.app — fast, no browser needed
curl "http://127.0.0.1:5757/scrape-snap?url=https://www.facebook.com/reel/1234567890"{
"success": true,
"title": "Facebook Video",
"thumbnail": "https://scontent.fbcdn.net/...",
"links": [
{ "url": "https://video-xxx.fbcdn.net/...m366...", "label": "HD Download" },
{ "url": "https://video-xxx.fbcdn.net/...m412...", "label": "SD Download" }
]
}{
"success": true,
"title": "Facebook Video",
"thumbnail": "https://d.rapidcdn.app/thumb?token=...",
"links": [
{
"label": "720p (HD)",
"url": "https://d.rapidcdn.app/v2?token=...",
"isHD": true,
"isSD": false
}
]
}{
"error": "Description of what went wrong"
}For /scrape (fdown.net), HD/SD quality is detected from the fbcdn.net URL pattern:
| URL Pattern | Quality |
|---|---|
/m366/ |
HD |
/m412/ |
SD |
/m420/ |
HD |
hd in URL |
HD |
sd in URL |
SD |
snapsave.app returns obfuscated JavaScript instead of plain HTML. The decoding flow:
POST https://snapsave.app/action.php?lang=enwithmultipart/form-databodyurl=<FB_URL>- Response is ~23KB of obfuscated JS (eval-based)
- A Node.js
vm.Scriptis created with a mocked browser environment:window.location.hostname = 'snapsave.app'document.getElementById()returns an object with aninnerHTMLsetter that captures the decoded HTMLdocument.querySelector()andremove()stubs to prevent errors
- The captured HTML is parsed with regex for
href="https://d.rapidcdn.app/v2?token=..."download links and thumbnail URLs - Links are JWT-proxied
fbcdn.netURLs with ~60 minute expiry
https://www.facebook.com/videos/1234567890
https://www.facebook.com/reel/1234567890
https://web.facebook.com/reel/1234567890
https://m.facebook.com/watch/?v=1234567890
https://fb.watch/xxxxxxxx
https://www.facebook.com/share/v/xxxxxxxx
https://www.facebook.com/share/r/xxxxxxxx
| Dependency | Purpose |
|---|---|
puppeteer-core |
Headless Chromium automation for fdown.net and savefrom.net |
node-fetch |
HTTP requests for snapsave.app |
Built-in vm |
Sandboxed JS execution for snapsave obfuscation decode |
Built-in http |
HTTP server |
Chromium path: /usr/bin/chromium
Puppeteer path: /tmp/iss-capture/node_modules/puppeteer-core
fb-scraper/
├── server.js - Main HTTP server (all scraping logic + static file serving)
├── server.js.bak - Backup of base server before snap function was added
├── public/
│ ├── index.html - Interactive documentation frontend
│ ├── terms.html - Terms of Service
│ ├── privacy.html - Privacy Policy
│ ├── disclaimer.html - Disclaimer page
│ ├── favicon.svg - SVG favicon
│ └── og.png - Social preview image (1200×630)
├── CONTRIBUTING.md
├── DISCLAIMER.md
├── LICENSE
└── README.md
This service powers the following public endpoints on apis.xcasper.space:
| Public Endpoint | Uses | Strategy |
|---|---|---|
POST /api/downloader/fb |
/scrape |
fdown.net Puppeteer, fallback: xaviabot |
POST /api/downloader/fb2 |
/scrape-sf + /scrape |
savefrom.net → fdown.net → xaviabot |
POST /api/downloader/fb3 |
/scrape |
fget.io direct API → fdown.net → xaviabot |
POST /api/downloader/fb4 |
/scrape-snap |
snapsave.app vm-decode |
Contributions are welcome! Please read CONTRIBUTING.md before submitting a pull request.
- Disclaimer — not affiliated with Facebook/Meta
- Terms of Service — usage rules and restrictions
- Privacy Policy — no personal data stored
- DISCLAIMER.md — GitHub markdown version
MIT © 2026 TRABY CASPER · CASPER TECH
