Facebook Ads Library avatar

Facebook Ads Library

Pricing

from $0.50 / 1,000 results

Go to Apify Store
Facebook Ads Library

Facebook Ads Library

🧲 ONLY 0.5$/1000 Results : Scrape Facebook Ad Library at scale. Extract ads, creatives, videos, CTAs, links & platforms. Enable Ad Details for EU reach, demographics & audience targeting. Multi-URL, auto-pagination, MCP ready.

Pricing

from $0.50 / 1,000 results

Rating

0.0

(0)

Developer

Data Xplorer

Data Xplorer

Maintained by Community

Actor stats

0

Bookmarked

28

Total users

15

Monthly active users

11 days ago

Last modified

Share

🎯 Facebook Ad Library Scraper

Unlock the full power of Meta's Ad Library with our advanced scraper! Monitor competitor ads, analyze creative strategies, track ad spend transparency, and get detailed demographic insights — all structured and ready for analysis.

Facebook Ad Library Scraper

💎 Why Choose Our Facebook Ad Library Scraper?

  • 🚀 Fast & Reliable: Advanced extraction engine for consistent, high-quality results
  • 📊 Complete Ad Data: Creative content, images, videos, CTAs, links, platforms, and publication dates
  • 🔬 Ad Details Mode: Unlock reach, demographics, age/gender breakdowns, and targeting data (optional)
  • 📄 Auto-Pagination: Automatically fetches all pages of results — no manual scrolling needed
  • 🎯 Multi-URL Support: Scrape multiple pages or search queries in a single run
  • 🖼️ Smart Media Extraction: Images, video thumbnails, HD/SD video URLs from all ad formats
  • 🛡️ Residential Proxy Support: Built-in anti-detection for reliable access
  • 🤖 MCP Compatible: Use with AI agents via Apify's MCP Server integration

🔮 How It Works

1. 🔗 Provide Ad Library URLs

Paste one or more Facebook Ad Library URLs. You can scrape:

  • A specific page's ads — Use view_all_page_id parameter
  • Search results — Use q parameter for keyword search
  • Filtered results — Active/inactive, country, media type

2. 📦 Set Your Limits

Choose how many ads to scrape (default: 100, set 0 for unlimited).

3. 🔬 Enable Ad Details (Optional)

Turn on Fetch Ad Details to enrich each ad with:

  • 📈 EU total reach
  • 👥 Demographic breakdowns (age × gender × country)
  • 🎯 Audience targeting (age range, gender, locations)
  • 💼 Payer & beneficiary transparency data

4. ⚡ Run & Export

Results are pushed incrementally — you can start using the data before the run completes. Export to JSON, CSV, Excel, or connect via API.

✨ What You'll Get

📋 Standard Fields (Always Included)

FieldDescription
adArchiveIdUnique Facebook Ad Library ID
collationIdGroups ad variations together
pageNameAdvertiser page name
imagePreview image URL (or video thumbnail)
bodyTextAd copy / body text
titleAd title
publicationDateStart & end dates with timestamps
adVariationsNumber of creative variations
ctaTextCall-to-action button text (Learn More, Shop Now, etc.)
linkUrlDestination URL
isActiveWhether the ad is currently running
hasVideoWhether the ad contains video
platformsDistribution platforms (Facebook, Instagram, Messenger, Audience Network)
mediaTypeIMAGE, VIDEO, or TEXT
all_imagesAll image URLs found in the ad
all_videosAll video URLs (HD/SD)

🔬 Detail Fields (When Fetch Ad Details Is Enabled)

FieldDescription
audienceTargeting info: gender, age range (min/max), locations
reachTotal EU reach + breakdown by country, age range, and gender
payerEntity paying for the ad
beneficiaryEntity benefiting from the ad

📋 Quick Start

Input Parameters

ParameterTypeDefaultDescription
urlsarrayOne or more Facebook Ad Library URLs to scrape
maxAdsnumber100Maximum ads to scrape (0 = unlimited)
fetchDetailsbooleanfalseFetch detailed reach, demographics & targeting per ad
proxyConfigobjectResidentialProxy configuration (residential recommended)

Input Example — Scrape a Page's Ads

{
"urls": [
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=FR&view_all_page_id=434174436675167&media_type=all" }
],
"maxAds": 100,
"fetchDetails": false
}

Input Example — Search by Keyword

{
"urls": [
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=running%20shoes&media_type=all" }
],
"maxAds": 50,
"fetchDetails": false
}

Input Example — With Ad Details (Reach & Demographics)

{
"urls": [
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=FR&view_all_page_id=434174436675167&media_type=all" }
],
"maxAds": 30,
"fetchDetails": true
}

Input Example — Multiple Pages

