Facebook Ads Library Scraper avatar
Facebook Ads Library Scraper

Pricing

$5.00/month + usage

Go to Apify Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

Extract all ads from Facebook Ads Library for any page. Automatically extracts page IDs from Facebook URLs and retrieves complete ad details including images, videos, captions, CTAs, and metadata. Supports bulk processing of multiple pages.

Pricing

$5.00/month + usage

Rating

0.0

(0)

Developer

Corentin Robert

Corentin Robert

Maintained by Community

Actor stats

1

Bookmarked

17

Total users

5

Monthly active users

3.7 days

Issues response

3 days ago

Last modified

Share

Last updated: January 18, 2026

๐ŸŽฏ Why use this scraper?

Extract all Facebook ads from any page in minutes with complete performance metrics, media assets, and audience insights. Perfect for competitive analysis, ad research, and market intelligence.

Perfect for marketers, agencies, and businesses who need comprehensive ad data to analyze competitor strategies, track advertising trends, or build ad intelligence databases.

โœ… What you get

Complete ad data including:

  • Performance Metrics: Impressions, spend, and detailed audience breakdowns (age, gender, country)
  • Media Assets: All images and videos with full metadata (titles, descriptions, CTAs, URLs)
  • Ad Details: Archive ID, active status, start/end dates, publisher platforms
  • Page Information: Page ID, name, profile URI
  • Content: CTA text, link URLs, ad copy

๐Ÿš€ Key Features

๐Ÿ“Š Complete Ad Data Extraction

Extract every detail from Facebook Ads Library:

  • โœ… Performance metrics: Impressions, spend, and audience breakdowns
  • โœ… Media assets: All images and videos with full URLs and metadata
  • โœ… Ad metadata: Dates, platforms, status, and identifiers
  • โœ… Content analysis: CTAs, links, titles, and descriptions

๐Ÿ”„ Automatic Page ID Extraction

No manual lookup needed:

  • Automatically extracts page ID from Facebook page URLs
  • Supports direct page ID input if you already have it
  • Handles multiple pages in a single run

โšก Fast GraphQL API Integration

Lightning-fast data extraction:

  • Direct access to Facebook's Ads Library GraphQL API
  • Automatic pagination with cursor-based navigation
  • Rate limiting protection with intelligent delays
  • ~10 ads per page request (configurable)

๐Ÿ“„ Complete Media Extraction

Get all creative assets:

  • Images with original and resized URLs
  • Videos in HD and SD formats with preview images
  • Full metadata: titles, descriptions, CTAs, and link URLs
  • Ready for analysis or download

๐Ÿ” Advanced Filtering Options

Target specific ads with powerful filters:

  • Status filters: Active ads only or all ads (including inactive)
  • Geographic filters: Filter by country (FR, US, GB, etc.)
  • Ad type filters: All ads or political/issue ads only
  • Media filters: All formats, images only, or videos only
  • Quantity control: Set maximum number of ads to collect

๐Ÿ’ผ Use Cases and Client Benefits

๐Ÿข For Marketing Agencies and Consultants

The Problem: You need to analyze competitor ad strategies, but manually collecting ad data from Facebook Ads Library is time-consuming, incomplete, and doesn't provide performance metrics.

The Solution: Extract complete ad databases with performance metrics, media assets, and audience insights to deliver comprehensive competitive analysis reports.

Client Benefits:

  • ๐Ÿ“Š Complete ad databases: All ads with performance metrics and media assets
  • ๐Ÿ“ˆ Performance insights: Impressions, spend, and audience breakdowns
  • ๐ŸŽฏ Competitive intelligence: Track competitor strategies and trends
  • ๐Ÿ’ฐ Time savings: Build comprehensive reports in minutes, not days
  • ๐Ÿ“ฑ Media library: Download all images and videos for analysis

ROI: Deliver premium competitive analysis reports faster. One successful client engagement can generate significant revenue.


