Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Pricing

from $1.50 / 1,000 ads

Go to Apify Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

Scrape the Meta (Facebook & Instagram) Ad Library by keyword, Facebook Page or Ad Library URL. Get every ad's text, images, videos, dates, platforms and advertiser.

Pricing

from $1.50 / 1,000 ads

Rating

0.0

(0)

Developer

Alkausari M

Alkausari M

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

12 hours ago

Last modified

Categories

Share

Facebook Ads Library Scraper extracts ads from the Meta Ad Library — Facebook, Instagram, Messenger, Threads and Audience Network — with no account, API key or browser needed. One Actor covers five jobs:

  • 🔎 Search by keyword — every ad that mentions a brand, product or topic, in any country, with all the website's filters: status, category, media type, platforms, languages, dates and sort order.
  • 🏢 All ads of an advertiser — paste a Facebook Page link, username or page ID and get every ad that Page is running.
  • 🖼️ Images and videos that keep working — Facebook's media links expire after about 4 days. Turn on Save images and videos and every file is copied to your storage with a permanent link.
  • 🇪🇺 Who paid, who was targeted, how many people saw it — EU and UK reach broken down by country, age and gender, the payer and beneficiary, targeted locations, ages and gender, plus the advertiser's Instagram username, followers and verification.
  • 🔔 Only new ads, every day — schedule the Actor and it saves only the ads it hasn't seen before, so each run brings you just what's new.

Paste keywords, Pages and Ad Library links — or mix them in one run. The first ads arrive within seconds, a search runs at about 250 ads a minute, and results export to CSV, Excel or JSON, or flow into Google Sheets, Zapier and Make.

Use cases

  • 🕵️ Competitor research — see every ad a competitor runs: the copy, creatives, landing pages, offers, and how long each ad has been live
  • 💡 Creative inspiration — collect winning ads in your niche; the longest-running ads are usually the ones that work
  • 📇 Lead generation — find businesses that are actively spending on ads, with their Page, website, Instagram account and follower count
  • 🗳️ Political and issue ad research — spending ranges, impressions and "paid for by" disclaimers for political ads
  • 🛡️ Brand protection — catch ads that misuse your brand name or copy your products

What you get

For each ad
📝 The adText, headline, link caption, button, landing page, and every card of carousel and catalog ads
🖼️ CreativesImage links, video links (HD and SD) and preview images — or permanent copies of the files
📅 TimingStart date, end date for finished ads, days running, active or not
📣 Where it ranFacebook, Instagram, Messenger, Threads, Audience Network
🏢 AdvertiserPage name, link, ID, likes, categories and profile picture
🧬 VersionsHow many versions of the ad Facebook grouped together
🗳️ Political adsSpend range, impressions, currency and "paid for by" disclaimer
🇪🇺 Transparency (optional)EU and UK reach by country, age and gender; payer and beneficiary; targeted locations, ages and gender
📸 Advertiser profile (optional)Instagram username, followers and verification; Facebook likes, category and verification badge; Page description

How to run the Actor

  1. Click Try for free.
  2. Type Keywords, paste Facebook Pages, or paste Ad Library URLs — or all three.
  3. Pick the Country and other filters, and set Max ads per search.
  4. Press Start, then open the Output tab and export.

Here is what each kind of input gives you:

PasteYou get
Keyword (running shoes)Ads that contain the words, filtered by the settings you pick
Facebook Page (facebook.com/nike, nike or 15087023444)Every ad that Page runs
Ad Library search URLExactly what that search shows on the website, with its own filters
Single-ad link (…/ads/library/?id=123…)That one ad

The easiest way to get a complex search right: set it up on facebook.com/ads/library, then copy the URL from your browser into Ad Library URLs.

Input

SettingWhat it doesDefault
KeywordsWords or phrases to search for, one search each—
Facebook PagesPage links, usernames or page IDs — all their ads—
Ad Library URLsSearches or single ads copied from the Ad Library website—
Max ads per searchAds to save for each keyword, Page or URL (0 = all)100
CountryOnly ads shown in this countryAll countries
Ad statusActive ads, inactive ads, or bothActive
Ad categoryAll ads, or political/issue, housing, employment or financial adsAll
Keyword matchAny of the words, or the exact phraseAny words
Media typeImages, memes, videos, or ads without eitherAll
PlatformsOnly ads that ran on these platformsAll
Ad languagesOnly ads in these languages (en, es, de…)All
Shown from / untilOnly ads shown between these dates—
Sort byRelevance, newest first, or most impressionsRelevance
Only new adsSkip ads this search returned in earlier runsOff
Save images and videosCopy the creatives to storage with permanent linksOff
Include EU ad details and advertiser profileReach, targeting, payer and the advertiser's Instagram for each adOff
ProxyKeep Apify residential proxyResidential

The filters apply to keywords and Pages. Ad Library URLs keep the filters already in the URL.

Example input

{
"searchQueries": ["running shoes", "protein powder"],
"pages": ["https://www.facebook.com/nike"],
"country": "US",
"activeStatus": "active",
"sortBy": "newest",
"maxAdsPerSearch": 200
}

Output

One row per ad, with three ready-made views on the Output tab: Ads (with a preview of each creative), EU details & advertiser, and Saved media. Here is a real record from a keyword search in Germany with EU details on, shortened:

