Facebook Ads Library Scraper
Pricing
from $1.50 / 1,000 results
Facebook Ads Library Scraper
Search the Meta Ad Library by keyword, advertiser page or pasted link, any country, active or past ads. Each ad comes back as one row with archive ID, advertiser, dates, platforms, ad text, headline, link, call to action, format and media links.
Pricing
from $1.50 / 1,000 results
Rating
0.0
(0)
Developer
Philip Kirkbride
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
Search the Meta Ad Library (facebook.com/ads/library) the way you do on the site: type a keyword, open an advertiser's page of ads, or paste a search link you already filtered. Every ad comes back as one clean row with its Ads Library ID and link, the advertiser's name, page and like count, the dates it started and stopped running, the platforms it runs on (Facebook, Instagram, Messenger, Audience Network, Threads, WhatsApp), the ad text, headline, link, call to action and format, plus links to its images, videos and carousel cards.
Results page through automatically up to your limit, so one search can return hundreds of ads instead of the first screen. No Facebook account is needed.
Use cases
- Competitor ad research: list every ad a competitor is running right now, with the text, offer, landing page and call to action they test.
- Creative inspiration: collect ads for a keyword or niche and study the hooks, formats and media that keep running for months.
- Market and trend monitoring: re-run the same searches on a schedule and see which advertisers start, stop or scale campaigns.
- Lead generation: find businesses that advertise in your market, with their page links and landing pages.
- Political and issue ad tracking: collect ads with their paid-for-by line, and spend and impression ranges where the Ads Library publishes them.
Quick Start
{"searchTerms": ["running shoes"],"country": "US","activeStatus": "active","maxItemsPerSearch": 50}
Every ad of one advertiser, in every country, running or stopped:
{"pageIds": ["15087023444"],"country": "ALL","activeStatus": "all","maxItemsPerSearch": 200}
Input
| Input | Type | Default | Meaning |
|---|---|---|---|
searchTerms | array | [] | Keywords to search ad text for, as you would type them in the Ads Library search box. Each term is one search. |
pageIds | array | [] | Numeric advertiser page IDs. Each one lists that advertiser's ads. You find the ID in an Ads Library link after view_all_page_id=. |
adLibraryUrls | array | [] | Search or advertiser links copied from facebook.com/ads/library. The country, ad status and media type inside each link are used for that link. |
country | string | US | Two-letter country code where the ads were shown (US, GB, DE, BR...), or ALL for every country. |
activeStatus | string | active | active (running now), inactive (stopped) or all. |
mediaType | string | all | all, image, video, meme, image_and_meme or none (ads without an image or video). |
maxItems | integer | empty | Optional total ad limit across all searches; empty means no extra run-wide limit. |
maxItemsPerSearch | integer | 100 | Stop each search after this many ads, up to 5,000. |
You can mix search terms, page IDs and links in one run. Ads already returned by an earlier search in the same run are not repeated.
Example queries
{"searchTerms": ["meal kit", "protein powder"], "maxItemsPerSearch": 300}: up to 300 running US ads for each keyword.{"searchTerms": ["solar panels"], "country": "GB", "mediaType": "video"}: video ads about solar panels shown in the UK.{"pageIds": ["15087023444"], "activeStatus": "all", "country": "ALL"}: the advertiser's full ad history across countries.{"adLibraryUrls": ["https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=DE&q=versicherung&search_type=keyword_unordered&media_type=all"]}: a search you set up on the site, pasted as is.
What it returns
The dataset contains one row per ad:
| Field | Meaning |
|---|---|
kind | ad for every dataset row. |
adArchiveId, adLibraryUrl | The Ads Library ID of the ad and its link in the Ads Library. |
pageId, pageName, pageProfileUrl, pageProfilePictureUrl | The advertiser's page. |
pageLikeCount, pageCategories | Page likes and categories, as shown with the ad. |
isActive, startDate, endDate | Whether the ad is running, the date it started and the date it stopped (or the latest date it was seen running), YYYY-MM-DD. |
publisherPlatforms | Where it runs: facebook, instagram, messenger, audience_network, threads, whatsapp. |
displayFormat | IMAGE, VIDEO, CAROUSEL, DCO (dynamic creative), DPA (product catalog) and so on. |
body, title, linkDescription, caption | The ad text, headline, link description and the domain shown on the ad. |
linkUrl, ctaText, ctaType | Where the ad leads and its call-to-action button. |
images | Image links, each with originalUrl and resizedUrl. |
videos | Video links, each with hdUrl, sdUrl and previewImageUrl. |
cards | Carousel and catalog cards, each with its own title, body, linkUrl, linkDescription, caption, ctaText, ctaType and image or video links. |
collationId, collationCount | Shared ID and count when several ads use the same creative. |
categories | Special ad categories (for example POLITICAL, HOUSING) when declared. |
containsSensitiveContent | Whether the Ads Library marks the ad as sensitive. |
spend, currency, impressions, reachEstimate | Ranges published for political and issue ads; empty for other ads. |
disclaimer | The paid-for-by line, when the ad carries one. |
searchTerm, searchPageId, searchCountry, searchUrl | The search this row came from. |
scrapedAt | Collection time (UTC). |
The run summary (OUTPUT) lists each search with the number of ads and pages returned, whether it reached the end or your limit, and any error. Searches that failed or stopped early are listed in OUTPUT.searchErrors with the number of ads they delivered before stopping. After three searches in a row are refused or slowed down without returning ads, or when the run cannot renew access, it stops. OUTPUT.stoppedBy records why; OUTPUT.skippedSearches lists searches not attempted, which are not charged.
Output example
{"kind": "ad","adArchiveId": "1702938977100376","adLibraryUrl": "https://www.facebook.com/ads/library/?id=1702938977100376","pageId": "15087023444","pageName": "Nike","pageProfileUrl": "https://www.facebook.com/nike/","pageProfilePictureUrl": "https://scontent-phl2-1.xx.fbcdn.net/v/t39.35426-6/431756959_712871054375981_n.jpg","pageLikeCount": 39500444,"pageCategories": ["Sportswear", "Product/service"],"isActive": true,"startDate": "2025-04-07","endDate": "2026-10-19","publisherPlatforms": ["facebook", "instagram", "audience_network", "messenger"],"displayFormat": "DPA","body": "Bring sports more fully into your day with the Nike App.","title": "{{product.name}}","linkUrl": "http://itunes.apple.com/app/id1095459556","linkDescription": null,"caption": "itunes.apple.com","ctaText": "Install now","ctaType": "INSTALL_MOBILE_APP","images": [],"videos": [],"cards": [{"title": "Nike Run Swift 3 Women's Road Running Shoes","body": "Bring sports more fully into your day with the Nike App.","linkUrl": "https://www.nike.com/ph/t/run-swift-3-road-running-shoes-2fHbzp/DR2698-002","linkDescription": "₱3,995","caption": "itunes.apple.com","ctaText": "Install Now","ctaType": "INSTALL_MOBILE_APP","originalImageUrl": "https://scontent-phl2-1.xx.fbcdn.net/v/t39.35426-6/431679131_949214166636263_n.jpg","resizedImageUrl": "https://scontent-phl2-1.xx.fbcdn.net/v/t39.35426-6/431679131_949214166636263_s600x600.jpg","videoHdUrl": null,"videoSdUrl": null,"videoPreviewImageUrl": null}],"collationId": null,"collationCount": null,"categories": [],"containsSensitiveContent": false,"spend": null,"currency": null,"impressions": null,"reachEstimate": null,"disclaimer": null,"searchTerm": null,"searchPageId": "15087023444","searchCountry": "ALL","searchUrl": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=ALL&media_type=all&search_type=page&view_all_page_id=15087023444","scrapedAt": "2026-10-20T05:41:00+00:00"}
Image and video links are shortened here; real links are longer and expire after some days, so download media you want to keep soon after the run.
Good to know
- Results come in the Ads Library's own order. Keyword searches match ad text, so broad words return many advertisers.
titleandbodyof catalog ads (DPA) can hold placeholders such as{{product.name}}; the real product names are incards.- Spend, impressions and reach are only published by the Ads Library for political and issue ads (and some regulated regions); they are empty otherwise.
- Ads already returned by an earlier search in the same run are skipped, so overlapping searches do not return duplicates.
- If a search stops early, the ads it already returned are kept and the reason is shown in the run summary. If no search returns any ad because of an error, the run fails with a clear message instead of finishing empty. A search with no matching ads is reported in the run summary as no results and is not charged.
maxItemsPerSearchgoes up to 5,000 ads per search. Large searches take a few minutes per thousand ads.- Automated access is subject to Meta's terms; use this actor only where you have the necessary permissions and a lawful basis.
Pricing
You pay per ad returned plus a small start event for each run. The start event is charged per GB of memory, so the default 4096 MB run is four start events. See the Actor's Pricing tab on Apify for current rates. Searches that fail are not charged, and the run summary is free. Start with a small maxItemsPerSearch and check the run cost before scheduling larger collections.