Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Pricing

Pay per usage

Go to Apify Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

Scrape ads from the public Facebook Ads Library website using Playwright. No API token or Facebook account required. Extract advertiser names, ad text, creation dates, platforms, and snapshot URLs.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

CryptoSignals Agent

CryptoSignals Agent

Maintained by Community

Actor stats

0

Bookmarked

6

Total users

2

Monthly active users

3 days ago

Last modified

Categories

Share

Scrape ads from Meta's public Facebook Ads Library using Playwright browser automation. No Facebook account or API key required.

This actor loads the Ad Library search page in a real browser, scrolls through results, and extracts structured data from each ad card — including advertiser name, ad copy, active date range, platforms, and a direct link to the ad in the library.

Input Parameters

ParameterTypeDefaultDescription
searchTermsString"shopify"Keywords to search for in the Ad Library
countryString"US"Two-letter country code (US, GB, DE, FR, etc.)
maxAdsNumber5Maximum number of ads to extract (capped at 200)

Example Input

{
"searchTerms": "meal kit delivery",
"country": "US",
"maxAds": 20
}

Output Schema

Each ad is returned as a JSON object with the following fields:

FieldTypeDescription
advertiserNameStringName of the advertiser running the ad
advertiserUrlStringLink to the advertiser's page in the Ad Library
adTextStringThe ad copy / creative text
libraryIdStringUnique Ad Library ID for the ad
dateRangeStringWhen the ad started running (e.g. "Started running on Mar 15, 2026")
statusStringCurrent status — typically "Active" or "Inactive"
platformsStringWhere the ad runs (Facebook, Instagram, Messenger, etc.)
snapshotUrlStringDirect URL to the ad snapshot in the library
scrapedAtStringISO 8601 timestamp of when the data was collected

Example Output

{
"advertiserName": "HelloFresh",
"advertiserUrl": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=US&view_all_page_id=123456789",
"adText": "Get 16 FREE meals + first box ships free! America's #1 meal kit.",
"libraryId": "987654321",
"dateRange": "Started running on Mar 10, 2026",
"status": "Active",
"platforms": "Facebook, Instagram",
"snapshotUrl": "https://www.facebook.com/ads/library/?id=987654321",
"scrapedAt": "2026-03-28T12:00:00.000Z"
}

Use Cases

  • Competitive analysis — See what ads your competitors are running, what messaging they use, and which platforms they target.
  • Market research — Discover trends in ad copy and creative across any industry or niche.
  • Ad monitoring — Track when competitors launch new campaigns or change their messaging.
  • Compliance and transparency — Verify ad claims and monitor political advertising in your region.
  • Creative inspiration — Build a swipe file of high-performing ad copy and formats.

How It Works

  1. Opens the Facebook Ads Library in a headless Chromium browser via Playwright
  2. Searches for your keywords in the specified country
  3. Scrolls through results and waits for ad cards to load
  4. Extracts structured data from each ad card in the DOM
  5. Pushes results to the Apify dataset

No login, no API token, no rate-limited official API — just browser-based scraping of the publicly available Ad Library.

Proxy Recommendations

Facebook frequently rate-limits or blocks datacenter IP addresses. For high-volume scraping (50+ ads per run or multiple concurrent runs), residential proxies are essential to avoid CAPTCHAs and blocks.

I use ThorData residential proxies — they offer rotating residential IPs with good geographic coverage, which works well for country-specific Ad Library searches.

To use proxies, configure them in the actor's proxy settings on Apify (Apify Proxy or your own external proxy URL).

Limitations

  • Maximum 200 ads per run (Facebook lazy-loads results and may stop rendering beyond this)
  • Results depend on Facebook's current Ad Library page structure — if Meta changes the DOM, the actor may need updating
  • Some ads with heavy video/carousel content may have partial text extraction
  • Rate limiting may occur without residential proxies on high-volume runs

Support

Found a bug or have a feature request? Open an issue on the actor's page or reach out through Apify's messaging system.