Meta Ad Library Scraper avatar

Meta Ad Library Scraper

Pricing

from $5.00 / 1,000 results

Go to Apify Store
Meta Ad Library Scraper

Meta Ad Library Scraper

Scrape ads from Meta Ad Library by keyword search or from Facebook page URLs. Extracts ad creatives, CTAs, platforms, and targeting data.

Pricing

from $5.00 / 1,000 results

Rating

0.0

(0)

Developer

Admo Solutions

Admo Solutions

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

3

Monthly active users

18 days ago

Last modified

Categories

Share

Scrape ads from Meta's Ad Library using Playwright. Supports two modes:

  1. Keyword search — Search the Ad Library by keyword
  2. Facebook page scraping — Scrape all ads from specific Facebook pages

Extracts ad creatives, CTAs, platforms, and targeting data. No API key required.

Features

  • Dual-mode — Ad Library search + Facebook page scraping
  • Bulk cursor pagination — Fetches up to Max Items per source via the Relay GraphQL cursor endpoint (doc_id sniffed live from Meta's JS bundles; no login required)
  • Relay cache extraction — Parses embedded GraphQL data for complete field coverage
  • Date-range filtering — Filter ads by start date (min/max), applied server- and client-side
  • Deduplication — Automatically deduplicates by ad archive ID
  • Clean output — Structured JSON dataset

Yield & proxy note: Direct (proxy-off) runs load the initial ~30 ads per source. Bulk cursor pagination requires a residential-class IP — Facebook rate-limits datacenter IPs on its GraphQL endpoint (error 1675004). Enable Apify proxy with the RESIDENTIAL group (session pinning is handled automatically) to fetch up to Max Items. When the IP is rate-limited, the actor falls back to the ads already collected and logs a warning instead of failing.

Input

FieldDescriptionDefault
URLsAd Library or Facebook page URLs[]
Search TermKeyword for Ad Library search (if URLs empty)"Nike"
Country CodeISO 2-letter country code"US"
Ad TypeFilter by ad category"ALL"
Active StatusActive/Inactive/All"ALL"
Start Date MinOnly ads started on/after this date (YYYY-MM-DD)""
Start Date MaxOnly ads started on/before this date (YYYY-MM-DD)""
Max ItemsMaximum ads per source (bulk pagination target)100
Max ScrollsScroll iterations20
Scroll DelayDelay between scrolls (ms)2000
Enrich with Page DataVisit advertiser pages for contact info/likesfalse
Proxy ConfigurationOff = first ~30 ads/source; RESIDENTIAL group = bulk up to Max ItemsuseApifyProxy: false

Supported URL formats

  • https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=US&q=skincare
  • https://www.facebook.com/ZapierApp
  • https://www.facebook.com/profile.php?id=123456
  • facebook.com/YourPage

Output

Each ad contains:

FieldDescription
adArchiveIdUnique ad identifier
pageIdFacebook page ID
pageNameAdvertiser page name
pageUrlPage URL
bodyAd text content
titleAd headline
linkUrlCTA destination URL
ctaTextCTA button text
ctaTypeCTA type (SHOP_NOW, LEARN_MORE, etc.)
startDateWhen ad started running
endDateWhen ad stopped running (if known)
isActiveWhether ad is active
platformsWhere ad runs (Facebook, Instagram, etc.)
mediaTypeAd format (image, video, carousel)
displayFormatCreative display format
captionAd caption / link description
imageUrlsAll creative image URLs
videoUrlsCreative video URLs (HD/SD)
profileImageUrlAdvertiser page profile picture
beneficiaryNameEU transparency: who benefits from the ad
payerNameEU transparency: who paid for the ad
languagesAd languages (when provided)
sourceWhich source this ad came from

Usage

Search by keyword

{
"searchTerm": "skincare",
"country": "US",
"maxItems": 100
}

Filter by start date range

{
"searchTerm": "skincare",
"country": "US",
"startDateMin": "2026-09-01",
"startDateMax": "2026-10-01",
"maxItems": 100
}

Scrape from Facebook pages

{
"urls": [
"https://www.facebook.com/ZapierApp",
"https://www.facebook.com/ceraveusa"
],
"maxItems": 50
}

Mixed mode

{
"urls": [
"https://www.facebook.com/ads/library/?active_status=all&q=skincare&country=US",
"https://www.facebook.com/ZapierApp"
],
"maxItems": 100
}

Cost

  • 100 ads: ~$0.05-0.15 compute
  • 1000 ads: ~$0.50-1.50 compute
  • Residential proxy additional

Disclaimer

This scraper only extracts publicly available data from Meta Ad Library. Users are responsible for complying with applicable laws and regulations.