Facebook Ads Library avatar

Facebook Ads Library

Pricing

from $0.50 / 1,000 results

Go to Apify Store
Facebook Ads Library

Facebook Ads Library

๐Ÿงฒ 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

3

Total users

3

Monthly active users

5 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
urlsarrayโ€”One 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