Meta Facebook Ads Library Scraper avatar

Meta Facebook Ads Library Scraper

Pricing

from $2.00 / 1,000 results

Go to Apify Store
Meta Facebook Ads Library Scraper

Meta Facebook Ads Library Scraper

Scrape ads from the Facebook (Meta) Ad Library by keyword, advertiser page, ad ID or URL: ad copy, images, videos, dates, platforms, spend and impressions ranges, EU reach and targeting. Filters for country, status, media and dates. Cache for new ads only. Export JSON, CSV or Excel.

Pricing

from $2.00 / 1,000 results

Rating

0.0

(0)

Developer

ActorFlow

ActorFlow

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Security

Limited permissions

Share

Facebook Ads Library (Meta Ad Library) Scraper - Ads by Keyword or Page

Scrape ads from the Facebook Ads Library (facebook.com/ads/library) by keyword, advertiser page, ad ID or Ad Library link: ad copy, images, videos, carousel cards, dates, platforms and call to action, plus spend, impressions, EU reach and targeting where the library shows them. Type a brand, press Start, and export JSON, CSV or Excel, or call it as an API.

Target website: facebook.com/ads/library

Meta Facebook Ads Library Scraper cover: every Meta ad with EU targeting included, only new ads

✨ Features of this Facebook Ads Library scraper

  • Ad extraction — ad text, headline, link, call to action, images, videos (HD and SD), carousel cards, display format, start and end dates, active status and platforms (Facebook, Instagram, Messenger, Audience Network, Threads).
  • Four ways to search — keywords, advertiser pages (page ID, page URL or just the page name), single ad IDs, or any Ad Library link copied from your browser with its filters.
  • Advertiser details — page name, URL, likes, categories, and with details on also Instagram account and followers, verification, about text and lifetime spend.
  • Spend, impressions and reach — spend and impression ranges for political and issue ads, who paid for the ad, and for ads shown in the EU the targeted age, gender, locations and reach breakdown.
  • Filters — country (one, several or all), active or inactive, ad category, image, video or meme, platform, language, start date range, exact phrase, and sort by impressions.
  • Count only mode — one row per search with the number of ads the library shows, for tracking how many ads a brand runs.
  • Pagination support — the library is scrolled like a visitor, and searches too big to scroll through are split automatically by country, date and filters.
  • Cache for new ads only — scheduled runs return only ads not seen before.
  • Proxy support — runs work from any Apify proxy.

🚀 How to scrape Facebook ads in 5 steps

  1. Sign up for a free Apify account — includes $5 monthly credit.
  2. Open the actor page and click Try for free.
  3. Add a keyword such as a brand name, or an advertiser page.
  4. Click Start and wait for the run to complete.
  5. Download results from the Output tab in JSON, CSV, or Excel format.

You can also run this actor via the Apify API or integrate it directly into your workflows using Zapier, Make, or n8n.

💰 Pricing for the Facebook Ads Library scraper

This actor uses pay-per-result billing: you pay for each ad saved. Ads skipped by the cache are not charged.

  • New Apify accounts include $5 of free monthly credit.
  • Turning on ad details opens a panel per ad and makes runs slower.

🖼️ Facebook Ads Library scraper input screenshot

Meta Facebook Ads Library Scraper input form in Apify Console: keywords, country, ad status, media type, max ads per search, cache project name and open ad details

The numbers match the input fields below:

  1. Keywords: brands or topics to search for in the Ad Library.
  2. Country: the country whose ads are searched.
  3. Ad status: active ads, inactive ads or all ads.
  4. Media type: all ads, or only images, videos or memes.
  5. Max ads per search: the ad limit for each search.
  6. Cache project name: reuse the same name on each run to get only new ads.
  7. Open ad details (page info, EU reach and targeting): adds the advertiser's page info and, for EU ads, targeting and reach.

🔧 Facebook Ads Library scraper input configuration

