Facebook Posts Scraper avatar

Facebook Posts Scraper

Pricing

$19.99/month + usage

Go to Apify Store
Facebook Posts Scraper

Facebook Posts Scraper

Scrape Facebook posts from public pages and profiles with ease πŸ“˜πŸ“’ Extract post text, dates, reactions, comments, shares, media, and more. Perfect for competitor research, content analysis, audience insights, and trend tracking. Turn Facebook data into actionable insights fast πŸš€

Pricing

$19.99/month + usage

Rating

0.0

(0)

Developer

ScrapeEngine

ScrapeEngine

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

A powerful Apify actor that extracts public Facebook posts from pages, groups, and profiles with advanced filtering, engagement metrics, and optional video transcript extraction.

🎯 Overview

This actor scrapes Facebook posts from public pages, groups, and profiles, extracting comprehensive data including post content, engagement metrics, media attachments, user information, and optional video transcripts. It features intelligent proxy fallback, timeframe filtering, and robust error handling for reliable data collection at scale.

✨ Key Features

  • πŸ“„ Multi-source scraping - Extract posts from Facebook pages, groups, and public profiles
  • πŸ“… Timeframe filtering - Filter posts by absolute dates or relative time (days, weeks, months, years)
  • πŸ“Š Engagement metrics - Automatically extracts likes, comments, shares, and reaction counts
  • 🎬 Video transcript extraction - Optional extraction of video transcripts for video/reel posts
  • πŸ”„ Smart proxy fallback - Automatically falls back from no proxy β†’ datacenter β†’ residential proxy
  • ⚑ Efficient pagination - Handles large page histories with automatic pagination
  • πŸ›‘οΈ Error handling - Robust retry logic and rate limit handling
  • πŸ“¦ Structured output - Clean JSON format ready for analysis

πŸ“₯ Input Parameters

Required Parameters

