Facebook Ad Library Scraper
Pricing
from $4.00 / 1,000 ads
Facebook Ad Library Scraper
Scrape ads from the public Facebook Ad Library by keyword, advertiser page and country: ad text, CTA, landing URL, images, videos, run dates and platforms. No login or cookies. Pay only for ads returned.
Pricing
from $4.00 / 1,000 ads
Rating
0.0
(0)
Developer
Muhammad Noman Riaz
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
What does Facebook Ad Library Scraper do?
Facebook Ad Library Scraper collects ads from the public Meta Ad Library, the transparency site where Meta lists ads that run on Facebook, Instagram, Messenger, Threads, WhatsApp and the Audience Network. Search by keyword, by advertiser page id, or paste Ad Library search URLs, and filter by country, active or inactive status, ad category and media type. For every ad you get the advertiser page and its link, the run dates, the platforms it ran on, the ad text, headline, link description, call to action, the landing URL and the image and video URLs, plus how many versions of the ad exist. For political and issue ads, you also get the spend range, impressions range, reach and who paid for the ad when Facebook shows them. It works without a Facebook account, cookies or API token. Use it for competitor ad research, creative inspiration, market research and lists of brands that advertise on Meta.
How to use it
- Add one or more keywords (for example
running shoes), advertiser page ids, or Ad Library URLs. - Pick a country and, if you like, active status, ad category and media type.
- Set Max ads per search and start the run.
- Download the ads as JSON, CSV, Excel or HTML, or read them through the Apify API.
Input
| Field | Type | Default | Description |
|---|---|---|---|
searchQueries | array of strings | Keywords, as typed in the Ad Library search box. Each keyword is one search. | |
pageIds | array of strings | Numeric Facebook page ids. Each returns that advertiser's ads (the Ad Library view_all_page_id view). | |
startUrls | array of URLs | Ad Library search URLs with q or view_all_page_id. Their country and filters are kept. Other URLs are skipped. | |
country | string | US | Two letter ISO code such as US, GB, DE, or ALL. |
activeStatus | string | all | all, active or inactive. |
adType | string | all | all, political_and_issue_ads, housing_ads, employment_ads, credit_ads or financial_products_and_services_ads. |
mediaType | string | all | all, image, video, meme, image_and_meme or none. |
maxAdsPerQuery | integer | 50 | Maximum ads per keyword, page id or URL. |
maxConcurrency | integer | 3 | Searches run at the same time. |
maxRequestRetries | integer | 6 | Attempts per search, each on a new proxy IP. A retry continues where the last one stopped. |
proxy | object | Residential | Proxy settings. Residential proxies are recommended. |
Input example
{"searchQueries": ["running shoes"],"pageIds": ["20662169998"],"startUrls": [{ "url": "https://www.facebook.com/ads/library/?active_status=inactive&ad_type=all&country=US&q=protein%20powder&search_type=keyword_unordered&media_type=all" }],"country": "US","activeStatus": "all","adType": "all","mediaType": "all","maxAdsPerQuery": 60,"proxy": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }}
Output
One dataset item per ad. This item is from a real local run (search protein powder, inactive ads, country US). Long CDN query strings are shortened with ....
{"adArchiveId": "3683258205282107","adUrl": "https://www.facebook.com/ads/library/?id=3683258205282107","pageId": "102964152719743","pageName": "Wellcore - Wellversed Brand","pageUrl": "https://www.facebook.com/100090438782097/","pageProfilePicture": "https://scontent.flhe39-1.fna.fbcdn.net/v/t39.35426-6/410769028_1763995944026267_2344153979246753343_n.jpg?...","isActive": false,"startDate": "2023-12-14T08:00:00.000Z","endDate": "2026-02-03T08:00:00.000Z","platforms": ["facebook", "instagram", "audience_network"],"format": "VIDEO","adText": "Step Beyond the Ordinary: Embrace the Next-Generation Energy Formula to Surpass All Limits.","title": null,"linkDescription": null,"cta": null,"landingUrl": null,"media": [{"type": "video","url": "https://video.flhe39-1.fna.fbcdn.net/o1/v/t2/f2/m560/AQPSX-2UlapsHNvHMmDBN7p1P45V1jEnVBRLwlXhVx_Gx-lha6nF-h9gZo-VYZgFilWZjLaF0ztk8F9-AneOolEGkZ8AN7WNuvk.mp4?...","previewImageUrl": "https://scontent.flhe39-1.fna.fbcdn.net/v/t39.35426-6/410784844_322318904009450_6190459882608289908_n.jpg?..."}],"collationCount": 1,"paidBy": null,"disclaimer": null,"searchQuery": "protein powder","scrapedAt": "2026-10-17T17:43:13.395Z"}
Output fields
| Field | Description |
|---|---|
adArchiveId, adUrl | Ad Library id and the public link to the ad. |
pageId, pageName, pageUrl, pageProfilePicture | The advertiser's Facebook page. |
isActive, startDate, endDate | Status and run dates in ISO format. For active ads endDate is the latest day Facebook reports. |
platforms | Where the ad ran: facebook, instagram, audience_network, messenger, threads, whatsapp. |
format | Facebook's display format: IMAGE, VIDEO, CAROUSEL, DCO, DPA and others. |
adText, title, linkDescription, cta | Ad copy. For catalog ads with {{product.name}} style templates, the first real card is used. |
landingUrl | Destination link, with l.facebook.com redirects removed. |
media | Images and videos: { type, url }, plus previewImageUrl for videos. Carousel and catalog cards are included. |
collationCount | Number of versions of this ad, when Facebook groups them. |
paidBy, disclaimer | "Paid for by" text and label, mostly on political and issue ads. |
spend, currency, impressions, reachEstimate | Only present when Facebook shows them, which is mainly political and issue ads. |
searchQuery, scrapedAt | The keyword or page id that found the ad, and when it was scraped. |
Pricing
$4 per 1,000 ads returned. An ad found by more than one of your searches in the same run is returned and charged once. Searches that fail are not charged.
FAQ
Do I need a Facebook account or API token?
No. The scraper opens the public Ad Library as a logged-out visitor. It uses no Facebook login, no account cookies and no Ad Library API token.
Which countries can I search?
Any country the Ad Library offers, by its two letter ISO code (for example US, GB, DE, BR), or ALL for every country. Each search uses one country.
Can I see ad spend?
Only for political and issue ads (and other ads where Facebook shows it to logged-out visitors). For those ads you get the spend range, currency, impressions range, estimated reach and who paid. Facebook does not show spend for regular commercial ads, so the scraper cannot return it.
How do I find a page id?
Open the advertiser in the Ad Library and click "See all ads". The number after view_all_page_id= in the address bar is the page id. You can also paste that whole URL into Ad Library URLs.
Why do I get fewer ads than the maximum?
The Ad Library shows a limited list for each search, and some searches simply have fewer matching ads. The run log and the FAILED_ITEMS record in the key-value store say why a search stopped.
Is there a LinkedIn version?
Yes. LinkedIn Ad Library Scraper returns ads from LinkedIn's public Ad Library with matching field names such as adUrl, adText, cta and landingUrl, so you can compare both channels side by side.
Known limits
- Demographic and regional breakdowns of political ads are not included. Facebook shows them only in each ad's detail view, which this scraper does not open.
- Plain facebook.com page URLs (for example
https://www.facebook.com/Saucony/) are not resolved to page ids. Use the page id or the Ad Library "See all ads" URL. - Single ad URLs (
/ads/library/?id=...) are not supported as input. - Facebook loads the Ad Library through a small browser check, so the scraper runs a real Chrome browser with images, styles and scripts blocked. It is slower than plain HTTP scrapers.
- If Facebook asks for a captcha or shows a login wall, that attempt is dropped and retried on a new proxy IP. The scraper never solves captchas.
- Media URLs are signed Facebook CDN links that expire after some days. Download the files soon after the run if you need them.
- Facebook can change the Ad Library at any time, which may break the scraper until it is updated.