Meta (Facebook & Instagram) Ads Library Scraper avatar

Meta (Facebook & Instagram) Ads Library Scraper

Pricing

from $0.15 / 1,000 results

Go to Apify Store
Meta (Facebook & Instagram) Ads Library Scraper

Meta (Facebook & Instagram) Ads Library Scraper

Scrape all Facebook & Instagram ads of any page from the Meta Ad Library. Extract ad creatives, texts, titles, CTAs, image & HD video URLs, spend, reach and dates. Fast parallel scraping, multiple pages per run, date filters, no login or API key. Daily checks to ensure quality!

Pricing

from $0.15 / 1,000 results

Rating

5.0

(4)

Developer

Mary Lou

Mary Lou

Maintained by Community

Actor stats

4

Bookmarked

10

Total users

7

Monthly active users

2 hours ago

Last modified

Share

See every ad your competitors are running — or every ad mentioning your keyword — and download it all as a spreadsheet.

Facebook's Ad Library shows every ad any page is running on Facebook and Instagram. It's public, but you can only scroll it one ad at a time in a browser, and you can't export anything.

This scraper does that scrolling for you. Give it a page (or ten), or just a keyword to search across every advertiser, press start, and you get a clean table of every ad: the ad copy, the headline, the button, the landing page link, and direct links to every image and video — ready to open in Excel, Google Sheets, or push into your own tools.

No Facebook account. No API key. No coding.


What you can use it for

  • 🔍 Competitor research — see exactly which ads a competitor is running right now, and which ones they've been running for months (long-running ads are usually their winners)
  • 🎨 Creative inspiration — download competitor images and videos to study hooks, formats and angles before your next campaign
  • 📈 Track over time — run it on a schedule and watch when competitors launch, pause, or scale creatives
  • 📊 Market research — search a keyword and pull ads from an entire industry at once, whoever is running them, and analyse messaging trends
  • 🧲 Find advertisers you don't know yet — a keyword search surfaces every page advertising on that topic, not just the brands you already track
  • 🕵️ Ad spying at scale — thousands of ads across many brands in one run, instead of endless manual scrolling

How to use it — step by step

1. Find the brand in the Ad Library

Go to facebook.com/ads/library, pick your country, choose All ads, and search for the brand name. Click the brand to open its page of ads.

2. Copy the URL from your browser's address bar

It will look something like this:

https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=ALL&search_type=page&view_all_page_id=116700222203350

3. Paste it into the "Ad Library URLs" field

That's the only thing you have to fill in. You can paste several URLs — one per line — to scrape multiple brands in the same run.

4. (Optional) Set a limit while you're testing

Put 50 in Max ads for your first run so you can see the output quickly and cheaply. Remove it later to get everything.

5. Click Start

Results appear in the Storage → Dataset tab as they're scraped. When it's finished, use the Export button for CSV, Excel, JSON, or copy the API link.

Don't want to bother with URLs? Just put the numeric page ID into the Page IDs field instead. It's the view_all_page_id= number in the Ad Library URL.

Searching by keyword instead of by page

Don't have a specific brand in mind? Type a word or phrase into the Keyword field (or several into Keywords) and the scraper searches the whole Ad Library, returning matching ads from every advertiser — exactly like typing it into the Ad Library search box. Pasting a keyword search URL from your browser (the ones with q= in them) works too.

Two match types, set with Keyword match type:

  • Any order (default) — the words can appear anywhere in the ad, in any order. Same as the Ad Library's own default.
  • Exact phrase — the words must appear together, in that order.

Keyword searches can match tens of thousands of ads, so set Max ads and narrow the Country and dates on your first run. And clear the Page ID field if it's prefilled — otherwise that page gets scraped as well.


Input options

Everything is optional except telling it what to scrape — a page or a keyword.

SettingWhat it does
Ad Library URLsPaste one or more URLs copied from your browser — page URLs (view_all_page_id=) or keyword search URLs (q=). Each URL keeps its own filters (country, dates, active status). This is the easiest way to use the scraper.
Ad Library URLSame thing, for a single URL.
Page IDsNumeric page IDs instead of full URLs, if you already have them.
Page IDA single numeric page ID. Clear it if you're searching by keyword.
KeywordSearch every advertiser's ads for this word or phrase, instead of scraping one page.
KeywordsSeveral keywords in one run, all using the settings below.
Keyword match typeAny order (default) or Exact phrase. Applies to keyword searches only.
Active statusAll ads = the page's entire history (often far more than the Ad Library shows by default). Active only = ads running right now. Inactive only = ads that have stopped.
CountryLimit to ads shown in one country, or ALL for everywhere.
Start date from / toOnly ads that were running during this window. Note this is not "created in" — an ad that started last year and is still running today will show up in a window covering today.
Max adsStop after this many ads in total. Great for testing, and for keeping costs predictable. Leave empty to get everything.
Max concurrencyHow many pages/date-ranges to scrape at the same time. 1 is the safe default. 3 is roughly 3× faster for big brands. Higher = faster but slightly more likely to be rate-limited.
Delay between pages (ms)Politeness pause between requests. Default 300 works well. Increase to 1000+ if you ever see captcha warnings in the log.
Raw outputOff by default. Turn on only if you want Facebook's untouched raw data structure.
ProxyLeave on Residential — this is required for reliable results.