ParameterTypeDescription
startUrlsArrayList of Facebook page URLs, usernames, or keywords. Supports multiple formats: full URLs (https://www.facebook.com/pagename), usernames (pagename), or group identifiers.

Optional Parameters

ParameterTypeDefaultDescription
maxPostsInteger10Maximum number of posts to scrape per page (1-10000)
includeVideoTranscriptBooleanfalseExtract video transcript for video/reel posts (if available)
dateFilterTypeString"relative"Time filter type: "absolute" or "relative"
absoluteStartDateString""Start date in YYYY-MM-DD format (when dateFilterType is "absolute")
absoluteEndDateString""End date in YYYY-MM-DD format (when dateFilterType is "absolute"). Leave empty for current date.
relativeValueInteger0Number of time units (when dateFilterType is "relative")
relativeUnitString"days"Time unit: "days", "weeks", "months", or "years"
includeEngagementBooleantrueInclude engagement metrics (likes, comments, shares)
includeVideoMetadataBooleantrueInclude detailed video metadata
proxyConfigurationObject{"useApifyProxy": false}Proxy settings. Default: no proxy. Automatically falls back to datacenter, then residential proxy if needed.

Input Example

{
"startUrls": [
"iamsrk",
"Cristiano",
"https://www.facebook.com/pagename/"
],
"maxPosts": 100,
"includeVideoTranscript": true,
"dateFilterType": "relative",
"relativeValue": 30,
"relativeUnit": "days",
"proxyConfiguration": {
"useApifyProxy": false
}
}

πŸ“€ Output Format

Each post in the dataset contains the following fields:

FieldTypeDescription
facebookUrlStringURL of the Facebook page/profile
postIdStringUnique post identifier
pageNameStringName/username of the page
urlStringDirect URL to the post
timeStringPost timestamp in ISO format (YYYY-MM-DDTHH:MM:SS.000Z)
timestampNumberUnix timestamp
userObjectUser/page information (id, name, profileUrl, profilePic)
textStringPost text content
textReferencesArrayMentions, tags, and references in the post
likesNumberNumber of likes/reactions
commentsNumberNumber of comments
sharesNumberNumber of shares
topReactionsCountNumberCount of top reactions
mediaArrayMedia attachments (images, videos) with metadata
feedbackIdStringFacebook feedback identifier
topLevelUrlStringCanonical post URL
facebookIdStringFacebook page/user ID
pageAdLibraryObjectAd library information
inputUrlStringOriginal input URL used
captionTextStringVideo transcript (only if includeVideoTranscript is true and transcript is available)

Output Example

{
"facebookUrl": "https://www.facebook.com/iamsrk/",
"postId": "1397878851694949",
"pageName": "iamsrk",
"url": "https://www.facebook.com/reel/1849391758997898/",
"time": "2025-11-15T10:41:16.000Z",
"timestamp": 1763203276,
"user": {
"id": "100044185428261",
"name": "Shah Rukh Khan",
"profileUrl": "https://www.facebook.com/100044185428261",
"profilePic": "https://scontent.fdac142-1.fna.fbcdn.net/v/t39.30808-1/366996841_856684082481098_8756972728894965534_n.jpg?..."
},
"text": "It is humbling and deeply touching to have a landmark in Dubai carry my name...",
"textReferences": [
{
"id": "100068746803211",
"url": "https://www.facebook.com/100068746803211",
"profile_url": "https://www.facebook.com/100068746803211",
"short_name": "Danube Properties",
"work_info": null,
"work_foreign_entity_info": null,
"mobileUrl": "https://m.facebook.com/100068746803211/"
}
],
"likes": 40224,
"comments": 2279,
"shares": 1484,
"topReactionsCount": 7,
"media": [
{
"mediaset_token": "pcb.1397878851694949",
"url": "https://www.facebook.com/reel/1849391758997898/",
"comet_product_tag_feed_overlay_renderer": null
}
],
"feedbackId": "ZmVlZGJhY2s6MTM5Nzg3ODg1MTY5NDk0OQ==",
"topLevelUrl": "https://www.facebook.com/100044185428261/posts/1397878851694949",
"facebookId": "100044185428261",
"pageAdLibrary": {
"is_business_page_active": false,
"id": "100044185428261"
},
"inputUrl": "https://www.facebook.com/iamsrk/",
"captionText": "Video transcript text here..."
}

πŸ› οΈ How to Use

Step 1: Configure Input

  1. Start URLs: Enter Facebook page URLs, usernames, or group identifiers

    • Full URL: https://www.facebook.com/pagename
    • Username: pagename
    • Group: groupname or https://www.facebook.com/groups/groupname
  2. Post Limit: Set maxPosts to control how many posts to scrape per page (1-10000)

  3. Timeframe Filter (Optional):

    • Relative: Set dateFilterType to "relative", then specify relativeValue (e.g., 30) and relativeUnit (e.g., "days")
    • Absolute: Set dateFilterType to "absolute", then specify absoluteStartDate and absoluteEndDate in YYYY-MM-DD format
  4. Video Transcripts (Optional): Set includeVideoTranscript to true to extract transcripts from video/reel posts

  5. Proxy Configuration (Optional): Configure proxy settings. By default, uses no proxy and automatically falls back if needed.

Step 2: Run the Actor

Click "Start" to begin scraping. The actor will:

  1. Normalize input URLs
  2. Initialize proxy configuration (with automatic fallback)
  3. Scrape posts from each target sequentially
  4. Apply timeframe filters
  5. Extract video transcripts (if enabled)
  6. Save results to the dataset

Step 3: Download Results

Results are automatically saved to the dataset. You can:

  • View results in the Apify platform
  • Download as JSON, CSV, or Excel
  • Access via API

🎯 Use Cases

  • πŸ“ˆ Marketing & Social Media Analysis - Track competitor content, analyze engagement trends, identify top-performing posts
  • πŸ“° Journalism & Research - Monitor public conversations, analyze group discussions, gather community insights
  • πŸ“Š Brand Monitoring - Track brand mentions across Facebook pages and groups
  • 🧠 AI/ML Dataset Creation - Build datasets for sentiment analysis, NLP, or content analysis
  • πŸ›’ E-commerce Trend Tracking - Identify viral products and trending topics in Facebook groups
  • πŸ“± Content Strategy - Analyze successful post formats, timing, and engagement patterns

βš™οΈ Technical Details

Proxy Fallback Strategy

The actor implements intelligent proxy fallback:

  1. No Proxy (default) - Direct connection to Facebook
  2. Datacenter Proxy - Falls back if direct connection is blocked
  3. Residential Proxy - Final fallback if datacenter proxy fails

This ensures maximum reliability while respecting user preferences.

Timeframe Filtering

  • Relative Time: Filter posts from the last N days/weeks/months/years
  • Absolute Dates: Filter posts between specific start and end dates
  • Filters are applied both at the GraphQL API level and client-side for accuracy

Video Transcript Extraction

When includeVideoTranscript is enabled:

  • Automatically detects video/reel posts
  • Extracts transcripts using Facebook's GraphQL API
  • Adds transcript as captionText field in the output
  • Gracefully handles cases where transcripts are unavailable

Rate Limiting & Error Handling

  • Automatic retry logic with exponential backoff
  • Rate limit detection and handling
  • Consecutive empty response detection
  • Detailed error logging for debugging

πŸ“ˆ Scalability

The actor is designed to handle:

  • Small Scale (1-100 posts) - Quick research and analysis
  • Medium Scale (100-10,000 posts) - Competitor audits and trend analysis
  • Large Scale (10,000+ posts) - Enterprise-level data collection

Supports scraping from:

  • Facebook Pages
  • Facebook Groups
  • Public Profiles

This actor scrapes only publicly accessible data. It:

  • βœ… Does not access private or restricted content
  • βœ… Respects Facebook's Terms of Service
  • βœ… Does not bypass login restrictions
  • βœ… Complies with data privacy laws (GDPR, CCPA, etc.)

Important: Always use scraped data responsibly and in compliance with applicable laws and platform terms.

πŸ”§ Troubleshooting

Common Issues

  1. No posts returned

    • Check if the page/group is public and accessible
    • Verify the URL format is correct
    • Try enabling proxy configuration
  2. Rate limiting errors

    • The actor automatically handles rate limits with retries
    • Consider reducing maxPosts or adding delays between runs
  3. Video transcripts not extracted

    • Ensure includeVideoTranscript is set to true
    • Note that not all videos have transcripts available
    • Check that the post URL contains /videos/ or /reel/
  4. Proxy issues

    • The actor automatically falls back through proxy types
    • Ensure your Apify account has proxy access if using Apify proxies

πŸ“ž Support

For custom solutions or feature requests, contact: dev.scraperengine@gmail.com

🏁 Conclusion

The Facebook Posts Scraper provides a powerful, reliable solution for extracting Facebook post data at scale. With advanced filtering, engagement metrics, and optional video transcript extraction, it's perfect for marketers, researchers, and data analysts who need structured Facebook insights.