Facebook Ad Library Scraper avatar

Facebook Ad Library Scraper

Pricing

Pay per usage

Go to Apify Store
Facebook Ad Library Scraper

Facebook Ad Library Scraper

Scrape Facebook Ad Library for ad creatives, spend data, advertiser info, and targeting. Search any keyword, advertiser, or country. No login needed — fully public data.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

kane liu

kane liu

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

2

Monthly active users

3 days ago

Last modified

Share

Scrape Meta (Facebook) Ad Library for public ad creatives, advertiser pages, copy, images, and video URLs. Search by keyword, country, ad type, and active status. No Facebook login required — data comes from Meta’s transparency library.

Local-first: Core scraping runs via src.scraper.scrape_ad_library (Patchright) on your machine. Publishing to Apify (apify push) is optional — only when you want a hosted Actor build.

SEO: Facebook Ad Library scraper, Facebook ads scraper, Meta Ad Library, ad creative scraper, ad intelligence, competitor ads, Facebook advertising data, ad spy tool, Meta transparency ads.

Features

  • Keyword search across the Ad Library
  • Filters: country (ISO code or ALL), political vs all ads, active / inactive / all
  • Pagination via infinite scroll with GraphQL capture
  • First-screen SSR extraction plus live GraphQL responses for additional ads
  • Optional Apify Proxy for large or sensitive runs
  • Structured output: advertiser, body text, titles, CTAs, image URLs, video URLs, archive IDs

Input

FieldTypeDescription
searchQuerystringRequired. Keyword or phrase (e.g. brand name).
countrystringISO country code (default US) or ALL.
adTypeenumall or political_and_issue_ads.
activeStatusenumactive, inactive, or all.
maxResultsintegerCap between 1 and 5000 (default 100).
proxyobjectOptional Apify proxy configuration.

Output (dataset items)

Each record includes (camelCase):

  • adArchiveId, collationId, pageId
  • pageName, pageProfileUrl, pageProfilePictureUrl
  • bodyText, title, linkUrl, ctaText, displayFormat
  • createdAt (ISO UTC), imageUrls, videoUrls
  • collationCount, isActive, scrapedAt

Usage examples

Example 1 — Brand monitoring (US, active ads)

{
"searchQuery": "shopify",
"country": "US",
"activeStatus": "active",
"adType": "all",
"maxResults": 100
}

Example 2 — All countries, larger sample

{
"searchQuery": "crm software",
"country": "ALL",
"activeStatus": "active",
"maxResults": 250
}

Example 3 — Political ads only

{
"searchQuery": "climate",
"country": "GB",
"adType": "political_and_issue_ads",
"activeStatus": "all",
"maxResults": 50
}

Pricing (Apify Store)

Pay-per-event model (example configuration — check the Store for current numbers):

  • Actor start — small fixed fee per run
  • Per result — per ad row written to the default dataset

Target positioning: competitive vs official Ad Library actors, with reliable creative fields and stable runs using browser + GraphQL capture.

Local development

cd sip-facebook-ad-library-scraper
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python -m patchright install chromium
# Headful local debug (optional)
export HEADLESS=0
python3 -c "
import asyncio
from src.scraper import scrape_ad_library
async def t():
ads = await scrape_ad_library('shopify', country='US', max_results=10)
print(len(ads), ads[0] if ads else None)
asyncio.run(t())
"

Optional: publish to Apify

Requires Apify CLI and APIFY_TOKEN in the environment:

apify login # or export APIFY_TOKEN=...
apify push

Skip this if you only need local runs.

Notes

  • Runs use Patchright (Chromium). Apify Cloud uses headless Chromium; locally you can set HEADLESS=0 for debugging.
  • Meta may change HTML/GraphQL shapes; prefer reporting failing runs with sample input.
  • Rate & fairness: scrape only what you need; respect Meta’s terms and applicable laws.

This Actor collects publicly published information from Meta’s Ad Library (transparency / political & advertising disclosures). You are responsible for compliance with Meta’s terms, API/site policies, and laws in your jurisdiction (copyright, publicity, data protection, election law, etc.). This tool does not bypass authentication for non-public data.

Support

Issues: use the Apify Actor issue tracker or your workspace support channel.