๐Ÿ“Š For Market Researchers and Analysts

The Problem: You need comprehensive ad data for market analysis, but manual collection is slow, expensive, and misses performance metrics.

The Solution: Extract structured ad data with performance metrics from multiple pages for comparative analysis and market mapping.

Client Benefits:

  • ๐Ÿ“Š Complete datasets: All ads with performance metrics and media
  • ๐Ÿ” Market coverage: Analyze advertising trends across industries
  • ๐Ÿ“ˆ Performance analysis: Study impressions, spend, and audience targeting
  • ๐Ÿ’พ Structured data: Ready for analysis in CSV, JSON, or Excel
  • ๐ŸŽฏ Trend identification: Track advertising patterns over time

ROI: Complete market research in hours instead of weeks. Deliver insights that command premium consulting fees.


๐ŸŽฏ For Ad Creatives and Content Teams

The Problem: You need inspiration and examples of successful ad formats, but finding and organizing ad creatives is time-consuming.

The Solution: Extract all ad creatives with full metadata to build inspiration libraries and analyze successful formats.

Client Benefits:

  • ๐Ÿ–ผ๏ธ Media library: All images and videos with full URLs
  • ๐Ÿ“ Content analysis: Titles, descriptions, and CTAs for inspiration
  • ๐ŸŽจ Format analysis: Study successful ad formats and structures
  • โšก Automated collection: Build inspiration libraries automatically
  • ๐Ÿ’ฐ Creative insights: Learn from high-performing ads

ROI: Build comprehensive creative libraries faster. More inspiration = better ads = higher performance.


The Problem: You need to monitor political or issue ads for compliance, but manual review is slow and error-prone.

The Solution: Extract all political/issue ads with complete metadata for compliance monitoring and reporting.

Client Benefits:

  • โœ… Compliance monitoring: Track political and issue ads automatically
  • ๐Ÿ“Š Complete records: All ad data with dates and metadata
  • ๐Ÿ” Audit trails: Full extraction history for compliance
  • โšก Automated reporting: Generate compliance reports automatically
  • ๐Ÿ’ฐ Risk mitigation: Identify compliance issues faster

ROI: Reduce compliance risk and save audit time. Avoid costly penalties with automated monitoring.


๐Ÿ“ˆ Concrete Results: Before vs. After

Before (without the scraper)

  • โฑ๏ธ 2-3 hours to manually collect data from 50 ads
  • ๐Ÿ“ Visit each ad page individually in Facebook Ads Library
  • โŒ Risk of missing ads or information
  • ๐Ÿ”„ Repetitive copy-paste work
  • ๐Ÿ’ธ High opportunity cost (time you could spend on analysis)
  • ๐Ÿ˜“ Stress from incomplete or unstructured data
  • ๐Ÿ“Š No easy way to analyze performance metrics
  • ๐Ÿ–ผ๏ธ Manual download of images and videos

After (with the scraper)

  • โšก Less than 5 minutes to extract 50+ ads with complete structured data
  • โœ… Complete ad data automatically extracted with performance metrics
  • ๐Ÿ“Š Ready export in JSON/CSV format - no formatting needed
  • ๐ŸŽฏ Instant analysis of impressions, spend, and audience data
  • ๐Ÿ’ฐ Higher revenue: Deliver comprehensive reports faster
  • ๐Ÿ˜Š Professional confidence: Deliver comprehensive, accurate databases
  • ๐Ÿ“ˆ Easy analysis: Filter and analyze ads instantly
  • ๐Ÿ–ผ๏ธ Media library: All images and videos with full URLs

Time saved: 95% reduction in data collection time
Speed: 50+ ads in under 5 minutes
Quality improvement: 100% data coverage vs. selective manual extraction
Analysis capability: Structured data with performance metrics ready for advanced analytics


๐Ÿ’ฐ Costs and Optimization

