Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Try for free

2 hours trial then $15.00/month - No credit card required now

Go to Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

memo23/facebook-ads-library-scraper-cheerio
Try for free

2 hours trial then $15.00/month - No credit card required now

Stealthily decode competitors' Facebook ad strategies in real-time—scrape active campaigns, creatives, and audience targeting data with residential proxies. Gain actionable insights, track trends, and optimize your ads using their winning tactics, undetected.

Scrape active Facebook ads with filters like keywords, dates, media type, and country


Overview

This actor scrapes Facebook's Ads Library to extract detailed information about active advertising campaigns. Ideal for marketers, competitors, and researchers analyzing ad strategies. Supports filtering by:

  • Keywords/phrases (e.g., "free shipping")
  • Date ranges (up to 2025-02-15)
  • Media types (video/image/text)
  • Countries (e.g., GB for UK-targeted ads)
  • Ad status (active/inactive)

Features

  • Precision Filtering: Target ads by 10+ criteria including media type, country, and exact keywords
  • Dynamic Delays: Randomized delays (5-10s) between API calls to avoid detection
  • Residential Proxies: Built-in Apify residential proxy rotation
  • Retry Resilience: 100 retries per failed request
  • Concurrency Control: Process 1-10 pages simultaneously
  • Historical Range: Scrape ads up to future dates (2025-02-15 supported)

How to Use

  1. Configure Input: Set your filters in the input JSON (see configuration below)
  2. Run via Apify: Execute the actor on Apify platform
  3. Export Data: Download results as JSON, CSV, or Excel
  4. Analyze: Track ad creatives, sponsors, and run dates

Input Configuration

1{
2    "startUrls": [
3        "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=GB&is_targeted_country=false&media_type=video&q=%22free%20shipping%22&search_type=keyword_exact_phrase&start_date[min]&start_date[max]=2025-02-15"
4    ],
5    "maxItems": 100,
6    "minDelay": 5,
7    "maxDelay": 10,
8    "maxConcurrency": 10,
9    "minConcurrency": 1,
10    "maxRequestRetries": 100,
11    "proxy": {
12        "useApifyProxy": true,
13        "apifyProxyGroups": ["RESIDENTIAL"]
14    }
15}

Input Parameters

ParameterTypeDescriptionDefault
startUrlsArrayFacebook Ads Library URLs with your filters pre-appliedRequired
maxItemsIntegerMax ads to scrape per run100
minDelayIntegerMinimum delay (seconds) between API calls5
maxDelayIntegerMaximum delay (seconds) between API calls10
maxConcurrencyIntegerMax parallel page processing threads10
minConcurrencyIntegerMinimum parallel threads1
maxRequestRetriesIntegerRetry attempts for failed requests100
proxyObjectResidential proxy configurationApify Proxy

Output Structure

Basic Ad Information

FieldTypeDescription
FB AD LinkStringDirect URL to ad in Facebook's Transparency Library
FB LinkStringPermanent link to advertiser's Facebook profile/page
Company NameStringRegistered name of advertising entity
WebsiteStringDestination URL promoted in the ad

Ad Identification

FieldTypeDescription
ad_archive_idStringFacebook's internal archive identifier (unique per ad)
ad_idNullLegacy field (deprecated by Facebook)
collation_idStringGroup ID for related ads in same campaign
collation_countIntegerNumber of ads in this campaign group
page_idStringUnique Facebook ID of advertiser's page

Ad Status & Timing

FieldTypeDescription
is_activeBooleantrue = Currently running, false = Inactive
start_dateIntegerUnix timestamp (seconds) of ad start date
end_dateIntegerUnix timestamp (seconds) of planned end date
total_active_timeNullDuration field (often restricted)

Ad Content & Format

FieldTypeDescription
snapshot.body.textStringFull text content of ad
snapshot.titleStringHeadline/title of ad
snapshot.display_formatStringVIDEO, IMAGE, CAROUSEL, etc
snapshot.cta_textStringCall-to-action button text ("Shop Now", etc)
snapshot.link_urlStringDestination URL when clicking ad
snapshot.videosArrayVideo assets (HD/SD URLs, preview images)
snapshot.imagesArrayStatic image URLs (empty for video ads)

Page/Advertiser Insights

FieldTypeDescription
page_nameStringName of Facebook page running ad
page_like_countIntegerTotal page followers/likes
page_profile_picture_urlStringCurrent profile image URL (expires in 24h)
page_profile_uriStringDirect link to page profile
page_categoriesArrayFacebook's classification (e.g., ["Book"])

Technical Metadata

FieldTypeDescription
entity_typeStringPERSON_PROFILE (individual) or BUSINESS
publisher_platformArrayPlatforms where ad appears (FACEBOOK, INSTAGRAM, etc)
contains_digital_created_mediaBooleantrue if contains AI-generated media
gated_typeStringAge/gender gating status (ELIGIBLE/INELIGIBLE)
is_aaa_eligibleBooleanAuto-applied ads eligibility
hide_data_statusStringNONE = Full visibility, other values indicate partial hiding

Compliance & Regulations

FieldTypeDescription
political_countriesArrayCountries where ad is classified as political
regional_regulation_dataObjectFinancial service (finserv) and scam prevention (tw_anti_scam) flags
state_media_run_labelNullFor government-affiliated ads (restricted)

User Interaction Data

FieldTypeDescription
report_countNullNumber of user reports (often restricted)
has_user_reportedBooleantrue if current user flagged this ad

Monetization & Reach

FieldTypeDescription
spendNullAd budget (restricted for non-political ads)
reach_estimateNullPotential audience size (restricted)
currencyStringEmpty unless spend data available

System Flags

FieldTypeDescription
contains_sensitive_contentBooleanFacebook's NSFW detection flag
hidden_safety_dataBooleantrue if restricted for policy violations
fev_infoNullFact-checking verification data (restricted)

Miscellaneous

FieldTypeDescription
categoriesArrayLegacy categorization (["UNKNOWN"] common)
menu_itemsArrayContext menu options (empty in API response)
targeted_or_reached_countriesArrayGeo-targeting list (often empty)

Key Notes

  1. Timestamps: Convert Unix values (e.g., 17346816002024-12-20T00:00:00Z)
  2. Null Fields: Indicate restricted data per Facebook's policies
  3. Media URLs: Expire quickly - download within 24 hours
  4. Political Ads: Requires special permissions to access spend/reach data

Key fields will include:

  • Ad creative (text/images/video URLs)
  • Sponsor page details
  • Impressions estimate
  • Active dates
  • Targeting parameters
  • Call-to-action buttons
  • Political disclaimer (if applicable)

Why This Scraper?

  • Compliance: Follows Facebook's rate limits and robots.txt
  • Stealth: Residential proxies + random delays mimic human behavior
  • Depth: Captures 30+ data points per ad including edits history
  • Future-Proof: Handles Facebook's frequent UI/API changes

Use Cases

  • Track competitor ad strategies in real-time
  • Analyze seasonal campaign patterns
  • Archive political ads for transparency
  • Monitor trademark violations

Explore More Scrapers

If you found this Apify Smartbuyglasses Scraper useful, be sure to check out our other powerful scrapers and actors at memo23's Apify profile. We offer a wide range of tools to enhance your web scraping and automation needs across various platforms and use cases.

Support

Additional Services

Developer
Maintained by Community

Actor Metrics

  • 2 monthly users

  • 0 No bookmarks yet

  • >99% runs succeeded

  • Created in Mar 2025

  • Modified 2 days ago