FieldTypeRequiredDefaultDescription
Keywordsarray—["nike"]Search by brand or phrase. One search per keyword.
Advertiser pagesarray——Page IDs, Facebook page URLs or page names. Lists every ad of the advertiser.
Ad Library URLsarray——Ad Library search, advertiser or single ad links; their filters are kept.
Ad IDsarray——Library IDs of single ads.
Countrystring—USCountry code, several separated by commas, or ALL. One search per country.
Ad statusstring—activeactive, inactive or all.
Ad categorystring—allAll ads, political and issue, housing, employment or credit ads.
Media typestring—allall, image, video, meme or none.
Platformsarray——Only ads shown on these platforms.
Ad languagesarray——Language codes of the ad text, like en, de.
Date rangestring——Ads started in the last 24 hours, 7, 14 or 30 days.
Started after / beforestring——Start date window, YYYY-MM-DD.
Match exact phraseboolean—falseSearch the keyword as one phrase.
Sort bystring—relevanceRelevance or impressions.
Only count the adsboolean—falseOne row per search with the total number of ads.
Max ads per searchinteger—5Limit for each keyword, page or URL.
Max ads in totalinteger——Optional limit for the whole run.
Cache project namestring——Same name on each run returns only new ads.
Open ad detailsboolean—falseAdds page info, payer and EU targeting and reach.
Proxy configurationobject—ResidentialProxy settings for the run.

Supported URL types:

  • https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=nike&search_type=keyword_unordered
  • https://www.facebook.com/ads/library/?view_all_page_id=15087023444&country=US&active_status=all
  • https://www.facebook.com/ads/library/?id=1550534860016399

📦 Facebook Ads Library scraper output data

Each row is one ad in JSON with the fields adArchiveId, adUrl, collationId, collationCount, pageId, pageName, pageUrl, pageProfilePictureUrl, pageLikeCount, pageCategories, isActive, startDate, endDate, platforms, displayFormat, adText, title, linkDescription, caption, linkUrl, ctaText, ctaType, images, videos, videoPreviewImages, cards, paidForBy, categories, spend, currency, impressions, reachEstimate, targetedOrReachedCountries, pageAlias, pageIgUsername, pageIgFollowers, pageVerification, pageAbout, pageLifetimeSpend, payer, beneficiary, euTargetsEu, euTotalReach, euAgeMin, euAgeMax, euGender, euLocations, euReachBreakdown, detailsScraped, changeType, searchInput, totalAds and scrapedAt. Fields that do not apply to an ad are null.

The dataset has 2 views: Overview (advertiser, dates, copy, format, link) and Spend and reach (payer, spend, impressions and EU reach for political and issue ads).

Output at a glance:

AdAdvertiserStartedActiveFormatCTAPlatforms
1550534860016399Perfect themes2026-05-19trueIMAGEInstall now5
962050096457659Depop2026-09-11trueIMAGEShop now3
8932462163548008Shiekh Shoes2025-02-03trueDPAShop now4

Sample output (raw JSON):

{
"adArchiveId": "8932462163548008",
"adUrl": "https://www.facebook.com/ads/library/?id=8932462163548008",
"collationId": null,
"collationCount": null,
"pageId": "163762275750",
"pageName": "Shiekh Shoes",
"pageLikeCount": 83788,
"pageCategories": ["Shoes"],
"isActive": true,
"startDate": "2025-02-03",
"endDate": "2026-11-05",
"platforms": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER"],
"displayFormat": "DPA",
"adText": "Sneakerhead Alert! Nike, Jordan, Adidas - Must-Have Drops!",
"title": "{{product.name}}",
"caption": "https://www.shiekh.com",
"ctaText": "Shop now",
"ctaType": "SHOP_NOW",
"images": null,
"videos": null,
"cards": [
{
"title": "(td) true flight black/white",
"text": "Sneakerhead Alert! Nike, Jordan, Adidas - Must-Have Drops!",
"linkUrl": "https://www.shiekh.com/jordan-td-true-flight-black-white.html",
"caption": "shiekh.com",
"ctaText": "Shop Now",
"imageUrl": "https://scontent.example.com/card1.jpg",
"videoUrl": null
}
],
"paidForBy": null,
"spend": null,
"impressions": null,
"pageAlias": "shiekhshoes",
"pageIgUsername": "shiekh",
"pageIgFollowers": 319016,
"pageAbout": "Urban lifestyle retailer.",
"detailsScraped": true,
"changeType": null,
"searchInput": "nike",
"scrapedAt": "2026-11-05T14:49:01.932Z"
}

🔁 Scrape only new Facebook ads with the cache

Set the same Cache project name on every scheduled run. Ads already saved under that name are skipped, not charged and not counted towards Max ads per search, and each new ad gets changeType: "new". Different names keep separate caches, so you can follow one brand per project. Use an Apify Schedule to run it daily or weekly.

