Facebook Ads Library Scraper - Meta Ad Library & Spend
Pricing
from $0.28 / 1,000 ads
Facebook Ads Library Scraper - Meta Ad Library & Spend
Facebook Ads Library scraper for Meta's Ad Library: ads by keyword, advertiser Page or URL with text, images, videos, carousels, dates, platforms, spend, impressions and reach. Filter by country, platform, language, media and date. No login, no cookies. $0.35 per 1,000 ads.
Pricing
from $0.28 / 1,000 ads
Rating
0.0
(0)
Developer
Social Scrapers
Maintained by CommunityActor stats
0
Bookmarked
36
Total users
23
Monthly active users
10 hours ago
Last modified
Categories
Features
Share
This Facebook Ads Library Scraper extracts ads from Meta's public Ad Library (facebook.com/ads/library): search by keyword, by advertiser Page, or paste Ad Library URLs from your browser, and get every ad's text, headline, link and call to action, images, videos and carousel cards, start and end dates, active status and platforms, plus spend, impressions and "Paid for by" for political and issue ads. Filter by country, platform, language, media type, ad category and date, or sort by impressions. No Facebook account, no login, no cookies. It costs $0.35 per 1,000 ads.
💡 Need a feature that isn't here? Just ask. Open an issue on the Issues tab and tell us what you need: a new field, filter, input type or output format. We build requested features fast, usually within 24 hours, at no extra cost.
⭐ Found it useful? A short review on the Reviews tab helps other people find this scraper, and tells us what to build next.
What does Facebook Ads Library Scraper do?
- 🔎 Three ways to search: keywords (any words or an exact phrase), advertiser Pages (a Page URL, @handle or numeric Page id), and Ad Library URLs copied from your browser.
- 🎛️ Every Ad Library filter: country, ad category (all ads, or political and issue, housing, employment and credit ads), active status, media type (images, videos, memes, no media), platforms (Facebook, Instagram, Audience Network, Messenger, Threads, WhatsApp), ad language, the date range an ad was shown in, and sorting by impressions. Ad Library URLs keep all of their own filters too.
- 🖼️ The whole creative: ad text, headline, description, link, caption, call-to-action button, full-size images, HD and SD video links with their preview images, and every card of carousel, catalog and dynamic-creative ads.
- 🗳️ Political and issue ads: amount spent, impressions and estimated audience as ranges (with numeric bounds), currency, the "Paid for by" line and the contact details the advertiser submitted.
- 🇪🇺 Optional ad details: turn on
includeAdDetailsfor the audience of political and issue ads by age, gender and region; the reach, targeting, payer and beneficiary of ads shown in the European Union; and facts about the advertiser's Page (likes, Instagram followers, verification). - ♾️ No cap: collect a set number of ads per search, or every ad it lists (
maxAds: 0). - 💸 Pay only for ads delivered: searches with no results cost nothing, and the run stops cleanly at the spending limit you set.
Because it runs on the Apify platform, you also get the API, scheduling, integrations, monitoring and proxy rotation without writing any code.
What data can you extract from the Facebook Ad Library?
One dataset item per ad. Every field is always present: null, false or an empty list means the Ad Library shows nothing for it.
| Field | Type | Description |
|---|---|---|
adArchiveId | string | The ad's Ad Library id. |
adId | string or null | Facebook's own ad id, when shown (rarely). |
url | string | The ad in the Ad Library. |
pageId, pageName, pageUrl | string or null | The advertiser's Page. |
pageProfilePictureUrl | string or null | The Page's picture. |
pageLikeCount | integer or null | The Page's likes. |
pageCategories | array | The Page's categories. |
pageIsDeleted | boolean | The Page no longer exists. |
isActive | boolean | The ad is running now. |
startDate, endDate | string or null | First and last day shown, ISO 8601 UTC. For an active ad, endDate is the latest day it was seen running. |
publisherPlatforms | array | facebook, instagram, messenger, audience_network, threads, whatsapp, ... |
displayFormat | string or null | IMAGE, VIDEO, CAROUSEL, DCO (dynamic creative), DPA (catalog ad), ... |
body | string or null | The ad text. |
title, linkDescription, caption | string or null | Headline, description and display link. Catalog ads have these per product, in cards. |
linkUrl | string or null | Where the ad leads. |
ctaText, ctaType | string or null | The call-to-action button (Shop now, SHOP_NOW). |
images | array | originalUrl and resizedUrl of each image. |
videos | array | hdUrl, sdUrl and previewImageUrl of each video. |
cards | array | Carousel, catalog and dynamic-creative cards: title, body, caption, linkUrl, linkDescription, ctaText, ctaType, image and video links. |
extraTexts, extraLinks, extraImages | array | More variants of a dynamic-creative ad. |
brandedContent | object or null | The partner Page of a branded-content ad: pageId, pageName, pageUrl. |
collationId, collationCount | string / integer or null | The group of ads sharing this creative, and how many ads it has. |
categories | array | UNKNOWN, POLITICAL, HOUSING, EMPLOYMENT, CREDIT. |
byline, disclaimerLabel | string or null | The "Paid for by" line of political and issue ads. |
spend, impressions, reachEstimate | object or null | Political and issue ads: text as printed ($10K-$15K, >1M) with lowerBound and upperBound as numbers. |
currency | string or null | Currency of spend. |
targetedOrReachedCountries | array | Countries, when the Ad Library lists them. |
containsSensitiveContent, containsDigitallyCreatedMedia | boolean | Ad Library labels. |
stateMediaLabel | string or null | State-controlled media label. |
gatedType, hideDataStatus, isAaaEligible | string / boolean | Ad Library status flags (isAaaEligible: the ad carries EU transparency data). |
advertiserContact | object or null | Political and issue ads: phone, email, website, address and submittedOn as the advertiser submitted them. |
details | object or null | With includeAdDetails: ageGenderDistribution, regionDistribution (shares as fractions of 1), euTransparency (totalReach, targeted ages, gender and locations, reachByCountryAgeGender), payerBeneficiaries, and advertiser (handle, category, likes, verification, Instagram username and followers). |
input, inputType | string | The search term, Page or URL the ad came from, and which list it was in. |
scrapedAt | string | When the ad was read, ISO 8601 UTC. |
How to scrape the Facebook Ad Library
- Click Try for free (or Start) on this page.
- Add search terms (for example
running shoes), advertiser Pages (https://www.facebook.com/<page-name>), or Ad Library URLs copied from facebook.com/ads/library. - Pick the filters you need: country, active status, platforms, languages, media type, dates, sort order.
- Set Max ads per search (
0for every ad) and click Start. Each search reads about 300 ads a minute. - Download the ads from the Output tab as JSON, CSV, Excel or HTML, or read them through the API.
How much does it cost to scrape Facebook ads?
$0.35 per 1,000 ads, platform usage and proxies included. You pay one ad event for each ad saved. With includeAdDetails on, each ad saved with its details adds one ad-details event ($0.28 per 1,000), because every ad then needs one more request. A run also has Apify's standard start event, $0.00005 per run.
| Your Apify plan | Per 1,000 ads | Per 1,000 ad details |
|---|---|---|
| Free and Starter (Bronze) | $0.35 | $0.28 |
| Scale (Silver) | $0.315 (−10%) | $0.252 (−10%) |
| Business (Gold) | $0.28 (−20%) | $0.224 (−20%) |
Three examples:
- 1,000 ads for one keyword = $0.35.
- Every active ad of 10 competitors, about 2,000 ads = $0.70.
- 1,000 ads with their details = $0.35 + $0.28 = $0.63.
Searches with no results, and Pages that cannot be found, cost nothing. To cap a run's cost, set Maximum cost per run in the run options: the scraper stops cleanly once it is reached and keeps everything scraped so far. Apify's free plan comes with monthly usage credit, enough to try this scraper on thousands of ads.
Input example
Give at least one of searchTerms, pageUrls or adLibraryUrls.
{"searchTerms": ["running shoes", "meal kit"],"pageUrls": ["https://www.facebook.com/<page-name>"],"adLibraryUrls": ["https://www.facebook.com/ads/library/?active_status=all&ad_type=political_and_issue_ads&country=US&media_type=all&q=climate&search_type=keyword_unordered"],"country": "US","activeStatus": "active","mediaType": "all","platforms": ["instagram"],"languages": ["en"],"sortBy": "impressions_high","dateFrom": "30 days","maxAds": 1000,"includeAdDetails": false,"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }}
| Field | Type | Description |
|---|---|---|
searchTerms | array of strings | Keywords, one search per term, as typed into the Ad Library search box. |
pageUrls | array of strings | Advertiser Pages: https://www.facebook.com/<page-name>, an @handle, or the numeric Page id (the view_all_page_id of an Ad Library link). Share links from the Facebook app (https://www.facebook.com/share/…, fb.me/…) and links to one of the Page's posts work too. |
adLibraryUrls | array of strings | Searches copied from the address bar on facebook.com/ads/library. All their filters are kept; a link to one ad (?id=...), or an ad's Library ID on its own, returns that ad. |
country | string, default ALL | Where the ads were shown: a two-letter code such as US, GB or DE (UK is read as GB), or ALL. |
adType | string, default all | all, political_and_issue_ads, housing_ads, employment_ads or credit_ads. |
activeStatus | string, default active | active, inactive or all. |
mediaType | string, default all | all, image, video, meme, image_and_meme or none. |
exactPhrase | boolean, default false | Match search terms as an exact phrase. |
dateFrom, dateTo | string, optional | Only ads shown between these days: a date (2026-01-31, 2026-1-31, 31/01/2026, Jan 31 2026) or an age (30 days, 2w, 3 months, yesterday). With both day and month 12 or less (01/02/2026) the date is read month/day/year. An ad that started earlier but still ran in the range is included, as in the Ad Library. |
platforms | array, optional | Only ads shown on these platforms: facebook, instagram, audience_network, messenger, threads, whatsapp. Empty = all. |
languages | array, optional | Only ads in these languages: two-letter codes such as en, es, de (a name such as English works too). Empty = all. |
sortBy | string, default default | default (the Ad Library's order), impressions_high or impressions_low. |
maxAds | integer, default 100 | Ads to collect for each search term, Page and URL. 0 = every ad the search lists. |
includeAdDetails | boolean, default false | Add each ad's details (audience breakdowns, EU transparency, advertiser facts). Slower: one more request per ad. |
proxyConfiguration | object, default Apify Proxy RESIDENTIAL | Proxy settings. Keep the residential default. |
The filters (country to sortBy) apply to search terms and Pages. An Ad Library URL keeps its own filters and takes from these fields only what it does not set.
Output example
A real item from a test run, with names, texts, links and ids replaced by placeholders and long media links shortened:
{"adArchiveId": "<ad-id>","adId": null,"url": "https://www.facebook.com/ads/library/?id=<ad-id>","pageId": "<page-id>","pageName": "<advertiser name>","pageUrl": "https://www.facebook.com/<page-name>/","pageProfilePictureUrl": "https://scontent.xx.fbcdn.net/v/<image-path>.jpg?<signed-parameters>","pageLikeCount": 3400,"pageCategories": ["Community Center"],"pageIsDeleted": false,"isActive": true,"startDate": "2026-06-01T07:00:00.000Z","endDate": "2026-11-07T08:00:00.000Z","publisherPlatforms": ["facebook", "instagram"],"displayFormat": "IMAGE","body": "<ad text>","title": "<headline>","caption": "<shop-domain>","linkUrl": "https://<shop-domain>/<landing-page>","linkDescription": "<link description>","ctaText": "Learn more","ctaType": "LEARN_MORE","images": [{"originalUrl": "https://scontent.xx.fbcdn.net/v/<image-path>.jpg?<signed-parameters>","resizedUrl": "https://scontent.xx.fbcdn.net/v/<image-path>.jpg?stp=dst-jpg_s600x600&<signed-parameters>"}],"videos": [],"cards": [],"extraTexts": [],"extraLinks": [],"extraImages": [],"brandedContent": null,"collationId": "<group-id>","collationCount": 1,"categories": ["UNKNOWN"],"byline": null,"disclaimerLabel": null,"spend": null,"currency": null,"impressions": null,"reachEstimate": null,"targetedOrReachedCountries": [],"containsSensitiveContent": false,"containsDigitallyCreatedMedia": false,"stateMediaLabel": null,"gatedType": "ELIGIBLE","hideDataStatus": "NONE","isAaaEligible": true,"advertiserContact": null,"details": null,"input": "running shoes","inputType": "searchTerm","scrapedAt": "2026-11-08T02:19:21.282Z"}
A political ad carries its spend and reach, and with includeAdDetails its audience:
{"categories": ["POLITICAL"],"byline": "<paid for by>","disclaimerLabel": "PAID_FOR_BY","spend": { "text": "€7K-€8K", "lowerBound": 7000, "upperBound": 8000 },"currency": "EUR","impressions": { "text": ">1M", "lowerBound": 1000000, "upperBound": null },"reachEstimate": { "text": ">1M", "lowerBound": 1000000, "upperBound": null },"advertiserContact": { "phone": "<phone>", "email": "<email>", "website": "<website>", "address": "<city, region>", "submittedOn": "Submitted on 30 Mar 2022" },"details": {"ageGenderDistribution": [{ "ageRange": "18-24", "female": 0.13, "male": 0.4, "unknown": 0 },{ "ageRange": "25-34", "female": 0.04, "male": 0.21, "unknown": 0 }],"regionDistribution": [{ "region": "Uttar Pradesh", "share": 0.11 },{ "region": "Maharashtra", "share": 0.09 }],"euTransparency": null,"payerBeneficiaries": [],"advertiser": { "pageAlias": "<handle>", "pageCategory": "Organisation", "pageLikes": 1250000, "pageVerification": "BLUE_VERIFIED", "entityType": "PERSON_PROFILE", "about": "<about text>", "profilePhotoUrl": "<image link>", "coverPhotoUrl": "<image link>", "instagramUsername": "<handle>", "instagramFollowers": 830000, "instagramVerified": true }}}
Use cases
- Competitor ad research: see every ad a competitor is running right now, in which countries and on which platforms, and how long each one has been live.
- Creative inspiration: collect hooks, headlines, calls to action, images and videos that work in your niche, and study long-running ads (the ones advertisers keep paying for).
- Market and trend monitoring: run a search on a schedule and track which new ads appear for a keyword or a set of advertisers.
- Political ad transparency: follow spend, reach and audience of ads about social issues, elections or politics, by advertiser or topic.
- Datasets: gather ad copy and media for analysis, classification or training data.
Use Facebook Ads Library Scraper via API, Python, JavaScript and integrations
Run the scraper from your own code with the Apify API or an Apify client:
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'MY-APIFY-TOKEN' });const run = await client.actor('socialscrapers/facebook-ads-library-scraper').call({searchTerms: ['running shoes'],country: 'US',maxAds: 1000,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
from apify_client import ApifyClientclient = ApifyClient("MY-APIFY-TOKEN")run = client.actor("socialscrapers/facebook-ads-library-scraper").call(run_input={"searchTerms": ["running shoes"], "country": "US", "maxAds": 1000})for ad in client.dataset(run["defaultDatasetId"]).iterate_items():print(ad["pageName"], ad["startDate"], ad["body"])
- Schedules: run a search every day and track which new ads appear for a keyword or a set of advertisers.
- Integrations: send the ads to Google Sheets, Slack, Airtable, Make, Zapier or n8n, or trigger your own webhook when a run finishes.
- AI agents: call the scraper as a tool through the Apify MCP server.
Limits
- What the Ad Library shows logged out. Spend, impressions and audience data exist only for political and issue ads (and EU transparency data for ads shown in the EU); other ads show their creative, dates and platforms.
- Some ads hide their creative from logged-out visitors. About 3% of ads in our tests have
gatedTypeLOGGED_OUT: they come with their advertiser, text, dates and platforms, but without images, videos or a headline. - Each search stands alone. An ad that matches several of your searches is returned once for each of them;
inputsays which. - One country per search. The Ad Library searches one country, or all of them. Run one search per country to compare countries.
- Ads sharing a creative. The Ad Library groups ads that share a creative and lists one or a few of them;
collationCountsays how many ads the group has. - Media links expire. Image and video links point to Facebook's CDN, which expires them after some days. Download media promptly if you need it.
- Residential proxy recommended. Facebook refuses many data-center IP addresses, so keep the default Apify Proxy
RESIDENTIALsetting. - Share links work for Pages. A share link from the Facebook app (
https://www.facebook.com/share/…,fb.me/…) or a link to one of a Page's posts is followed to the Page, at no charge.
FAQ
Is it legal to scrape the Facebook Ad Library?
The Ad Library is a public transparency tool that Meta shows to anyone, logged in or not, and this scraper only reads what it shows to logged-out visitors. Political ads can include personal data of the people behind them, which laws such as the GDPR protect, so collect only what you need for a legitimate purpose. Apify explains the basics in Is web scraping legal?.
Do I need a Facebook account or cookies?
No. The Actor reads only what the Ad Library shows to visitors who are not logged in.
How do I scrape exactly the search I see in my browser?
Set up the search on facebook.com/ads/library, copy the address bar, and paste it into adLibraryUrls. Every filter in it is kept.
Why did I get fewer ads than maxAds?
The search has fewer results, or the run reached its maximum total charge. The run log says which, for each search.
Why did my run finish with no ads?
No ad matched the search and its filters, the Page was not found, or Facebook refused the requests even after 5 attempts on fresh IPs. The run still ends Succeeded, its status message says which, and nothing is charged.
When the input leaves nothing to search (no search term, Page or Ad Library URL that can be used, a country code that is not a country, or a start date in the future), the run also ends Succeeded, with a status message that starts with "Nothing to scrape:" and says what to fix, and no results are charged. The log names every entry it skipped and why.
A run ends Failed only when the scraper itself is blocked or broken: Facebook refused every one of 3 or more searches and a known-public search was refused too, none of the searches could be read at all, or the results could not be saved.
What do the dates filter?
dateFrom and dateTo keep ads that were shown at some point between those days, the Ad Library's own date filter. An ad that started a year ago and still runs is included.
How fast is it?
Each search reads about 300 ads a minute, and up to 8 searches run side by side: in our tests, 300 ads from three searches took 25 seconds and 1,000 ads from one search about 3.5 minutes. includeAdDetails adds one request per ad.
Can I get spend and impressions for all ads?
The Ad Library publishes them only for ads about social issues, elections or politics. For ads shown in the EU, includeAdDetails adds the reach and targeting the EU requires.
Can I run it on a schedule or from my own code?
Yes. Use Apify schedules, the Apify API and client libraries, webhooks, or integrations such as Make, Zapier or n8n.
Other scrapers by Social Scrapers
| Scraper | What it gets |
|---|---|
| TikTok API | Profiles, Videos and Comments |
| TikTok Comments Scraper | Comments, Replies and Likes |
| TikTok Hashtag Scraper | Top Videos, Views and Likes |
| TikTok Profile Scraper | Followers, Bio, Stats and Videos |
| TikTok Scraper | Videos, Profiles, Hashtags and Comments |
| TikTok Sound Scraper | Videos Using a Sound and Music Info |
| TikTok Transcript Scraper | Video Captions and Subtitles to Text |
| TikTok Video Scraper | Views, Likes, Captions and Comments |
| Instagram API | Profiles, Posts, Reels, Comments and Hashtags |
| Instagram Comments Scraper | Comments, Likes and Reply Counts |
| Instagram Email Scraper | Emails and Phones from Public Profiles |
| Instagram Hashtag Scraper | Reels and Keyword Search |
| Instagram Post Details Scraper | Likes, Comments, Views and Media |
| Instagram Post Scraper | Posts, Reels and Comments |
| Instagram Profile Scraper | Followers, Bio, Posts and Reels |
| Instagram Reels Scraper | Reels, Plays, Likes and Comments |
| Instagram Reels Transcript Scraper | Speech to Text and Captions |
| Instagram Scraper | Posts, Profiles, Reels, Comments and Hashtags |
| YouTube API | Videos, Transcripts, Search, Channels and Comments |
| YouTube Channel Scraper | Videos, Shorts, Subscribers and About |
| YouTube Comments Scraper | Comments, Replies and Likes |
| YouTube Scraper | Videos, Shorts, Channels and Comments |
| YouTube Search Scraper | Videos, Channels, Views and Filters |
| YouTube Shorts Scraper | Shorts, Views, Likes and Search |
| YouTube Transcript Scraper | Subtitles, Captions and SRT |
| YouTube Video Details Scraper | Stats, Subtitles and Comments |
| Facebook Comments Scraper | Posts, Reels, Videos and Replies |
| Facebook Events Scraper | Public Events, Dates and Hosts |
| Facebook Groups Scraper | Public Group Posts and Reactions |
| Facebook Marketplace Scraper | Prices, Locations and Sellers |
| Facebook Page Contact Info Scraper | Email, Phone and WhatsApp |
| Facebook Posts Scraper | Pages, Profiles and Timelines |
| Facebook Pages Scraper | Profiles, Contact Info and Reviews |
| Facebook Reels Scraper | Reels, Videos, Plays and Captions |
| X (Twitter) Profile Scraper | Followers, Bio and Tweets |
| X (Twitter) Tweet Scraper | Latest Posts by Profile |
| Threads Profile Scraper | Followers, Bio, Links and Posts |
| Threads Replies Scraper | Comments, Authors, Likes and Media |
| Threads Scraper | Posts, Profiles, Replies and Search |
| Threads Search Scraper | Keywords, Hashtags, Top and Recent Posts |
| Reddit Comments Scraper | Threads, Replies, Votes and Authors |
| Reddit Scraper | Posts, Comments, Subreddits, Users and Search |
| Reddit Search Scraper | Posts by Keyword, Subreddit and Date |
| Reddit User Scraper | Profiles, Karma, Posts and Comments |
| Subreddit Scraper | Hot, New and Top Posts with Comments |
| Quora Scraper | Answers, Questions, Profiles and Topic Search |
| LinkedIn Ad Library Scraper | Ads, Advertisers and Impressions |
| LinkedIn Company Posts Scraper | Latest Posts, No Login |
| LinkedIn Company Scraper | Company Details, Size and Website |
| LinkedIn Job Search Scraper | Filters, Salaries and New Jobs |
| LinkedIn Jobs Scraper | Job Listings, Salaries and Companies |
| LinkedIn Post Comments Scraper | Top Comments, No Login |
| LinkedIn Posts Scraper | Public Posts, Reactions and Comments |
| LinkedIn Profile Posts Scraper | Latest Posts, No Login |
| Google Maps Email Extractor | Emails, Phones and Social Links |
| Google Maps Scraper | Places, Phones, Websites, Ratings and Hours |
| Google News Scraper | Headlines, Articles and Search |
| Google Ads Transparency Scraper | Ad Creatives and Advertisers |
| Amazon Best Sellers Scraper | Top 100 Rankings and Prices |
| Amazon Product Scraper | Search Results, Prices, Ratings, ASINs |
| Amazon Search Scraper | Products, Prices and Ratings by Keyword |
| Indeed Jobs Scraper | Salaries, Full Descriptions, Company Data |
| Contact Details Scraper | Emails, Phones and Social Links |
| Telegram Channel Scraper | Posts, Views and Media |
| Doximity Scraper | Physician Profiles and Doctor Directory |
| KevinMD Scraper | Physician Articles and Author Specialties |
| Op-Med Scraper | Physician Essays and Doctor Profiles |
| Airbnb Reviews Scraper | Guest Reviews, Ratings and Hosts |
| Airbnb Scraper | Listings, Prices, Reviews and Hosts |
| Booking.com Scraper | Hotels, Prices and Reviews |
| Career Site Jobs Scraper | Greenhouse, Lever, Ashby and Workday |
| eBay Scraper | Listings, Prices, Item Details and Sellers |
| Etsy Scraper | Products, Prices, Shops and Reviews |
| Google Shopping Scraper | Products, Prices and Sellers |
| Google Trends Scraper | Interest Over Time, Regions and Queries |
| MercadoLibre Scraper | Products, Prices and Sellers |
| Similarweb Scraper | Website Traffic, Rank and Visits |
| Tripadvisor Reviews Scraper | Hotels, Restaurants and Attractions |
| Tripadvisor Scraper | Hotels, Restaurants and Reviews |
| Yelp Scraper | Businesses, Reviews, Ratings and Contacts |
| Zillow Property Scraper | Home Details, Zestimate and History |
| Zillow Scraper | Listings, Prices, Zestimates and Agents |