Facebook Scraper
Pricing
from $5.00 / 1,000 posts
Pricing
from $5.00 / 1,000 posts
Rating
0.0
(0)
Developer
Morph Coder
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
2
Monthly active users
7 days ago
Last modified
Categories
Share
Facebook Post Scraper
What is Facebook Post Scraper?
Facebook Post Scraper is a lightweight Apify Actor that extracts public Facebook posts from direct post URLs. Paste one or more links to individual posts (or post IDs), run the Actor, and get structured JSON with text, engagement metrics, and media metadata—without using the official Facebook API.
It is built for known post links: monitoring specific announcements, archiving posts you already found, or feeding URLs from search/other tools into a pipeline. It uses fast HTTP scraping (Cheerio), not a full browser, so runs are cheap and quick when Facebook serves public HTML.
Best for: post URLs you already have · public pages and profiles · batch export to JSON/CSV via Apify
Not for: crawling an entire page feed by profile URL only · hashtag search · logged-in-only insights
Why use this Actor?
- Direct post URLs — one row per
startUrlsentry; no Graph API app review - Full post text when Facebook embeds
message.textin the page (not truncatedog:description) - Engagement — reactions, comments, shares;
viewswhen present in public HTML (oftennullwithout login) - Media — image/video URLs, thumbnails, optional ocrText (Facebook accessibility captions, not a separate vision model)
- Optional video transcript — from embedded captions when
videoTranscript: true - Optional Apify Proxy — residential proxy if datacenter IPs are blocked
- Export anywhere — dataset on Apify, or JSON/CSV/Excel and API clients (Python/Node)
What data can you extract?
| Field | Description |
|---|---|
text | Post body (full text from embedded JSON when available) |
url | Canonical post URL when found in HTML |
postId | Numeric or pfbid id |
reactions / likes | Reaction count (likes mirrors reactions) |
comments | Comment count |
shares | Share count |
views | View/play count if embedded (often null on public pages) |
publishedAt | ISO timestamp when available |
authorName | From Open Graph / page metadata when available |
ocrText | Image accessibility text (e.g. “May be an image of…”) |
videoTranscript | Auto captions from HTML when enabled and present |
media[] | url, thumbnail, ocrText, mediaType (photo / video) |
sourceUrl | Your input URL |
scrapedAt | Extraction time |
Errors are returned as { "type": "error", "code", "message" } (e.g. ACCESS_DENIED, NOT_FOUND).
How do I use Facebook Post Scraper?
- Create a free Apify account.
- Open this Actor in Apify Console.
- Add post URLs under Start URLs (or
postUrls/postIds). - Set Results limit (max URLs per run, default 20).
- Optionally enable Image captions / OCR or Video transcript, and proxy if you see login walls.
- Click Start, then download the dataset (JSON, CSV, Excel, etc.).
Input
Primary input is a list of public post URLs, for example:
{"startUrls": [{"url": "https://www.facebook.com/61559402542547/posts/breaking-scottie-thompson-has-been-traded-to-magnoliais-reportedly-being-traded-/122212876880313418/"}],"resultsLimit": 20,"captionText": true,"videoTranscript": false,"useProxy": false}
| Field | Description |
|---|---|
startUrls | Post links (requestListSources editor) |
postUrls | Alias for startUrls |
postIds | Post URL, numeric id, or pfbid token |
resultsLimit | Max posts to process per run (1–500) |
captionText | Include ocrText on images (default true) |
videoTranscript | Include embedded video transcript (default false) |
useProxy / proxy | Apify Proxy; useApifyProxy in proxy editor also enables proxy |
See the Input tab in Console for the full JSON schema.
Output
Results are stored in the run Dataset. Example post record:
{"url": "https://www.facebook.com/permalink.php?story_fbid=…","text": "🚨BREAKING: …\n\nMagnolia will get:\nScottie Thompson","reactions": 56,"comments": 12,"shares": 19,"views": null,"likes": 56,"ocrText": "May be an image of basketball, basketball jersey and text that says '…'","videoTranscript": null,"media": [{"url": "https://scontent.xx.fbcdn.net/…","thumbnail": "https://scontent.xx.fbcdn.net/…","ocrText": "May be an image of basketball…","mediaType": "photo"}],"postId": "122212876880313418","authorName": null,"publishedAt": "2024-01-15T12:00:00.000Z","sourceUrl": "https://www.facebook.com/…/posts/…","scrapedAt": "2026-06-01T15:14:00.529Z"}
Proxy and access
Facebook may return a login wall for cloud IPs. If you see ACCESS_DENIED:
- Set Use Apify proxy to
true, or enable use Apify Proxy in the proxy editor. - Prefer RESIDENTIAL proxy groups for difficult posts.
- Confirm the post is public and the URL opens in a private browser without logging in.
This Actor does not accept Facebook cookies or passwords (public content only).
API and integrations
Run the Actor via Apify API, apify-client (Node.js / Python), webhooks, or integrations (Make, Zapier, Google Sheets, etc.). Use the API tab in Console for a ready-made code snippet.
Pricing
This Actor uses pay-per-event billing:
| Event | When charged |
|---|---|
apify-actor-start | Each run (synthetic; configured in Console) |
post | Each successful post written to the dataset |
Error rows (type: "error") are not charged. Set the post price in Publication → Monetization and mark it as the primary event.
Local test with PPE: ACTOR_TEST_PAY_PER_EVENT=1 apify run.
FAQ
Can I scrape all posts from a page by pasting only https://www.facebook.com/pagename/?
No. This Actor expects post URLs (or post IDs). To collect many posts from a page, you need those links from another source or a feed-oriented Actor.
How is this different from large “Facebook Posts Scraper” products on the store?
Those often crawl page feeds, filters, and rich page metadata in a browser. This Actor is a focused, URL-in → post-out tool: fast, transparent, and ideal when you already have post links.
Is ocrText from ChatGPT / vision AI?
No. It is read from Facebook’s own accessibility / OCR fields in the page JSON when available.
Why is views null?
Facebook usually does not expose view counts on anonymous HTML; they may appear for some videos or with a logged-in session.
Is scraping legal?
Only scrape public data you are allowed to use. You are responsible for compliance with Meta’s Terms and applicable law. Do not scrape private or personal data without a lawful basis.
Develop locally
cd actors/facebook-scrapernpm installnpm run buildnpm run test:unitapify run
Example input: scripts/test-input.example.json
Deploy
cd actors/facebook-scraperapify loginapify push
CI path: actors/facebook-scraper (use forward slashes on Linux).