🐍 How to scrape Facebook ads with Python, JavaScript or the API

Run the actor programmatically with the official Apify clients. Replace <YOUR_API_TOKEN> with the token from your Apify Console.

Python (pip install apify-client):

from apify_client import ApifyClient
client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("confidential_gnat/facebook-ads-library-scraper").call(run_input={
"keywords": ["nike"],
"country": "US",
"status": "active",
"maxItems": 50,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

JavaScript (npm install apify-client):

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('confidential_gnat/facebook-ads-library-scraper').call({
keywords: ['nike'],
country: 'US',
status: 'active',
maxItems: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

cURL — start a run and wait for the dataset:

curl -X POST "https://api.apify.com/v2/acts/confidential_gnat~facebook-ads-library-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"keywords": ["nike"], "country": "US", "status": "active", "maxItems": 50}'

💡 What you can use Facebook Ads Library data for

  • Competitor ad monitoring: see every creative, offer and call to action a rival runs.
  • Creative research: collect images, videos and carousels for a niche to find what works.
  • Political and issue ad tracking: spend, impressions and who paid for the ad.
  • EU ad transparency research: targeting, age, gender and reach by country.
  • Ad volume tracking over time with the count only mode.

Marketers, agencies, e-commerce brands, journalists and researchers use this data across advertising, politics, retail and media.

⚠️ Limitations of the Facebook Ads Library scraper

  • Public data only — the actor sees what the Ad Library shows to a visitor who is not logged in.
  • Spend and impressions — shown by the library only for political and issue ads; targeting and reach only for ads shown in the EU.
  • Speed — ads load in groups of about 10 per scroll, so large runs take time, and opening ad details makes them slower.
  • Very big searches — the library stops after a few hundred ads per search; the actor splits big searches into narrower ones, but heavy filters work best.

❓ Facebook Ads Library scraper FAQ

Can I scrape the Facebook Ads Library legally?

The actor only collects ads that the Meta Ad Library shows publicly, without logging in. Scraping publicly available data is generally considered lawful (see hiQ Labs v. LinkedIn), but you are responsible for following Meta's terms and applicable laws such as GDPR when you use the data.

What data does the Facebook Ads Library scraper return?

Ad copy, headline, link, call to action, images, videos, carousel cards, dates, status, platforms and the advertiser page. With Open ad details it adds the advertiser's Instagram account, about text, lifetime spend, payer and EU targeting and reach.

Max ads per search applies to each keyword, page or URL, and Max ads in total limits the whole run. The library scrolls a few hundred ads at a time, so bigger searches are split into narrower ones by date, country and filters.

Do I need a proxy to scrape the Facebook Ads Library?

The input defaults to residential proxies, which work reliably. Runs also work without a proxy or with datacenter proxies, though results can vary.

How do I scrape the Facebook Ads Library with Python?

Use the Python example above, then iterate over the dataset items.

Can I run this Facebook ads scraper on a schedule?

Yes, with Apify Schedules. Add a Cache project name and every run returns only ads not seen before under that name.

What output formats are supported?

JSON, CSV, Excel, XML and RSS, either from the Output tab or through the Apify API.

Why do some ads have no spend or impressions?

The Ad Library publishes spend and impression ranges only for political and issue ads, and targeting only for ads delivered in the EU, so those fields are null for other ads.

🔗 Relevant actors for Facebook ads data

ScraperDescription
Google Ads Transparency Center ScraperScrape ads from the Google Ads Transparency Center by advertiser or domain.
TikTok Ad Library ScraperScrape ads from the TikTok Ad Library by keyword or advertiser.
Facebook Events ScraperScrape public Facebook events by keyword, location and date, no login.

🔗 Other actors you may find useful

ScraperDescription
Kiwi.com Flight ScraperScrapes flight prices and routes from Kiwi.com.
Total Wine ScraperScrape Total Wine & More products, prices and stock.
Carousell Products ScraperScrape Carousell listings with prices and seller details.
WHOIS Domain Lookup ScraperBulk WHOIS lookups for domain owners and dates.
Incidecoder ScraperScrapes skincare products and ingredient analysis.

💬 Support & contact

If you encounter any issues or have questions, please open an issue.

You can also find more of our actors on the Actor Flow page.