Example: one competitor, everything they've ever run

{
"adLibraryUrls": [
"https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=ALL&search_type=page&view_all_page_id=116700222203350"
]
}

Example: three competitors' currently-active ads, fast

{
"adLibraryUrls": [
"https://www.facebook.com/ads/library/?active_status=active&country=ALL&search_type=page&view_all_page_id=116700222203350",
"https://www.facebook.com/ads/library/?active_status=active&country=ALL&search_type=page&view_all_page_id=102921707941613",
"https://www.facebook.com/ads/library/?active_status=active&country=US&search_type=page&view_all_page_id=688155977722463"
],
"maxConcurrency": 3
}

Example: every advertiser running ads about a topic

{
"keyword": "running shoes",
"searchType": "keyword_unordered",
"country": "US",
"activeStatus": "active",
"maxAds": 500
}

Example: several keywords, exact phrases only

{
"keywords": ["free trial", "money back guarantee"],
"searchType": "keyword_exact_phrase",
"country": "GB",
"maxAds": 1000,
"maxConcurrency": 3
}

Example: quick, cheap test run

{
"pageIDs": ["116700222203350"],
"activeStatus": "active",
"maxAds": 50
}

What you get

One row per ad. Here's a real (shortened) example:

{
"ad_archive_id": "1227225301509075",
"page_id": "116700222203350",
"page_name": "BetterMe",
"is_active": true,
"start_date": 1723359600,
"end_date": 1787468400,
"publisher_platform": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER"],
"collation_count": 1,
"snapshot": {
"title": "Entrenador personal 24/7 en la aplicación",
"body": { "text": "Plan de 28 Días para lograr un peso saludable en casa." },
"caption": "itunes.apple.com",
"cta_text": "Install now",
"cta_type": "INSTALL_MOBILE_APP",
"link_url": "http://itunes.apple.com/app/id1264546236",
"display_format": "VIDEO",
"videos": [{ "video_hd_url": "https://...", "video_preview_image_url": "https://..." }],
"images": [],
"page_like_count": 6197887,
"page_categories": ["Health/beauty"]
}
}

The fields you'll care about most:

FieldWhat it is
snapshot.body.textThe main ad copy
snapshot.titleThe headline
snapshot.cta_text / cta_typeThe button ("Shop now", "Install now"…)
snapshot.link_urlWhere the ad sends people
snapshot.images[]Direct image URLs (full resolution)
snapshot.videos[]Direct video URLs (HD, SD, and thumbnail)
snapshot.display_formatVIDEO, IMAGE, DCO, carousel…
is_activeIs it still running right now
start_date / end_dateWhen it ran (Unix timestamps)
publisher_platformFacebook, Instagram, Messenger, Threads…
collation_countHow many variants of this ad exist
page_name, snapshot.page_like_countWho's running it, and how big they are
spend, currency, reach_estimateOnly filled for political/social-issue ads, where Meta discloses it. Blank for normal commercial ads — that's a Facebook limitation, not a scraper one.

Every row has the same columns, so nothing breaks when you open it in a spreadsheet. Fields Facebook doesn't provide come back empty rather than missing.

Export: CSV, Excel, JSON, XML, or an API endpoint — from the Export button on the run's Dataset tab.


Speed and limits

Facebook hands out ads in small batches, so time scales with the number of ads:

Ads on the pageRoughly how long
200~30 seconds
1,000~2–3 minutes
10,000~10 minutes at Max concurrency 3

Turning Max concurrency up to 3–4 is the single best way to speed up big brands — the scraper automatically splits their history into date ranges and works on several at once.

