Facebook Ads Library Scraper
Pricing
from $2.70 / 1,000 results
Facebook Ads Library Scraper
Scrape public ads from the Meta Ad Library with no login or cookies. Get ad copy, creatives, landing pages, run dates, advertiser profile, spend and EU reach from keywords, pages or Ad Library links. Bulk input, auto proxy fallback. Export JSON, CSV or Excel.
Pricing
from $2.70 / 1,000 results
Rating
0.0
(0)
Developer
Data Minds
Maintained by CommunityActor stats
0
Bookmarked
4
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Features
Share
๐ What is Facebook Ads Library Scraper?
๐ Ads by keyword, page or link ยท ๐ฆ Export to JSON, CSV or Excel ยท ๐ API ready ยท ๐ค Works with AI agents
Facebook Ads Library Scraper collects public ads from the Meta Ad Library by keyword, advertiser page or Ad Library link, and returns one clean row per ad. Type a keyword such as nike, click Start, and get the ad text, images, videos, landing page, run dates, platforms, advertiser details and reach in one table. It is made for marketers, agencies, researchers and developers who want ad data without a Meta developer account or any code.
- ๐ต Run Facebook ads competitor research: see every ad a brand is running or has run, with the exact creative and landing page.
- ๐ Find long-running winners: keep only ads that have run for a minimum number of days and sort them by impressions.
- ๐ Research a market: search any keyword in any country and compare formats, platforms and call-to-action buttons.
- ๐ณ Check political and issue ads: read spend, reach and impressions ranges and who paid for the ad, where the Library publishes them.
- ๐ช๐บ Read EU and UK reach: get total reach, targeted age and gender for ads shown there.
- ๐ Keep it running: schedule runs and send fresh ads to your sheet, your database or your AI agent.
- ๐งฉ Work in bulk: add many keywords and pages to one run, and each one gets its own ad limit.
๐ฆ What data can Facebook Ads Library Scraper extract?
Every row in the results table is one ad. The fields are grouped below, and the main ones are described in the Output section. Fields that the Library does not publish for an ad stay empty.
| Data | Fields |
|---|---|
| ๐ Ad and search | adArchiveID, adLibraryUrl, inputUrl, searchTotalResults, collationId, similarAdsCount |
| ๐ฃ Advertiser | pageID, pageName, pageIsDeleted, advertiser (pageId, pageName, pageUrl, pageAlias, category, likes, verification, instagramUsername, instagramFollowers, instagramVerified, about, isDeleted, isRestricted, profilePictureUrl, coverPhotoUrl) |
| ๐ Dates and status | isActive, startDateFormatted, endDateFormatted, daysRunning, startDate, endDate, totalActiveTimeSeconds, isTakenDown |
| ๐ Ad copy | adText, headline, linkDescription, ctaText, ctaType |
| ๐ Landing page | landingUrl, landingDomain |
| ๐ท Creative | creativeType, imageUrls, videoUrls, videoPreviewUrls, cardCount, snapshot |
| ๐ฑ Platforms and category | publisherPlatform, categories |
| ๐ฒ Spend, reach and impressions | spend, spendLower, spendUpper, currency, reachEstimate, reachLower, reachUpper, impressions, impressionsLower, impressionsUpper |
| ๐ช๐บ EU, UK and other regions | euTransparency (totalReach, targetedAgeMin, targetedAgeMax, targetedGender, targetedLocations, excludedLocations, reachByCountryAgeGender), ukTransparency, brazilTransparency, audienceInsights, regionalRegulationData |
| ๐งพ Payer and labels | payerBeneficiary, pageLifetimeSpendByDisclaimer, verifiedVoiceTypes, isAiGenerated, containsSensitiveContent, isAaaEligible, gatedType, hideDataStatus, hasUserReported |
| โ Problems | error (only on rows for inputs that returned no ads) |
โ Note: The Library publishes spend, reach and impressions mainly for political and issue ads, and EU or UK reach only for ads shown there. For other ads these fields are empty (
null), never made up.
โ What can't Facebook Ads Library Scraper extract?
- โ Ads or data that the public Ad Library does not show to every visitor.
- โ Exact spend for commercial ads. The Library does not publish it.
- โ Links to posts, photos or groups. Only keywords, advertiser pages and Ad Library links work as inputs.
For events and page details, try Facebook Pages Scraper or Facebook Event Scraper.
๐ How to scrape Facebook ads
Facebook Ads Library Scraper is designed for an easy start, even if you have never extracted data from the web before.
- ๐ Create a free Apify account using your email.
- ๐ Open Facebook Ads Library Scraper and go to the Input tab.
- ๐ฅ Add keywords, advertiser pages or Ad Library links to Keywords, pages or Ad Library URLs, one per line.
- ๐ฏ Choose a Country, set Max ads per input and, if you like, Ad status, Ad format, Platforms or a date range.
- ๐ Click Start and wait for the run to finish.
- ๐ค Open the Output tab to view the ads as a table, or download them as JSON, CSV, Excel, XML or HTML.
๐ Quick start: a good first run is one keyword and one page with a small limit.
{"search": ["nike", "https://www.facebook.com/adidas"],"maxItems": 20,"country": "US","activeStatus": "active"}
๐ฐ How much does it cost to scrape Facebook ads?
Facebook Ads Library Scraper uses a pay per event model, with prices from $0.0027 per ad ($2.70 per 1,000 ads) on the Gold plan. You pay for each ad saved. Rows that only report a problem with an input are not charged. Apify platform usage is billed in addition.
| Apify plan | Price per ad | Price per 1,000 ads |
|---|---|---|
| ๐ Free | $0.0035 | $3.50 |
| ๐ฅ Bronze | $0.0032 | $3.20 |
| ๐ฅ Silver | $0.003 | $3.00 |
| ๐ฅ Gold | $0.0027 | $2.70 |
Each run also has start events: the default 4 GB of memory counts as 4 events of $0.00005, or $0.0002 per run.
โ Good to know: you pay for ads saved. Rows that report an input problem are never charged.
What a run costs (ad price only, start events not included):
| Ads | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| 100 | 100 x $0.0035 = $0.35 | 100 x $0.0032 = $0.32 | 100 x $0.003 = $0.30 | 100 x $0.0027 = $0.27 |
| 1,000 | 1,000 x $0.0035 = $3.50 | 1,000 x $0.0032 = $3.20 | 1,000 x $0.003 = $3.00 | 1,000 x $0.0027 = $2.70 |
| 10,000 | 10,000 x $0.0035 = $35.00 | 10,000 x $0.0032 = $32.00 | 10,000 x $0.003 = $30.00 | 10,000 x $0.0027 = $27.00 |
๐ฐ Is scraping Facebook ads free?
You can start for free. The Apify Free plan includes $5 of monthly credit. At the Free price of $0.0035 per ad, $5 / $0.0035 = about 1,428 ads before platform usage. Paid plans lower the price per ad, as the table shows.
๐ง Input
Add the keywords, advertiser pages or Ad Library links you want to read, then narrow the ads with optional filters. Set the input in the Input tab or send it as JSON through the API. You need at least one entry in search. The ad limit applies to each entry separately, so three entries with maxItems 100 give up to 300 ads.
| Field | Type | Default | What it does |
|---|---|---|---|
search | array of strings | none (required) | One entry per line: a keyword such as nike, an advertiser page link or numeric page ID, or a pasted Ad Library link, whose own filters are kept. Mix them freely. |
maxItems | integer | 20 | Ads to collect for each entry, from 0 upwards. 0 means every ad the Library returns, which can be very large. |
country | string | US | Country where the ads were shown, as a two-letter code, or ALL for all countries. |
activeStatus | string | all | all, active (running ads only) or inactive (stopped ads only). |
sort | string | impressions | Order the Library lists ads in: impressions or relevance. The Library offers no date ordering. |
mediaType | string | all | Keep only ads with this creative: all, image, video, meme or none (text only). |
platforms | array of strings | none | Keep only ads shown on at least one of FACEBOOK, INSTAGRAM, MESSENGER, AUDIENCE_NETWORK, THREADS or WHATSAPP. Empty means all. |
dateFrom | string | none | Keep ads running on or after this day. Use YYYY-MM-DD or a relative value such as 30 days. |
dateTo | string | none | Keep ads running on or before this day. Same formats. Use both dates for a range. |
minDaysRunning | integer | 0 | Keep only ads that ran for at least this many days. 0 means no minimum. |
includeDetails | boolean | true | Add advertiser page details, who paid for the ad, and audience reach for ads shown in the EU or UK. Needs one extra lookup per ad, so a run takes longer. |
detailsMax | integer | 0 | Look up details for only the first N ads of each entry. 0 means all collected ads. |
proxyConfiguration | object | {"useApifyProxy": false} | Optional network settings for the run. The defaults work for most runs. |
Minimal input:
{"search": ["nike"]}
Advanced input: active ads in Germany for a keyword and an advertiser page, shown on Instagram, that ran for at least 30 days, with advertiser details for the first 50 ads of each entry:
{"search": ["running shoes", "https://www.facebook.com/adidas"],"maxItems": 100,"country": "DE","activeStatus": "active","sort": "impressions","platforms": ["INSTAGRAM"],"dateFrom": "90 days","minDaysRunning": 30,"includeDetails": true,"detailsMax": 50}
The platform and days-running filters are applied to the ads the Library returns, so a strict filter can return fewer ads than the maximum. See the input tab for the full schema.
๐ก Tip: Start with a low
maxItemsto check the sample, then raise it for the full run.
๐ค Output
Results are stored in a dataset, which you can open in the Output or Storage tab. View them as a table or JSON, pick only the fields you need, and download them as JSON, CSV, Excel, XML or HTML. The table has ready-made views for the overview, creative, advertiser, spend and reach, and EU and UK reach.
Through the API, read the rows from this URL pattern:
https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json
Add &view=overview (or creative, advertiser, performance, reach) to get one of the views.
The main fields of each ad row:
| Field | Type | Description |
|---|---|---|
inputUrl | string | The keyword, page or link this ad was found for. |
adArchiveID | string | Ad Library ID of the ad. |
adLibraryUrl | string | Link to the ad in the Ad Library. |
pageID | string | ID of the advertiser page. |
pageName | string | Name of the advertiser page. |
isActive | boolean | Whether the ad is still running. |
startDateFormatted | string | First day the ad ran (YYYY-MM-DD). |
endDateFormatted | string | Last day the ad ran. Empty while the ad is active. |
daysRunning | integer | Days the ad has run. |
publisherPlatform | array | Platforms the ad is shown on. |
creativeType | string | image, video, carousel or catalog. |
adText | string | Body text of the ad. |
headline | string | Headline of the ad. |
ctaText | string | Text of the call-to-action button. |
landingUrl | string | Landing page link. |
landingDomain | string | Domain of the landing page. |
imageUrls | array | Image links of the ad. |
videoUrls | array | Video links of the ad. |
cardCount | integer | Number of carousel or catalog cards. |
similarAdsCount | integer | Number of ads grouped with this one because they share the creative. |
spend | string | Spend range as shown by the Library (political and issue ads). |
reachEstimate | string | Reach estimate as shown by the Library. |
impressions | string | Impressions range as shown by the Library. |
advertiser | object | Advertiser page details: category, likes, verification, Instagram account, followers and about text. |
euTransparency | object | EU reach and targeting: total reach, age range, gender and locations. |
payerBeneficiary | array | Who paid for the ad and who benefits from it. |
isAiGenerated | boolean | True when the ad contains digitally created media. |
searchTotalResults | integer | Total ads the Library reports for this search. |
An abridged example row for the input nike:
{"inputUrl": "nike","adArchiveID": "161966936869658","adLibraryUrl": "https://www.facebook.com/ads/library/?id=161966936869658","pageID": "15087023444","pageName": "Nike","isActive": false,"startDateFormatted": "2023-08-14","endDateFormatted": "2026-03-29","daysRunning": 958,"publisherPlatform": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER"],"creativeType": "catalog","ctaText": "Shop now","landingDomain": "nike.com","cardCount": 6,"spend": null,"advertiser": {"pageName": "Nike","category": "Sportswear shop","likes": 39488353,"verification": "BLUE_VERIFIED","instagramUsername": "nike","instagramFollowers": 290684122},"euTransparency": { "totalReach": 5, "targetedGender": "All" },"searchTotalResults": 50001}
If an input cannot be read or returns no ads, the dataset gets a short row for it, which is not charged:
| Field | Type | Description |
|---|---|---|
inputUrl | string | The keyword, page or link that returned no ads. |
error | string | Plain-language reason why the input returned no ads. |
A run summary with the number of inputs, ads, successes, failures and the final status message is also saved under the key RUN_SUMMARY in the run's key-value store.
๐ก Tips and advanced usage
โก How to get faster or cheaper results
- โก Turn off Include advertiser details when you only need the ad itself. This is the fastest setup.
- ๐ฏ Use Max ads with details to look up details for only the first ads of each entry.
- ๐ Narrow the search with country, status and format filters instead of collecting everything.
- ๐ข Set a low Max ads per input first, check the sample, then raise it.
๐ฏ How to find winning Facebook ads
Set Min days running to 30 or more and keep Sort by on most impressions. Ads that keep running for weeks are usually the ones that pay for themselves. Compare their formats, call-to-action buttons and landing page domains across a keyword to see what works in a niche.
๐ How to monitor competitor ads on a schedule
Add the advertiser pages of your competitors, run the Actor on a schedule, and compare the startDateFormatted and isActive fields between runs. New ads show up with a recent start date, and stopped ads get an end date.
๐ How to scrape ads from the Facebook Ad Library
Type a brand, product or topic into the search field, choose a country and click Start to scrape the Facebook Ads Library for it. This is a Facebook Ad Library search by keyword, so a brand name and a product both work. Choose Active only to see Facebook Ad Library active ads, or Inactive only for ads that have stopped.
๐ How to read one advertiser
Paste the link of the advertiser page, its numeric page ID or an Ad Library link into the same field. A numeric Facebook Ad Library page ID works like a page link. A pasted Facebook Ad Library URL keeps its own filters, so you can build the search in the Library first and paste the result.
๐ฌ How to review ad creatives
Open the Creative view to check each ad with its images, videos, headline, call-to-action and landing page. You can compare formats and landing page domains across a whole keyword. Each ad row has the image and video links, not the media files themselves.
๐ฒ How to read spend, reach and impressions
Political and issue ads carry ranges in the spend and impressions fields, in the currency the Library reports. Switch on Include advertiser details to add reach, age and gender for ads shown in the EU or UK. The daysRunning field shows how long an ad has run, and Min days running keeps only the longer-running ones.
๐งฉ How to scrape many keywords and pages at once
List all your keywords, pages and links in one run. Raise Max ads per input to collect more ads, and each entry keeps its own limit.
๐ฆ How to export Facebook ads to CSV
To download Facebook Ad Library data, open the Output tab of the finished run and choose Export. Select CSV and pick the fields you need, or choose JSON, Excel, XML or HTML. For scheduled exports, use the API or an integration instead.
๐ค How to send ads to your tools
- ๐ Send Facebook Ad Library ads to Google Sheets after every run with the Google Sheets integration.
- โก Trigger a Zapier zap for each new batch of Facebook Ad Library ads with a webhook.
- ๐ Build an n8n workflow that reads the Facebook Ad Library results when a run finishes.
- ๐ค Give an AI agent access to the Facebook Ad Library through MCP, so it can answer questions about ads.
๐ Why did I get fewer ads than my limit?
The Library may list fewer ads for your search, country or filters than the maximum you set. The platform and days-running filters are applied after the Library returns its ads, so a strict filter removes some. Loosen the filters, choose All countries, or raise Max ads per input.
โ Known issues
- โ The Library lists ads by impressions or relevance, never by date.
- โ Spend, reach and impressions are empty for most commercial ads, because the Library does not publish them.
- โ Very broad keywords can list thousands of ads. Use Max ads per input to keep a run small.
- โ A link to a post, photo or group is not an advertiser page and returns a row with an error message.
๐ Integrations and API
๐ Can I use Facebook Ads Library Scraper as an API?
Yes. Start runs, read results and schedule jobs through the Apify API. Use your token from Settings > API & Integrations.
| Action | Method and URL |
|---|---|
| ๐ Start a run | POST https://api.apify.com/v2/actors/data_minds~facebook-ads-library-scraper/runs |
| โก Run and get the results in one call | POST https://api.apify.com/v2/actors/data_minds~facebook-ads-library-scraper/run-sync-get-dataset-items |
| ๐ฅ Read results of a run | GET https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json |
| ๐ OpenAPI definition | GET https://api.apify.com/v2/actors/data_minds~facebook-ads-library-scraper/builds/default/openapi.json |
curl
curl -X POST "https://api.apify.com/v2/actors/data_minds~facebook-ads-library-scraper/run-sync-get-dataset-items" \-H "Authorization: Bearer <YOUR_APIFY_TOKEN>" \-H "Content-Type: application/json" \-d '{"search": ["nike", "https://www.facebook.com/adidas"], "maxItems": 20, "country": "US"}'
Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("data_minds/facebook-ads-library-scraper").call(run_input={"search": ["nike", "https://www.facebook.com/adidas"], "maxItems": 20, "country": "US"})for ad in client.dataset(run["defaultDatasetId"]).iterate_items():print(ad["pageName"], ad["adLibraryUrl"])
JavaScript
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('data_minds/facebook-ads-library-scraper').call({search: ['nike', 'https://www.facebook.com/adidas'],maxItems: 20,country: 'US',});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
CLI
$echo '{"search": ["nike"], "maxItems": 20, "country": "US"}' | apify call data_minds/facebook-ads-library-scraper --silent --output-dataset
The Python example reads Facebook Ad Library data straight into your own scripts. The one-call endpoint suits runs that finish in about five minutes, and the start-a-run endpoint suits longer jobs. More code is on the API tab.
๐งฉ Can I connect Facebook Ads Library Scraper to other apps?
Yes. Connect it with Make, Zapier, n8n, Slack, Google Sheets, Google Drive, Airbyte, GitHub and more through Apify integrations. Use webhooks to send new ads to your team whenever a run finishes, and schedules to run it every day or week.
๐ค Can I use Facebook Ads Library Scraper with AI agents (MCP server)?
Yes. AI agents can call it directly through the hosted Apify MCP server. The Server tab of this Actor shows the same connection settings.
{"mcpServers": {"apify": {"type": "http","url": "https://mcp.apify.com?tools=data_minds/facebook-ads-library-scraper"}}}
The hosted server signs you in with OAuth the first time you connect, so no API token belongs in this configuration. If your client cannot use OAuth, send the header Authorization: Bearer <YOUR_APIFY_TOKEN>.
๐ Other Facebook and ad library scrapers
| Scraper | What it does |
|---|---|
| ๐ Facebook Event Scraper | Collects public Facebook events from searches, page and group event lists or single links: dates, places, attendance, tickets and organizers. |
| ๐ Facebook Pages Scraper | Collects public Facebook Page data in bulk: category, followers, rating, email, phone, website, address and hours. |
| ๐ Facebook Reels Scraper | Collects public Facebook reels from pages, profiles or reel links: captions, plays, reactions, comments, shares and video links. |
| ๐ Instagram Scraper | Collects public Instagram profiles, posts, reels, comments, hashtags and places: followers, likes, plays, captions and media links. |
| ๐ LinkedIn Ads Library Scraper | Collects public LinkedIn ads by keyword, advertiser, payer or company page: ad text, creative, call to action, landing page and run dates. |
โ FAQ
๐ก Is it legal to scrape the Facebook Ad Library?
The Ad Library is a public transparency tool, and this Actor reads only what any visitor can see. Web scraping of public data is generally legal, but respect personal data rules such as GDPR, have a legitimate reason to collect the data, and take the Meta terms into account.
๐ง How does Facebook Ads Library Scraper work?
You add keywords, advertiser pages or Ad Library links, choose a country and optional filters, and press Start. The Actor reads the matching public ads and returns one row per ad, with the creative, dates, platforms and advertiser details. Inputs that return nothing get a short row that explains why.
๐ฏ Why use Facebook Ads Library Scraper instead of the Ad Library API?
As a Facebook Ad Library API alternative, it needs no Meta developer account, app setup or access token. You give keywords, advertiser pages or links and get rows with ad copy, creatives, dates and reach. You can filter by country, status, format and platform, schedule runs, and download the data.
๐ Can I use Facebook Ads Library Scraper as an API?
Yes. Start a run with the Apify API, pass your keywords as JSON, and read the dataset items when it finishes. A one-call endpoint returns results directly for short runs, and an OpenAPI definition is available. Ready-made curl, Python, JavaScript and CLI examples are in the Integrations and API section above.
๐ค Can I use Facebook Ads Library Scraper with AI agents (MCP server)?
Yes. Add the hosted Apify MCP server URL with the tools parameter set to data_minds/facebook-ads-library-scraper, and your AI assistant can run the Actor and read the ads. The first connection signs you in with OAuth. The Server tab of the Actor shows the same connection settings.
๐งฉ Can I connect Facebook Ads Library Scraper to Google Sheets, Make or Zapier?
Yes. Apify integrations connect the Actor with Google Sheets, Make, Zapier, n8n, Slack and many other tools. Schedule a run, then use a webhook or an integration to send each new batch of ads to your sheet, chat or workflow automatically when the run finishes.
๐ Why did I get fewer ads than my limit?
The Library may list fewer ads for your search, country or filters than the maximum you set. The platform and days-running filters also remove ads after the Library returns them. Loosen the filters, choose all countries, raise Max ads per input, and run a small test to compare the counts.
๐ Why are spend and reach empty, or different from the website?
The Library publishes spend, reach and impressions mainly for political and issue ads, and EU or UK reach only for ads shown there, so other ads leave these fields empty. Numbers are ranges as shown at the time of the run, and they can change later.
โ Why does an input show an error, or the Actor is not working?
The input may not be a keyword, an advertiser page or an Ad Library link, for example a link to a post or group. Check that the page exists and has ads in the chosen country. If a valid input still fails, report it on the Issues tab.
๐ฌ Support and feedback
Found a bug or have a feature request? Please create an issue on the Issues tab.
Need a custom solution or more data? Contact us at hello.dataminds@gmail.com.
Built and maintained by data_minds. This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by Facebook or Meta.