Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Pricing

from $2.70 / 1,000 results

Go to Apify Store
Facebook Ads Library Scraper

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

Data Minds

Maintained by Community

Actor stats

0

Bookmarked

4

Total users

1

Monthly active users

6 days ago

Last modified

Categories

Features

Limited permissions

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.

DataFields
๐Ÿ†” Ad and searchadArchiveID, adLibraryUrl, inputUrl, searchTotalResults, collationId, similarAdsCount
๐Ÿ“ฃ AdvertiserpageID, pageName, pageIsDeleted, advertiser (pageId, pageName, pageUrl, pageAlias, category, likes, verification, instagramUsername, instagramFollowers, instagramVerified, about, isDeleted, isRestricted, profilePictureUrl, coverPhotoUrl)
๐Ÿ“… Dates and statusisActive, startDateFormatted, endDateFormatted, daysRunning, startDate, endDate, totalActiveTimeSeconds, isTakenDown
๐Ÿ“ Ad copyadText, headline, linkDescription, ctaText, ctaType
๐Ÿ”— Landing pagelandingUrl, landingDomain
๐Ÿ“ท CreativecreativeType, imageUrls, videoUrls, videoPreviewUrls, cardCount, snapshot
๐Ÿ“ฑ Platforms and categorypublisherPlatform, categories
๐Ÿ’ฒ Spend, reach and impressionsspend, spendLower, spendUpper, currency, reachEstimate, reachLower, reachUpper, impressions, impressionsLower, impressionsUpper
๐Ÿ‡ช๐Ÿ‡บ EU, UK and other regionseuTransparency (totalReach, targetedAgeMin, targetedAgeMax, targetedGender, targetedLocations, excludedLocations, reachByCountryAgeGender), ukTransparency, brazilTransparency, audienceInsights, regionalRegulationData
๐Ÿงพ Payer and labelspayerBeneficiary, pageLifetimeSpendByDisclaimer, verifiedVoiceTypes, isAiGenerated, containsSensitiveContent, isAaaEligible, gatedType, hideDataStatus, hasUserReported
โ— Problemserror (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.

  1. ๐Ÿ”‘ Create a free Apify account using your email.
  2. ๐ŸŒ Open Facebook Ads Library Scraper and go to the Input tab.
  3. ๐Ÿ“ฅ Add keywords, advertiser pages or Ad Library links to Keywords, pages or Ad Library URLs, one per line.
  4. ๐ŸŽฏ Choose a Country, set Max ads per input and, if you like, Ad status, Ad format, Platforms or a date range.
  5. ๐Ÿš€ Click Start and wait for the run to finish.
  6. ๐Ÿ“ค 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 planPrice per adPrice 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):

AdsFreeBronzeSilverGold
100100 x $0.0035 = $0.35100 x $0.0032 = $0.32100 x $0.003 = $0.30100 x $0.0027 = $0.27
1,0001,000 x $0.0035 = $3.501,000 x $0.0032 = $3.201,000 x $0.003 = $3.001,000 x $0.0027 = $2.70
10,00010,000 x $0.0035 = $35.0010,000 x $0.0032 = $32.0010,000 x $0.003 = $30.0010,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.

FieldTypeDefaultWhat it does
searcharray of stringsnone (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.
maxItemsinteger20Ads to collect for each entry, from 0 upwards. 0 means every ad the Library returns, which can be very large.
countrystringUSCountry where the ads were shown, as a two-letter code, or ALL for all countries.
activeStatusstringallall, active (running ads only) or inactive (stopped ads only).
sortstringimpressionsOrder the Library lists ads in: impressions or relevance. The Library offers no date ordering.
mediaTypestringallKeep only ads with this creative: all, image, video, meme or none (text only).
platformsarray of stringsnoneKeep only ads shown on at least one of FACEBOOK, INSTAGRAM, MESSENGER, AUDIENCE_NETWORK, THREADS or WHATSAPP. Empty means all.
dateFromstringnoneKeep ads running on or after this day. Use YYYY-MM-DD or a relative value such as 30 days.
dateTostringnoneKeep ads running on or before this day. Same formats. Use both dates for a range.
minDaysRunninginteger0Keep only ads that ran for at least this many days. 0 means no minimum.
includeDetailsbooleantrueAdd 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.
detailsMaxinteger0Look up details for only the first N ads of each entry. 0 means all collected ads.
proxyConfigurationobject{"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 maxItems to 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:

FieldTypeDescription
inputUrlstringThe keyword, page or link this ad was found for.
adArchiveIDstringAd Library ID of the ad.
adLibraryUrlstringLink to the ad in the Ad Library.
pageIDstringID of the advertiser page.
pageNamestringName of the advertiser page.
isActivebooleanWhether the ad is still running.
startDateFormattedstringFirst day the ad ran (YYYY-MM-DD).
endDateFormattedstringLast day the ad ran. Empty while the ad is active.
daysRunningintegerDays the ad has run.
publisherPlatformarrayPlatforms the ad is shown on.
creativeTypestringimage, video, carousel or catalog.
adTextstringBody text of the ad.
headlinestringHeadline of the ad.
ctaTextstringText of the call-to-action button.
landingUrlstringLanding page link.
landingDomainstringDomain of the landing page.
imageUrlsarrayImage links of the ad.
videoUrlsarrayVideo links of the ad.
cardCountintegerNumber of carousel or catalog cards.
similarAdsCountintegerNumber of ads grouped with this one because they share the creative.
spendstringSpend range as shown by the Library (political and issue ads).
reachEstimatestringReach estimate as shown by the Library.
impressionsstringImpressions range as shown by the Library.
advertiserobjectAdvertiser page details: category, likes, verification, Instagram account, followers and about text.
euTransparencyobjectEU reach and targeting: total reach, age range, gender and locations.
payerBeneficiaryarrayWho paid for the ad and who benefits from it.
isAiGeneratedbooleanTrue when the ad contains digitally created media.
searchTotalResultsintegerTotal 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:

FieldTypeDescription
inputUrlstringThe keyword, page or link that returned no ads.
errorstringPlain-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.

ActionMethod and URL
๐Ÿš€ Start a runPOST https://api.apify.com/v2/actors/data_minds~facebook-ads-library-scraper/runs
โšก Run and get the results in one callPOST https://api.apify.com/v2/actors/data_minds~facebook-ads-library-scraper/run-sync-get-dataset-items
๐Ÿ“ฅ Read results of a runGET https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json
๐Ÿ”Œ OpenAPI definitionGET 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 ApifyClient
client = 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

ScraperWhat it does
๐Ÿ”— Facebook Event ScraperCollects public Facebook events from searches, page and group event lists or single links: dates, places, attendance, tickets and organizers.
๐Ÿ”— Facebook Pages ScraperCollects public Facebook Page data in bulk: category, followers, rating, email, phone, website, address and hours.
๐Ÿ”— Facebook Reels ScraperCollects public Facebook reels from pages, profiles or reel links: captions, plays, reactions, comments, shares and video links.
๐Ÿ”— Instagram ScraperCollects public Instagram profiles, posts, reels, comments, hashtags and places: followers, likes, plays, captions and media links.
๐Ÿ”— LinkedIn Ads Library ScraperCollects public LinkedIn ads by keyword, advertiser, payer or company page: ad text, creative, call to action, landing page and run dates.

โ“ FAQ

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.