๐Ÿ’ต Actual Cost Breakdown (Based on Real Run - 50 ads)

Total cost: ~$0.15 for 50 ads (~$0.003 per ad)

ServiceUsageCost
Actor compute units0.05$0.02
Dataset writes50$0.00025
Data transfer internal0.01 GB$0.0005
Data transfer external0.005 GB$0.00075
Total~$0.15

Cost per ad: ~$0.003 (less than $0.01 per ad)

๐Ÿ“Š Cost Scaling

Based on typical run data:

  • 10 ads: ~$0.03
  • 50 ads: ~$0.15
  • 100 ads: ~$0.30
  • 500 ads: ~$1.50

Note: Costs are primarily driven by compute time. The scraper is optimized for efficiency with intelligent rate limiting and session management.

๐Ÿ’ก Cost Optimization Tips

  1. Start small: Test with 10-20 ads to validate everything works (~$0.03)
  2. Set maxAds: Limit the number of ads per page to control costs
  3. Use filters: Filter by active status, country, or media type to reduce data volume
  4. Batch processing: Process multiple pages in a single run to optimize compute time

For testing:

{
"url": "https://www.facebook.com/airbnb/",
"maxAds": 10,
"activeStatus": "active",
"country": "FR"
}

Cost: ~$0.03 to test with 10 ads

For production (50+ ads):

{
"url": "https://www.facebook.com/airbnb/",
"maxAds": 100,
"activeStatus": "active",
"country": "FR",
"mediaType": "all"
}

Cost: ~$0.30 for 100 ads | Time: Less than 5 minutes


๐Ÿ“‹ Complete Data Fields Extracted

Complete ad data organized in the following categories:

CategoryField NameDescriptionExample
IdentificationadArchiveIdUnique ad archive ID1540798570471880
pageIdFacebook page ID324826532457
pageNamePage nameAirbnb
pageProfileUriPage profile URLhttps://www.facebook.com/airbnb/
Ad DetailsisActiveActive statustrue
startDateAd start date (ISO)2026-01-12T08:00:00.000Z
endDateAd end date (ISO)2026-01-18T08:00:00.000Z
publisherPlatformPublishing platforms["FACEBOOK", "INSTAGRAM"]
ContentlinkUrlDestination URLhttps://www.airbnb.fr/experiences
ctaTextCall-to-action textEn savoir plus
PerformanceimpressionsTotal impressions/reach15898
spendTotal spend (currency)429
impressionsBreakdownAudience breakdownSee structure below
MediaimagesImage array with URLs and metadataSee structure below
videosVideo array with URLs and metadataSee structure below

Impressions Breakdown Structure

{
"targetsEu": true,
"totalReach": 15898,
"genderAudience": "Tous",
"ageAudience": {"min": 18, "max": 59},
"locations": [
{"name": "France", "type": "countries", "excluded": false}
],
"ageCountryGenderBreakdown": [
{
"country": "FR",
"breakdowns": [
{"ageRange": "25-34", "male": 4896, "female": 5940, "unknown": 69}
]
}
]
}

Media Structure

Images:

{
"original": "https://...",
"resized": "https://...",
"title": "Ad title",
"body": "Ad description",
"ctaText": "Learn More",
"ctaType": "LEARN_MORE",
"linkUrl": "https://..."
}

Videos:

{
"hd": "https://...",
"sd": "https://...",
"preview": "https://...",
"title": "Video title",
"body": "Video description",
"ctaText": "Learn More",
"ctaType": "LEARN_MORE",
"linkUrl": "https://..."
}

๐Ÿ’ก How to Use the Data

Competitive Analysis

Use impressions, spend, and audience data to analyze competitor ad strategies and identify successful campaigns.

Creative Inspiration

Download images and videos to build inspiration libraries and study successful ad formats.

Market Research

Filter and analyze ads by country, date, or media type to track advertising trends and patterns.

Performance Benchmarking