{
"urls": [
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=FR&view_all_page_id=434174436675167&media_type=all" },
{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&view_all_page_id=139594698297&media_type=all" }
],
"maxAds": 200,
"fetchDetails": false
}

Output Example — Standard

{
"adArchiveId": "1472608967817658",
"collationId": "8293741056382",
"pageName": "Apple",
"image": "https://scontent.xx.fbcdn.net/v/t45.1600-4/...",
"bodyText": "iPhone 16 Pro. The thinnest borders ever on iPhone.",
"title": "iPhone 16 Pro",
"publicationDate": {
"startDate": "2026-04-15T00:00:00.000Z",
"endDate": "N/A",
"startDate_timestamp": 1776384000,
"endDate_timestamp": 0
},
"adVariations": 3,
"ctaText": "Learn More",
"linkUrl": "https://www.apple.com/iphone-16-pro/",
"isActive": true,
"hasVideo": true,
"platforms": ["Facebook", "Instagram"],
"mediaType": "VIDEO",
"all_images": [],
"all_videos": ["https://video.xx.fbcdn.net/v/..."]
}

Output Example — With Ad Details

{
"adArchiveId": "1472608967817658",
"collationId": "8293741056382",
"pageName": "Apple",
"image": "https://scontent.xx.fbcdn.net/v/t45.1600-4/...",
"bodyText": "iPhone 16 Pro. The thinnest borders ever on iPhone.",
"title": "iPhone 16 Pro",
"publicationDate": {
"startDate": "2026-04-15T00:00:00.000Z",
"endDate": "N/A",
"startDate_timestamp": 1776384000,
"endDate_timestamp": 0
},
"adVariations": 3,
"ctaText": "Learn More",
"linkUrl": "https://www.apple.com/iphone-16-pro/",
"isActive": true,
"hasVideo": true,
"platforms": ["Facebook", "Instagram"],
"mediaType": "VIDEO",
"audience": {
"gender": "All",
"age": { "min": 18, "max": 65 },
"locations": [
{ "name": "France", "type": "countries", "excluded": false }
]
},
"reach": {
"total": 1665288,
"breakdown": [
{ "country": "FR", "age_range": "18-24", "male": 96974, "female": 170035, "unknown": 21102 },
{ "country": "FR", "age_range": "25-34", "male": 252206, "female": 367860, "unknown": 30821 },
{ "country": "FR", "age_range": "35-44", "male": 118744, "female": 196991, "unknown": 19212 },
{ "country": "FR", "age_range": "45-54", "male": 62221, "female": 123529, "unknown": 12105 },
{ "country": "FR", "age_range": "55-64", "male": 39991, "female": 81678, "unknown": 6396 },
{ "country": "FR", "age_range": "65+", "male": 41720, "female": 85028, "unknown": 4527 }
]
},
"payer": "APPLE INC.",
"beneficiary": "APPLE INC."
}

🔗 Integrations

Connect this scraper to your favorite tools and automate your ad intelligence workflows:

🤖 MCP Server for AI Agents

Use this scraper as a tool for Claude, ChatGPT, or any AI agent via the Apify MCP Server. Your AI assistant can:

  • Monitor competitor ad strategies automatically
  • Analyze creative trends across industries
  • Generate reports from ad library data
  • Track new ads from specific brands in real-time

🎯 Use Cases

📱 Competitor Intelligence

  • Monitor what ads your competitors are running right now
  • Track their creative strategies over time
  • Analyze which platforms they target (Facebook vs. Instagram)
  • Compare ad copy, CTAs, and landing pages

📊 Media Buying & Planning

  • Discover which demographics competitors are targeting
  • Analyze reach distribution across age groups and genders
  • Identify underserved audience segments
  • Benchmark your reach against competitors

🎨 Creative Strategy

  • Build a swipe file of competitor ad creatives
  • Analyze which ad formats perform best (image vs. video)
  • Track seasonal creative trends
  • Study CTA and messaging patterns

🏢 Brand Safety & Compliance

  • Monitor who is running ads mentioning your brand
  • Track payer/beneficiary transparency data
  • Audit ad compliance across markets
  • Detect unauthorized use of brand assets

📈 Market Research

  • Analyze advertising trends in specific industries
  • Compare ad strategies across countries
  • Study seasonal advertising patterns
  • Export data for custom analysis in Excel, Tableau, or PowerBI

🤖 AI-Powered Workflows

  • Feed ad data into LLMs for creative analysis
  • Automate weekly competitor ad reports
  • Build custom dashboards with real-time ad monitoring
  • Use MCP integration for conversational ad intelligence

💡 Pro Tips

🔥 For Competitive Analysis

Use view_all_page_id to scrape all ads from a specific competitor page. Find the page ID by searching for the brand on Facebook Ad Library and checking the URL.

📈 For Demographic Insights

Enable fetchDetails: true to get the full demographic breakdown. This reveals exactly which age groups and genders the advertiser is reaching — invaluable for media planning.

🌍 For Multi-Market Analysis

Create multiple URLs with different country parameters to compare how the same brand advertises differently across markets.

For Maximum Speed

Keep fetchDetails: false for fast bulk scraping. Only enable details when you specifically need reach and demographic data.

💰 For Cost Optimization

Set maxAds to limit costs. Start with a small number to validate your query, then increase for full scrapes.

🔄 For Ongoing Monitoring

Schedule this scraper to run daily or weekly via Apify Schedules. Combine with webhooks to get notified when new ads are detected.

🤝 Support & Resources

Need help? Have questions? We're here to help!

If you encounter any issues or have feature requests, please don't hesitate to open an issue.

❤️ Love our scraper? Please leave a review — it helps us build better tools!


Built with ❤️ for marketers, media buyers, and competitive intelligence professionals