Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

Scrape ads from Facebook Ad Library without cookies or authentication. Search by keywords or page names, filter by country, ad status, ad type, and media type. Extracts ad text, page info, media URLs, dates, CTA, landing page links, and more.

Pricing

from $1.00 / 1,000 results

Rating

1.0

(1)

Developer

Crawler Bros

Crawler Bros

Maintained by Community

Actor stats

1

Bookmarked

250

Total users

15

Monthly active users

5 days ago

Last modified

Share

Scrape ads from the Facebook Ad Library.

  • Zero-result searches are automatically retried with a fresh residential proxy session each attempt — Facebook blocks individual residential IPs intermittently, and a new IP per retry materially improves recovery (user report: "Got zero results for the query run for a simple keyword").
  • Explicit zero-result diagnostics — if a search term still returns nothing after all retries, the run emits a facebook_ads_library_diagnostic record stating the exact reason (login_required, blocked, no_content, or error).
  • Facebook cookies support (recommended) — Facebook gates Ads Library search behind login on many residential IPs (live-verified 2026-08: unauthenticated sessions receive a "you must log in" page on a large share of IPs, which is why manual research shows ads but the scraper may not). Paste cookies from a logged-in browser session (Netscape cookie-file text or JSON array — export with any "Get cookies.txt" browser extension) into the cookies input for reliable, login-gated access. Without cookies, the actor still works on the subset of IPs Facebook leaves open to unauthenticated sessions.

Features

  • Search by keywords or page names
  • Filter by country, ad status, ad type, and media type
  • Extracts ad text, page info, media URLs, dates, platforms, and more
  • No login or cookies required
  • Residential proxy support for best results
  • Fresh residential IP per retry + explicit zero-result diagnostics

Input

FieldTypeDescriptionDefault
searchTermsarrayKeywords or page names to search(required)
countrystringCountry code (e.g., "US", "GB") or "ALL""ALL"
adActiveStatusstring"all", "active", or "inactive""active"
adTypestring"all", "political_and_issue_ads", "housing", "employment", "credit""all"
mediaTypestring"all", "image", "video", "meme", "none""all"
resultsPerSearchintegerMax ads per search term (1-500)50
proxyConfigurationobjectProxy settings (residential recommended)Apify residential

Output

Each ad in the dataset contains:

FieldDescription
ad_idUnique Facebook ad archive ID
page_nameName of the Facebook page running the ad
page_idFacebook page ID
ad_textAd creative text/copy
ad_snapshot_urlURL to view the ad in Facebook Ad Library
start_dateWhen the ad started running
end_dateWhen the ad stopped (if inactive)
statusActive or inactive
platformsPlatforms where the ad runs (Facebook, Instagram, etc.)
media_typeType of media (image, video, none)
media_urlURL to the ad media
cta_textCall-to-action button text
link_urlDestination URL of the ad
search_termThe search term that found this ad
scraped_atTimestamp when the data was scraped

Example Input

{
"searchTerms": ["nike", "adidas"],
"country": "US",
"adActiveStatus": "active",
"resultsPerSearch": 20
}