Facebook Ad Library Scraper
Pricing
Pay per usage
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
Actor stats
0
Bookmarked
2
Total users
2
Monthly active users
3 days ago
Last modified
Categories
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
| Field | Type | Description |
|---|---|---|
searchQuery | string | Required. Keyword or phrase (e.g. brand name). |
country | string | ISO country code (default US) or ALL. |
adType | enum | all or political_and_issue_ads. |
activeStatus | enum | active, inactive, or all. |
maxResults | integer | Cap between 1 and 5000 (default 100). |
proxy | object | Optional Apify proxy configuration. |
Output (dataset items)
Each record includes (camelCase):
adArchiveId,collationId,pageIdpageName,pageProfileUrl,pageProfilePictureUrlbodyText,title,linkUrl,ctaText,displayFormatcreatedAt(ISO UTC),imageUrls,videoUrlscollationCount,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-scraperpython3 -m venv .venv && source .venv/bin/activatepip install -r requirements.txtpython -m patchright install chromium# Headful local debug (optional)export HEADLESS=0python3 -c "import asynciofrom src.scraper import scrape_ad_libraryasync 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=0for 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.
Legal
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.