Compare impressions and spend across competitors to benchmark your own ad performance.

CRM Integration

Import CSV data directly into CRM systems (Salesforce, HubSpot, etc.) for lead tracking and analysis.

Export to Analytics Tools

Import CSV data into Excel, Google Sheets, or business intelligence tools for advanced analysis and reporting.

Create Reports

Generate professional reports for stakeholders with key metrics and insights from ad data.


๐ŸŽ What You Receive

  • โœ… Complete ad database with all ads from specified pages
  • โœ… Extracted in minutes - lightning-fast performance
  • โœ… Performance metrics - impressions, spend, and audience breakdowns
  • โœ… Media assets - all images and videos with full URLs
  • โœ… Export in JSON/CSV format - ready for analysis
  • โœ… Up-to-date data extracted directly from Facebook Ads Library
  • โœ… Ready to use - no additional processing needed
  • โœ… Structured and clean - perfect for analysis or import

๐Ÿ“– Input Configuration

Basic Configuration

{
"url": "https://www.facebook.com/airbnb/",
"activeStatus": "active",
"country": "FR",
"maxAds": 50
}

Advanced Configuration with Filters

{
"url": "https://www.facebook.com/airbnb/",
"pageId": "324826532457",
"activeStatus": "active",
"country": "FR",
"adType": "ALL",
"mediaType": "all",
"maxAds": 100
}

Parameter Reference

๐Ÿ“„ Page Input

ParameterTypeDefaultDescription
urlstring""Facebook page URL (e.g., https://www.facebook.com/airbnb/) or page ID
pageIdstring""Direct page ID if you already know it (optional, takes priority over URL)

๐Ÿ” Filter Options

ParameterTypeDefaultDescription
activeStatusstring"active"Filter by ad status: "active" for currently running ads, "all" for all ads
countrystring"FR"ISO country code (e.g., FR, US, GB, DE). Ads filtered to show only those targeting this country
adTypestring"ALL"Filter by ad type: "ALL" for all ads, "POLITICAL_AND_ISSUE_ADS" for political/issue ads only
mediaTypestring"all"Filter by media format: "all" for all formats, "image" for images only, "video" for videos only
maxAdsinteger100Maximum number of ads to collect per page (0 for unlimited)

Filter Examples

Extract active ads from France only:

{
"url": "https://www.facebook.com/airbnb/",
"activeStatus": "active",
"country": "FR"
}

Extract all video ads from US:

{
"url": "https://www.facebook.com/airbnb/",
"activeStatus": "all",
"country": "US",
"mediaType": "video"
}

Extract political/issue ads only:

{
"url": "https://www.facebook.com/airbnb/",
"adType": "POLITICAL_AND_ISSUE_ADS",
"country": "FR"
}

๐Ÿš€ Installation and Usage

Local Installation

cd scrapers/facebook-ads-library-scraper
npm install

Local Execution

$npm start

The scraper will use the input.json file for configuration.

Apify Platform

  1. Push the Actor to Apify: apify push
  2. Configure input in the Apify web interface
  3. Run the Actor
  4. Download results from the Dataset

โš™๏ธ Configuration

  • Memory: 1 GB
  • Timeout: 1800s (30 minutes)
  • Restart on error: ON

๐Ÿ“ Notes

  • Facebook may rate limit requests if too many are made too quickly
  • Some ads may have limited data depending on privacy settings
  • The LSD token is automatically extracted from the library page
  • Cookies and session management are handled automatically
  • Page IDs are automatically extracted from Facebook page URLs - no manual lookup required
  • Performance metrics (impressions, spend) are only available for ads targeting EU countries

๐Ÿ“ž Support

Need help using the scraper or customizing the extraction? Contact me:


Extract all Facebook ads with performance metrics in minutes. Transform hours of manual data collection into instant structured, actionable data. Build comprehensive ad databases and make data-driven decisions that grow your business.