{
"adArchiveId": "2255540481904788",
"adLibraryUrl": "https://www.facebook.com/ads/library/?id=2255540481904788",
"isActive": true,
"startDate": "2026-07-31",
"daysRunning": 95,
"pageName": "Senior Health Insider",
"pageLikeCount": 11463,
"publisherPlatforms": ["FACEBOOK", "INSTAGRAM"],
"displayFormat": "IMAGE",
"title": "Buy 1, Get 2 FREE",
"body": "I came to America for one reason, says Chen Wei, founder of…",
"caption": "trybronoir.com",
"linkUrl": "https://trybronoir.com/pages/chen-10-reasons-people-over-50-feet-b1g2",
"ctaText": "Shop now",
"imageUrls": ["https://scontent-iad3-1.xx.fbcdn.net/v/t39.35426-6/759975836…"],
"versionsCount": 3,
"sourceInput": "sneakers",
"adDetails": {
"euTotalReach": 13969,
"targetLocations": [
{ "name": "Ireland", "type": "countries" },
{ "name": "Italy", "type": "countries" }
],
"targetGender": "All",
"targetAgeMin": 18,
"targetAgeMax": 65,
"reachByCountryAgeGender": [{ "country": "BE", "ageRange": "55-64", "male": 39, "female": 86, "unknown": 2 }],
"payers": [{ "payer": "Bronoir LLC", "beneficiary": "Bronoir LLC" }],
"uk": { "totalReach": 8022, "targetGender": "All", "targetAgeMin": 18, "targetAgeMax": 65 },
"advertiser": { "category": "Clothing store", "facebookLikes": 11463, "facebookVerification": "NOT_VERIFIED" }
}
}

With Save images and videos on, each ad also lists its stored files:

"mediaFiles": [
{
"type": "image",
"sourceUrl": "https://scontent-iad3-2.xx.fbcdn.net/v/t39.35426-6/700927950…",
"url": "https://api.apify.com/v2/key-value-stores/weuGi9waaHoWNL64z/records/ad-1550534860016399-1.jpg"
}
]

Every record in a run carries the same columns, left empty where an ad doesn't have something — so Zapier, Make and Sheets can map them from a single sample.

Pricing

You pay per ad saved, so the bill is simply how many ads you asked for:

AdsAds onlyWith saved media or EU detailsWith both
100$0.15$0.35$0.55
1,000$1.50$3.50$5.50
10,000$15.00$35.00$55.00

Save images and videos adds $2.00 per 1,000 ads, however many files each ad has, and EU ad details and advertiser profile adds $2.00 per 1,000 ads. Ads whose files couldn't be saved, or whose details Facebook doesn't return, aren't charged the extra. An ad found by two of your searches in the same run is charged once, and with Only new ads on, ads seen in earlier runs are never charged again.

Set a Maximum cost per run in the run options and the Actor works out how many ads that pays for, then stops there — it never fetches ads you won't be billed for.

Getting past Facebook's 2,500-ad limit

The Ad Library shows at most about 2,500 ads for any one search, even when it says 20,000 match. The Actor notices when Facebook stops giving new ads and ends that search, so you never pay for repeats. To get more, split a big search into smaller ones — each gets its own 2,500:

Split byExample
CountryThe same keyword once for US, once for GB, once for DE
Date rangeOne search per month with Shown from / until
Media typeOne search for images, one for videos
LanguageOne search per ad language

An ad that turns up in two of your searches is saved once per run.

Integrations & scheduling

Results don't have to stay on Apify. Without writing any code you can:

  • Send ads to Google Sheets, Airtable or Slack — pick the integration on the Actor's Integrations tab and every run appends its results automatically.
  • Connect anything else via Zapier or Make — thousands of apps, triggered when a run finishes.
  • Fire a webhook to your own server the moment a run completes, with a link to the fresh dataset.
  • Pull the data over the API in JSON, CSV, Excel or XML — one URL, ideal for a script or notebook.

Track competitors on autopilot. Put their Pages into Facebook Pages, turn on Only new ads, set Sort by to Newest first, and schedule the Actor daily. Each run saves just the ads that appeared since the last one — send them to Slack or a sheet and you have a competitor ad alert with no code at all.

Tips

  • For EU reach and targeting, pick an EU country. With "All countries", most ads come from outside the EU, where Facebook doesn't publish them.
  • For inactive ads, also pick an EU country: Facebook keeps inactive ads only for political/issue ads everywhere, and for any ad shown in the EU (for one year).
  • Newest first sorting finds fresh ads fastest and works best with Only new ads.
  • Most impressions sorting surfaces the ads seen by the most people.

Good to know

  • Residential proxy — Facebook refuses ad results to datacenter IPs. Without residential proxy, each search stops after the first ~30 ads, which come with the page itself.
  • Ad counts — the number Facebook shows for a search counts every version of every ad. Results group the versions together, so a search can return fewer rows than its count; versionsCount says how many versions each row stands for.
  • Catalog ads — dynamic product ads (format DPA) use templates such as {{product.name}} in their text; the products themselves are in the cards.
  • Dates — start and end dates are Ad Library dates in US Pacific time, as on the website. Active ads have no end date.
  • Only new ads — the first run saves everything up to Max ads per search and remembers it; later runs save only ads it hasn't seen. Each keyword, Page and filter combination is remembered separately.
  • Political ads — spend, impressions and disclaimers are filled for political and issue ads only; Facebook doesn't publish them for other ads.

📮 Support

Bugs, feature requests, or custom scraping work — open an issue on Apify, email alkausarimujahid@gmail.com, or visit my website ayzalsoft.com.