VOOZH about

URL: https://apify.com/corner_cutter/facebook-ad-library-scraper

โ‡ฑ Facebook Ad Library Scraper ยท Apify


Pricing

$1.25 / 1,000 results

Go to Apify Store

Facebook Ad Library Scraper

Comprehensive Meta ad library tool that fetches all ads for a given Facebook Ad Library URL or page URL. Extract ad creatives, copy, targeting info, and more.

Pricing

$1.25 / 1,000 results

Rating

3.9

(2)

Developer

๐Ÿ‘ ReactRuby

ReactRuby

Maintained by Community

Actor stats

7

Bookmarked

617

Total users

70

Monthly active users

4 months ago

Last modified

Categories

Share

Comprehensive Meta ad library tool that fetches all ads for a given Facebook Ad Library URL or page URL. Extract ad creatives, copy, targeting info, and more from Meta's Ad Library.

๐Ÿš€ Features

  • Bulk URL Processing: Scrape multiple Ad Library URLs in one run
  • Flexible Input: Accepts both direct Ad Library URLs and Facebook Page URLs
  • Comprehensive Data Extraction: Retrieves all available ad data from Meta's Ad Library
  • Real-time Processing: Live updates as each URL is processed
  • Robust Error Handling: Detailed error reporting for failed requests
  • Structured Output: Clean, organized results in dataset format

๐Ÿ“‹ Input Parameters

FieldTypeRequiredDescription
urlArrayYesList of Facebook Ad Library URLs or Page URLs to scrape

Example Input

{
"url":[
"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&media_type=all&q=nike&search_type=keyword_unordered",
"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&view_all_page_id=123456789"
]
}

Supported URL Formats

  1. Search Query URLs: Ad Library search results by keyword

    https://www.facebook.com/ads/library/?q=your_search_term&country=US
  2. Page ID URLs: All ads from a specific Facebook Page

    https://www.facebook.com/ads/library/?view_all_page_id=PAGE_ID
  3. Filtered URLs: Ad Library with specific filters applied

    https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&media_type=video

๐Ÿ“ค Output Format

Each processed URL produces a detailed record in the dataset:

{
"url":"https://www.facebook.com/ads/library/?q=example&country=US",
"status":"completed",
"result":{
"ads":[...],
"pageInfo":{...},
"metadata":{...}
},
"success":true,
"timestamp":"2024-01-15T10:30:00.000Z"
}

Output Fields

FieldTypeDescription
urlStringThe scraped Ad Library URL
statusStringProcessing status: completed, error, or custom status from API
resultObjectThe scraped ad data (structure depends on the ads found)
successBooleanWhether the scraping request succeeded
errorStringError details (only present when success is false)
timestampStringISO timestamp of when scraping was performed

๐Ÿ”ง Usage Example

Using Apify Client

import{ ApifyClient }from'apify-client';
const client =newApifyClient({
token:'YOUR_APIFY_TOKEN',
});
// Run the Actor
const run =await client.actor('YOUR_USERNAME/facebook-ad-library-scraper').call({
url:[
'https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=example'
]
});
// Fetch results
const{ items }=await client.dataset(run.defaultDatasetId).listItems();
// Process results
items.forEach(item=>{
console.log(`URL: ${item.url}`);
console.log(`Status: ${item.status}`);
console.log(`Ads found:`, item.result);
});

Using Apify API

curl-X POST https://api.apify.com/v2/acts/YOUR_USERNAME~facebook-ad-library-scraper/runs \
-H"Authorization: Bearer YOUR_APIFY_TOKEN"\
-H"Content-Type: application/json"\
-d'{
"url": [
"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=example"
]
}'

Single URL Input

You can also pass a single URL as a string:

{
"url":"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=example"
}

๐ŸŽฏ Use Cases

  • Competitor Analysis: Monitor competitors' ad strategies and creatives
  • Market Research: Discover advertising trends in your industry
  • Ad Creative Inspiration: Find successful ad formats and messaging
  • Brand Monitoring: Track all ads mentioning your brand
  • Political Ad Tracking: Monitor political advertising campaigns
  • Transparency Research: Analyze advertising practices across industries
  • Agency Intelligence: Gather insights for client pitches and strategies

โšก Technical Details

Processing Flow

  1. Actor receives array of Ad Library URLs from input
  2. Each URL is processed sequentially with a separate API call
  3. Results are saved individually as they're processed
  4. Final summary shows total processed, successful, and failed requests

API Integration

  • Endpoint: Secure webhook-based scraping service
  • Method: POST
  • Content-Type: application/json
  • Timeout: 2 minutes per URL (to handle complex pages)

Performance

  • Memory: 128-512 MB
  • Processing Speed: Varies based on ad volume per URL
  • Recommended Batch Size: Up to 50 URLs per run
  • Runtime: Scales with number of URLs and ads per page

๐Ÿ›ก๏ธ Error Handling

The Actor handles various error scenarios:

  • โœ… Invalid URL format detection
  • โœ… Network timeout handling (2-minute timeout)
  • โœ… API connection errors
  • โœ… Missing required fields validation
  • โœ… Webhook failures with detailed error messages
  • โœ… Individual URL failures don't stop batch processing

๐Ÿ“ˆ Results Summary

At the end of each run, you'll receive a summary log:

Processing complete. Total:10,Successful:9,Failed:1

Each failed request includes detailed error information in the output.

๐Ÿ” Output Views

The Actor provides a convenient Overview view in the Apify Console showing:

  • Ad Library URL (clickable link)
  • Processing status
  • Scraped data preview
  • Success indicator
  • Error details (if any)
  • Timestamp

