Facebook Ad Library Scraper - Competitor Ads & Creatives
Pricing
from $1.00 / 1,000 ad scrapeds
Facebook Ad Library Scraper - Competitor Ads & Creatives
Scrape ads from the public Facebook Ad Library. Extract ad creatives, text, headlines, spend ranges, impressions, targeting info, and more.
Pricing
from $1.00 / 1,000 ad scrapeds
Rating
0.0
(0)
Developer
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
Facebook Ad Library Scraper - Competitor Ads, Creatives & Spend
Scrape the public Facebook Ad Library in minutes. This Facebook Ad Library scraper extracts ad creatives, copy, headlines, CTAs, spend ranges, impressions, run dates, and targeting info from facebook.com/ads/library for any keyword, advertiser, or Page ID. Export to JSON, CSV, Excel, or HTML, or pull via the Apify API β no login and no API key required, because the Ad Library is a public ad transparency tool.
Built with Node.js 20, TypeScript, and the Apify SDK. It handles pagination, scrolling, and cookie consent automatically, deduplicates by ad ID, and uses Apify residential proxies with retries so runs stay reliable and repeatable.
What It Extracts
adIdβ unique Facebook ad identifieradvertiserPageNameβ name of the advertiser's Facebook pageadvertiserPageIdβ Facebook Page IDadvertiserPageUrlβ direct link to the advertiser's pageadCreativeTextβ primary ad body textadHeadlineβ ad headlineadDescriptionβ ad description textctaButtonTextβ call-to-action button textdestinationUrlβ link the ad points toadTypeβ image, video, carousel, or textimageUrlβ primary image URLimageUrlsβ all image URLsvideoThumbnailUrlβ video thumbnailvideoUrlβ direct video URLadStartDateβ when the ad started runningadEndDateβ when the ad stopped (if inactive)impressionsRangeβ viewership range (e.g. 10K-50K)spendRangeβ estimated spend in USDcountriesRunningInβ target countrieslanguagesβ ad languagesplatformsListβ where the ad runsfundingEntityβ funding entity (political ads)paidForByTextβ "Paid for by" disclosuretargetingInfoβ age, gender, location (if disclosed)adLibraryUrlβ direct link to the ad in the librarysearchQueryβ original search keywordscrapedAtβ extraction timestamp
Use Cases
- Competitor ad research β discover which ads competitors are running, their messaging, and creative formats, then benchmark against your own.
- Creative intelligence β analyze high-performing ad copy, headlines, CTAs, and image/video formats across your industry.
- Political ad monitoring β track political advertising spend, funding entities, "Paid for by" disclosures, and targeting across elections.
- Spend and impressions benchmarking β pull spend ranges and impression ranges to estimate competitor budgets and reach.
- Brand and trend tracking β monitor how brands appear in the Ad Library over time and spot new campaigns as they launch.
Pricing
This Actor uses Apify Pay Per Event pricing. You pay only for ad records successfully saved to the dataset β failed, blocked, or empty results are not billed.
| Event name | Price per event | 1,000 ads | 10,000 ads |
|---|---|---|---|
ad-scraped | $0.001 | $1.00 | $10.00 |
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
keywords | array | no | ["Nike"] | Search keywords to find ads. Searched in sequence. |
pageIds | array | no | [] | Numeric Facebook Page IDs to scrape ads for directly. |
advertiserNames | array | no | [] | Advertiser or Page names to search for. |
country | string | no | ALL | ISO 3166-1 alpha-2 code (e.g. US, GB, DE) or ALL. |
adCategory | string | no | all | One of all, issues_elections_politics, housing, employment, credit, political. |
adStatus | string | no | active | One of active, inactive, all. |
platforms | array | no | all four | facebook, instagram, messenger, audience_network. |
maxResults | integer | no | 20 | Max ads per search query (0 = unlimited, up to 1000). |
proxyConfiguration | object | no | Residential | Apify proxy settings. Residential recommended. |
Example Input
{"keywords":["Nike"],"country":"US","adStatus":"active","maxResults":50,"proxyConfiguration":{"useApifyProxy":true,"apifyProxyGroups":["RESIDENTIAL"]}}
How to Scrape the Facebook Ad Library (Step by Step)
- Click Try for free / Run.
- Enter search keywords, advertiser names, or numeric Page IDs.
- Optionally set a
country,adCategory,adStatus, andplatformsfilter. - Set
maxResults(start small, like 20, to test). - Run, then export the results as JSON, CSV, Excel, or HTML, or pull them via the Apify API.
Sample Output
{"adId":"1234567890123456789","advertiserPageName":"Nike","advertiserPageId":"150849945690582","advertiserPageUrl":"https://www.facebook.com/profile.php?id=150849945690582","adCreativeText":"Just Do It. New collection available now.","adHeadline":"Shop Now","adDescription":"Explore the latest Nike styles","ctaButtonText":"Shop Now","destinationUrl":"https://www.nike.com/new-releases","adType":"image","imageUrl":"https://scontent.xx.fbcdn.net/v/example.jpg","imageUrls":["https://scontent.xx.fbcdn.net/v/example.jpg"],"videoThumbnailUrl":null,"videoUrl":null,"adStartDate":"2024-01-15","adEndDate":null,"impressionsRange":"10K-50K","spendRange":"$1,000-$5,000","countriesRunningIn":["US"],"languages":["en"],"platformsList":["facebook","instagram"],"fundingEntity":null,"paidForByText":null,"targetingInfo":{"age":null,"gender":null,"location":null},"adLibraryUrl":"https://www.facebook.com/ads/library/?id=1234567890123456789","scrapedAt":"2024-06-10T12:00:00.000Z","searchQuery":"Nike"}
How It Works
- Validates the input and builds Ad Library search URLs from your keywords, advertiser names, or Page IDs.
- Navigates the public Ad Library, handling cookie consent, scrolling, and pagination automatically.
- Extracts and cleans each ad's fields, falling back to
nullwhen optional data is not disclosed. - Deduplicates results by
adId. - Charges
ad-scrapedonly after a clean record is saved, then writes it to the Apify Dataset.
Known Limits
- Many fields are conditional.
spendRange,impressionsRange,fundingEntity,paidForByText, andtargetingInfoare typically populated only for political/issue ads where Meta discloses them; commercial ads often returnnullfor these. - The Ad Library exposes up to roughly 1,000 ads per search, so
maxResultsis capped at 1000. - Field availability and layout depend on what Meta makes public and can change if the Ad Library changes.
Ethics & Legal
This Actor scrapes public data only from Facebook's Ad Library, a transparency tool Meta provides for public-interest research and ad transparency. No Facebook login or authentication is used and no personal data is collected. You are responsible for complying with Meta's terms, privacy laws, GDPR, and local regulations wherever you use the data.
License
Apache-2.0. See LICENSE.
