Facebook Ads Library Scraper
Pricing
$0.15 / 1,000 ads
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
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
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,videoUrlsand dates are top-level fields. The original record stays underraw. - 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
startDateis checked against your cutoff, and pagination continues until enough qualifying ads are found. - Details and EU reach. Turn on
includeDetailsfor advertiser transparency andeu_total_reachwhere 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 recordsdetailsError. - 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}
| Field | Default | Notes |
|---|---|---|
searchQueries | Keyword searches, one per line | |
startUrls | Ad Library search URLs or Facebook page URLs | |
country | US | ISO country code for keyword searches |
activeStatus | active | active, all, inactive |
mediaType | all | all, image, video, meme, none |
maxAdsPerSource | 100 | 1 to 5,000 per query or URL |
includeDetails | false | One extra request per ad |
includeAboutPage | false | One request per advertiser |
onlyAdsNewerThan | YYYY-MM-DD or 7 days | |
onlyAdsOlderThan | YYYY-MM-DD or 2 weeks | |
sorting | total_impressions | Or relevancy_monthly_grouped |
maxPagesPerSource | 0 | 0 means automatic |
maxRequests | 0 | 0 means automatic |
maxRetries | 4 | 0 to 10 |
backoffBaseSecs | 2 | Doubles per attempt |
proxyConfiguration | Apify Proxy | Residential 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.
maxAdsPerSourceis 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
MANIFESTbefore 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,
MANIFESTreportsPARTIALwithspending_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.