๐Ÿ’ก Best Practices

  1. URL Validation: Ensure your URLs are properly formatted Facebook Ad Library URLs
  2. Batch Processing: Group URLs in batches of 10-50 for optimal performance
  3. Error Handling: Check the success field before processing results
  4. Rate Awareness: Be mindful of request volumes to avoid rate limiting
  5. Country Codes: Use valid ISO country codes in your Ad Library URLs

๐ŸŒ Supported Countries

Facebook Ad Library supports ads from over 200 countries. Use the appropriate ISO country code in your URL:

  • US - United States
  • GB - United Kingdom
  • CA - Canada
  • AU - Australia
  • DE - Germany
  • And many more...

๐Ÿ“š Integration Examples

Filter Successful Results Only

const{ items }=await client.dataset(run.defaultDatasetId).listItems();
const successfulResults = items.filter(item=> item.success);
console.log('Successfully scraped:', successfulResults.length,'URLs');

Export Results to CSV

// Get dataset items in CSV format
const csvUrl =`https://api.apify.com/v2/datasets/${run.defaultDatasetId}/items?format=csv`;
// Download or process CSV as needed

Webhook Integration

Set up a webhook to receive results automatically when the Actor finishes:

const run =await client.actor('YOUR_USERNAME/facebook-ad-library-scraper').call(
{url:[...]},
{webhooks:[{eventTypes:['ACTOR.RUN.SUCCEEDED'],requestUrl:'YOUR_WEBHOOK_URL'}]}
);

๐Ÿ” Privacy & Compliance

  • Only scrapes publicly available data from Meta's Ad Library
  • Respects Meta's Terms of Service and data access policies
  • Results are stored in your private Apify dataset
  • No personal data is collected beyond what's publicly available in Ad Library

โš ๏ธ Limitations

  • Only scrapes publicly visible ads in Meta's Ad Library
  • Subject to Meta's Ad Library availability and access policies
  • Large result sets may take longer to process
  • Some ad details may not be available for all ad types

๐Ÿ†˜ Support

Need help or have questions?

  • ๐Ÿ“ Create an issue in the Actor repository
  • ๐Ÿ’ฌ Contact Apify support for platform-related questions

Version: 0.0.1
Last Updated: January 2026

๐ŸŒŸ Get Started

Ready to scrape Facebook Ad Library? Run this Actor now or integrate it into your workflow with the Apify API!

You might also like

Facebook Ad Library Scraper

agenscrape/facebook-ad-library-scraper

Extract ads from Facebook Ad Library instantly. Get complete ad details, images, videos, page info, impressions, and targeting data. Just paste the Ad Library URL and run. Fast, reliable extraction for competitor research and market analysis.

Facebook Ads Library Scraper โ€” Meta Ads + Instagram Data

sourabhbgp/facebook-ads-scraper

Scrape Facebook Ads Library (Meta Ad Library) with 57 fields per ad โ€” no login needed. Get ad copy, images, videos, CTAs, run dates, Instagram followers, page verification, AI-content flag, EU transparency. Search by keyword, advertiser, or paste any Ad Library URL.

85

Meta (Facebook) Ad Scrapper (Using Ad Library URL) (Premium)

scrapeio/meta-facebook-ad-scrapper-using-ad-library-url-premium

Scrape every Meta ad (Facebook, Instagram, Messenger, Audience Network) from the Ad Library by keyword, Facebook Page ID, or Ad Library URL. Sort by total impressions or most recent. Extract creatives, copy, CTAs, impressions, and spend ranges. 100+ languages. No Meta Graph API or developer app.

882

4.8

Facebook Ads Library Scraper

scraper-engine/facebook-ads-library-scraper

The Facebook Ads Library Scraper extracts ad data from Facebookโ€™s Ad Library, including advertiser details, ad text, impressions, and targeting info. Ideal for ad research, marketing insights, and competitor analysis, it delivers clean, structured data for analysis or integration via API.

๐Ÿ‘ User avatar

Scraper Engine

398

4.2

Meta (Facebook) Ad Library Scraper - Efficient & Fast

automly/facebook-ad-library-scraper

Scrape the Meta Ad Library for Facebook and Instagram ads. Extract ad copy, images, videos, spend, impressions, and advertiser transparency data. No account or API key required.

Meta Ad Library Scraper Pro

webdatalabs/meta-ad-library-scraper

Extract competitor ads from Meta's Ad Library (Facebook, Instagram, Messenger, Audience Network). Get ad copy, creatives, targeting data, sentiment analysis, and track changes over time.

427

5.0

Facebook Ads Library Scraper API

api_creators/facebook-ads-library-scraper-api

$1 per 1000 ads! Scrape Facebook Ad Library: Extract ad data, copy & creatives from FB & Instagram. Powerful Facebook Ads Scraper for competitor research & ad intelligence. Search by keyword or Page ID. Export JSON, CSV, or Excel. Fast, reliable, and cheap Facebook Ad Library API.

144

5.0

Facebook & Meta Ad Library Scraper - Competitor Ads & Creatives

jy-labs/meta-ad-library-multi-search-scraper

Scrape Facebook and Instagram ads from Meta Ad Library. Run up to 5 keywords, target exact advertiser Page IDs, and export ad creatives, copy, CTA links, media URLs, start dates, and platform data.

179

5.0

Facebook Ads Library Scraper

automation-lab/facebook-ads-library

Scrape Facebook / Meta Ad Library for competitor ad monitoring. Search by keyword, Page URL, pasted Ads Library URL, country, status, and media type. Extract creatives, copy, links, media, platforms, spend. No login or Meta API token required.

๐Ÿ‘ User avatar

Stas Persiianenko

498

5.0

Facebook Ad Library Scraper

apipi/facebook-ad-library-scraper

Ultra-fast Facebook Ads Library scraper with advanced filtering. Extract ads from Meta Ads Library in seconds! Perfect for competitor analysis, market research, and ad intelligence.