Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Pricing

$0.15 / 1,000 ads

Go to Apify Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

Collect Meta Ad Library ads by keyword or advertiser as flat, analysis-ready JSON. No login, no browser, no Graph API token.

Pricing

$0.15 / 1,000 ads

Rating

0.0

(0)

Developer

ray

ray

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

6 days ago

Last modified

Categories

Features

Limited permissions

Share

Meta Ad Library Scraper

Collect public Facebook and Instagram ads in Meta's Ad Library for a keyword or advertiser, as flat JSON ready for a spreadsheet, a database, or an LLM.

No Facebook login, no browser, no Graph API token. The actor reads the same public Ad Library the website serves.

Why this one

  • Flat rows, not raw Meta JSON. adContent, adTitle, ctaText, landingPageUrl, imageUrls, videoUrls and dates are top-level fields. The original record stays under raw.
  • One row per ad. Duplicate ads across overlapping searches are merged, and every source that saw the ad is kept in inputUrls.
  • Date filters that hold. Every returned startDate is checked against your cutoff, and pagination continues until enough qualifying ads are found.
  • Details and EU reach. Turn on includeDetails for advertiser transparency and eu_total_reach where Meta publishes it.
  • Recovers instead of dying. Bounded exponential backoff, Retry-After, session restart, and optional proxy rotation. A failed detail request keeps the base ad and records detailsError.
  • Honest partial runs. If a source stops early, the run is marked partial and the manifest says which source and why.

Input

Provide searchQueries, startUrls, or both.

If both source fields are omitted, the Actor uses nike as its default search. Explicitly empty source fields are rejected, so an intentionally cleared input does not silently run a different search.

{
"searchQueries": ["protein powder", "creatine"],
"country": "US",
"activeStatus": "active",
"maxAdsPerSource": 200,
"includeDetails": true
}

Search by advertiser with an Ad Library page URL:

{
"startUrls": [
"https://www.facebook.com/ads/library/?country=US&active_status=active&ad_type=all&search_type=page&view_all_page_id=15087023444"
],
"maxAdsPerSource": 100
}
FieldDefaultNotes
searchQueriesKeyword searches, one per line
startUrlsAd Library search URLs or Facebook page URLs
countryUSISO country code for keyword searches
activeStatusactiveactive, all, inactive
mediaTypeallall, image, video, meme, none
maxAdsPerSource1001 to 5,000 per query or URL
includeDetailsfalseOne extra request per ad
includeAboutPagefalseOne request per advertiser
onlyAdsNewerThanYYYY-MM-DD or 7 days
onlyAdsOlderThanYYYY-MM-DD or 2 weeks
sortingtotal_impressionsOr relevancy_monthly_grouped
maxPagesPerSource00 means automatic
maxRequests00 means automatic
maxRetries40 to 10
backoffBaseSecs2Doubles per attempt
proxyConfigurationApify ProxyResidential recommended at volume

Output

One dataset item per ad. Key fields:

adArchiveID, pageID, pageName, adContent, adTitle, displayFormat, startDate, startDateFormatted, endDateFormatted, isActive, publisherPlatform, ctaText, ctaType, landingPageUrl, imageUrls, videoUrls, inputUrls, detailsError, aboutError, raw.

Empty searches are not charged as ads. They are stored in the EMPTY_RESULTS key-value record, with MANIFEST and TOTALS alongside. Advertiser details are under ad_details when includeDetails is on.

Notes and limits

  • The Ad Library is public. Meta's terms still restrict automated collection; use the data lawfully and do not republish creatives as your own.
  • Spend and impressions are only available for political and issue ads. EU reach is only available for ads delivered in the EU.
  • Media URLs are CDN links and expire. Mirror them if you need permanent assets.
  • maxAdsPerSource is per query or URL. Ten queries at 200 can return up to 2,000 rows before deduplication.
  • A partial run is not a failure. Read MANIFEST before assuming a source has no ads.
  • The Actor sends the developer fixed error categories for incident monitoring. Alerts exclude input, ad data, run IDs, and logs.
  • Apify's maximum-charge setting applies across all queries and URLs in a run. The Actor limits collection to the number of unique ads the remaining budget can cover, including optional details for those ads. If the budget truncates a search, MANIFEST reports PARTIAL with spending_limit; its billing summary records collected, written, and charged counts. No additional pages or sources are requested once that ad limit is reached.

Pricing

$0.40 per 1,000 ads, pay per result. No start fee, and empty searches are free. Apify's free plan includes monthly credit for a first run.