If a run is interrupted (you abort it, the platform restarts it, or Facebook rate-limits part of it), progress is saved automatically. A platform restart resumes by itself. If you start a new run afterwards, it scrapes fresh by default so your dataset is always complete in one place — or turn on Continue from last run to fetch only what the interrupted run missed (its ads stay in that run's dataset).


Cost

$0.15 per 1,000 ads, plus Apify platform usage. Nothing for runs that find nothing.

Most Ad Library scrapers roll infrastructure into one flat per-result price, with a markup baked in. This one keeps the two separate: you pay $0.15 per 1,000 ads for the scraping itself, and Apify bills the compute and proxy traffic at your plan's own rate — the same credits your subscription already includes.

What you scrapeScraper charge+ Platform usageRoughly
200 ads (one brand's active ads)$0.03~$0.02~$0.05
1,000 ads$0.15~$0.10~$0.25
10,000 ads$1.50~$1.00~$2.50
100,000 ads$15.00~$10.00~$25.00

Usage figures are measured from real runs on the Free plan rate and rounded up. Expect roughly $0.06–$0.12 per 1,000 ads depending on run shape — long history scrapes split into more parallel sessions and use a little more proxy traffic than a quick active-ads snapshot.

Usage gets cheaper as your plan goes up

The $0.15 scraper charge is the same on every plan. The usage half isn't — Apify discounts it at higher tiers, so the same scrape costs less on a bigger plan:

PlanComputeResidential proxy
Free$0.20 / CU$8.00 / GB
Starter$0.20 / CU$8.00 / GB
Scale$0.16 / CU$7.50 / GB
Business$0.13 / CU$7.00 / GB

Platform usage is drawn from the prepaid usage credit your plan already includes, so on a paid plan a good part of it is money you've spent regardless. See Apify pricing for the full rate card.

Keeping it predictable

  • Set Max ads. The scraper stops exactly there. Perfect for testing, and for putting a hard ceiling on any single run.
  • Set a maximum cost per run (in the run options). The scraper checks this before it starts and stops as soon as it has delivered what your budget covers — it will never quietly keep scraping past what you're paying for.

A whole-archive scrape of a very large advertiser can be tens of thousands of ads, so start with Active status: Active only or a Max ads limit if you just want a snapshot of what's running now.


Frequently asked questions

Do I need a Facebook account or login? No. The Ad Library is public information, and the scraper needs no account, password, cookies, or API token.

Do I need the official Meta Ad Library API? No — and it wouldn't help you anyway. Meta's official API only covers political and social-issue ads in most countries. This scraper returns all ad categories, with the full creatives and media URLs.

Is this legal? The Ad Library is Meta's own public ad-transparency tool, published deliberately so anyone can inspect advertising. This scraper only collects what's shown there — no private data, no logged-in data, no personal information. As with any scraping, you're responsible for how you use the data in your own jurisdiction.

Why do I get way more ads than the Ad Library page showed me? The Ad Library UI usually shows active ads by default. The scraper defaults to All ads, which includes everything the page has ever run — often 10–100× more. Set Active status to Active only if you want to match what you saw on screen.

I set a date range but I'm getting ads that started before it. Why? Facebook's date filter means "was this ad running during this window", not "did it start in this window". A long-running evergreen ad legitimately matches every window it was live in. This is Facebook's behaviour, and the same thing happens in the Ad Library UI.

What about spend and reach? Meta only discloses spend and reach for political and social-issue ads. For normal commercial ads those fields come back empty — nobody can scrape numbers Facebook doesn't publish.

Can I scrape several competitors at once? Yes. Paste multiple URLs into Ad Library URLs and set Max concurrency to 3. They'll be scraped in parallel into one dataset, and Max ads applies across all of them combined.

Can I run this automatically every day/week? Yes — use Apify Schedules on this Actor. A common setup is a daily run per competitor, so you can diff the results and spot new creatives.

How do I get the images and videos themselves? The dataset gives you direct URLs. Open them in a browser, or feed the column to any bulk downloader. The scraper doesn't re-host media files.

The log shows a captcha warning — what do I do? That means Facebook rate-limited part of the run. Progress is saved, so re-run to continue. To avoid it, lower Max concurrency or raise Delay between pages.

Can it search by keyword instead of by page? Yes. Put a word or phrase in the Keyword field (or paste a keyword search URL with q= in it) and it returns matching ads from every advertiser, with the same output columns as a page scrape. Choose Any order or Exact phrase with Keyword match type. Keyword searches can match tens of thousands of ads, so set Max ads and narrow the country and dates first.

Can I mix pages and keywords in one run? Yes — fill in both, and every target is scraped in the same run (in parallel when Max concurrency is above 1). Max ads counts across all of them together.


Support

Found a bug, need a field that isn't there, or want a custom scraping setup? Open an issue on the Actor's Issues tab and I'll take a look.