Facebook Ads Library Scraper — Meta & Instagram Ad Spy avatar

Facebook Ads Library Scraper — Meta & Instagram Ad Spy

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Facebook Ads Library Scraper — Meta & Instagram Ad Spy

Facebook Ads Library Scraper — Meta & Instagram Ad Spy

Facebook & Instagram ad spy. Scrape the Meta Ad Library by keyword, page, or ad archive ID. Extract creatives, ad copy, video URLs, landing pages, run dates, platforms, EU DSA disclosures, political-ad spend. All 240+ countries, all 6 ad categories. No Facebook login required.

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

Raven

Raven

Maintained by Community

Actor stats

0

Bookmarked

62

Total users

11

Monthly active users

16 days ago

Last modified

Share

Facebook Ads Library Scraper — Meta & Instagram Ad Spy, Competitor Research & Winning Ads Finder

Scrape the Meta Ad Library (Facebook, Instagram, Audience Network, Messenger, Threads) by keyword, Facebook page, or single ad archive ID — and get clean, flat JSON with up to 39 fields per ad: creatives, ad copy, video URLs, landing pages, run dates, carousel cards, EU DSA disclosures, and political-ad spend.

From $1.00 per 1,000 ads on paid Apify plans ($1.50 per 1,000 on the free plan) — a fraction of what most Meta ad scrapers charge. No Facebook login, no Meta developer app, no API key, no code, no proxies to configure. Your first ~3,300 ads every month are covered by Apify's free plan credits.


What does this Facebook Ads Library Scraper do?

The Meta Ad Library is Meta's public transparency database of every ad running on Facebook, Instagram, Messenger, Threads, and the Audience Network. Its official API is restricted — it requires a Meta developer app, identity verification, access tokens, and primarily covers political and issue ads. This actor is the unofficial Meta Ad Library API alternative: it reads the same public pages the Ad Library website serves to anonymous visitors and turns them into structured data in seconds.

Three explicit scraping modes:

Mode (scrapeType)What you put in itemsWhat you get
searchKeywords: nike, weight loss, iphone caseAll ads matching the query, paginated automatically
pageAdsPage IDs or URLs: https://facebook.com/nike or 15087023444Every ad currently or previously run by that page
adDetailArchive IDs or ad URLs: ...?id=987654321...Full creative + metadata for one specific ad

Filter by 250 countries and territories (or worldwide), all 6 Meta ad categories (including Financial Products & Services), active/inactive status, and media type (image, video, meme). Results stream into the dataset as they're scraped, ready to export as JSON, CSV, Excel, or XML.


Why use this Meta ads scraper?

  • 39 output fields per ad — including carousel/DPA card-level data, reachEstimate, totalActiveTime, EU DSA regionalRegulationData, and Meta's AI-content disclosure flag.
  • Dedicated single-ad mode — paste an Ad Library URL or archive ID and get that exact ad back. Most scrapers only do keyword search.
  • Unlimited results — set maxAds: 0 and it paginates until Meta runs out of ads.
  • Vanity URLs auto-resolved — paste facebook.com/nike and the actor finds the numeric page ID itself.
  • All 6 ad categories — political & issue, employment, housing, credit, financial products, or all at once.
  • Up to 20 items in parallel — bulk keyword lists and page lists finish fast.
  • Self-healing sessions — Chrome TLS-fingerprint impersonation, automatic solving of Meta's JS bot challenge, and automatic session renewal on rate limits.
  • Pay per result only — zero-result runs cost you nothing.

This actor vs. the official API vs. typical scrapers

Official Meta Ad Library APITypical Apify scrapersThis actor
SetupDeveloper app + ID verification + tokensApify accountApify account
Ad coveragePrimarily political & issue adsAll adsAll ads
Single-ad lookup by archive IDUsually ❌✅ dedicated mode
Carousel card-level dataOften partial✅ every card with its own copy, CTA, link, media
Result capRate-limited quotasOften capped per runmaxAds: 0 = unlimited
PriceFree but restricted$3–$17 per 1,000 ads$1.00–$1.50 per 1,000 ads

What data can you extract from the Facebook Ad Library?

One flat JSON record per ad, with up to 39 fields:

GroupFields
IdentifiersadArchiveId, adLibraryUrl, collationId, collationCount, scrapedAt
Advertiser pagepageId, pageName, pageProfileUrl, pageProfilePictureUrl, pageLikeCount, pageCategories, pageIsDeleted
Ad copyadContent (primary text), adTitle, adLinkDescription, adLinkCaption
Links & CTAadLinkUrl (landing page), adCallToActionType, adCallToActionText
CreativesadFormat (image / video / carousel / dpa / text), imageUrls, videoUrls (HD where available), videoPreviewImageUrls, cards (per-card title, body, CTA, link, image, video)
Timing & statusstartDate, endDate, isActive, totalActiveTime
Distributionplatforms (FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, THREADS), countries, categories
Transparencyimpressions, spend, currency, fundingEntity, reachEstimate, regionalRegulationData (EU DSA), containsSensitiveContent, containsDigitalCreatedMedia (AI-disclosure flag)

To keep records clean, fields that Meta doesn't populate for a given ad are omitted from that record (not returned as null).

Which ads show spend and impressions?

Meta only exposes performance data for regulated ad categories — that's a Meta policy, not a scraper limitation:

DataRegular commercial adsPolitical & issue ads
spend, currency, fundingEntity❌ not exposed by Meta✅ ranges + "Paid for by"
impressions❌ (index only)✅ ranges
reachEstimaterarely✅ where available
regionalRegulationData (EU DSA)✅ EU-targeted ads
Creatives, copy, dates, platforms

Tip: for commercial ads, use totalActiveTime and startDate as performance proxies — an ad that keeps running for 60+ days keeps being paid for, which usually means it converts.


How to scrape the Facebook Ads Library (step by step)

  1. Open the actor on Apify and click Try for free — a free Apify account includes $5 of monthly usage credits (≈ 3,300 ads with this actor).
  2. Pick a scrape type — keyword search, all ads from a page, or a single ad.
  3. Enter your items — keywords, page URLs/IDs, or ad archive IDs, one per line.
  4. Set filters — country, ad category, active status, media type, and maxAds per item.
  5. Click Start. Results stream into the dataset while the run is still going.
  6. Export as JSON, CSV, Excel, or XML — or pipe them into Google Sheets, Make, Zapier, or your own code via the API.

How to export every ad a competitor is running

Set scrapeType: "pageAds", paste the brand's Facebook URL (no need to hunt for the numeric page ID — vanity slugs are resolved automatically), set activeStatus: "all" and maxAds: 0. The actor paginates through the page's entire ad history — current and past ads — until Meta returns no more pages.

How to look up a single ad by archive ID or URL

Copied an ad's link from the Ad Library UI (facebook.com/ads/library/?id=1677230640306960)? Set scrapeType: "adDetail" and paste the URL or just the numeric ID. You get the full creative and metadata for exactly that ad — useful for enriching IDs you collected earlier or monitoring specific creatives.


Input parameters

FieldTypeDefaultDescription
scrapeTypeenumsearchsearch | pageAds | adDetail
itemsstring[]Required. Keywords, page IDs/URLs, or ad archive IDs/URLs — one per line in the UI.
countryenumUSISO 3166-1 alpha-2 code (250 available), or ALL for worldwide.
adTypeenumALLALL, POLITICAL_AND_ISSUE_ADS, EMPLOYMENT_ADS, HOUSING_ADS, CREDIT_ADS, FINANCIAL_PRODUCTS_AND_SERVICES_ADS.
activeStatusenumactiveactive | inactive | all
mediaTypeenumallall | image | video | meme
maxAdsinteger100Max ads per input item. 0 = unlimited (paginate to the end).
maxConcurrencyinteger5Input items processed in parallel (1–20).
maxRetriesinteger5HTTP retry attempts on connection/TLS errors (1–15).
proxyConfigurationobjectApify Residential (US)Required. Residential recommended; the proxy editor also accepts your own custom proxy URLs.

Ready-to-paste input recipes

1. Find winning dropshipping video ads (ad spy)

{
"scrapeType": "search",
"items": ["posture corrector", "neck massager", "led face mask"],
"country": "US",
"activeStatus": "active",
"mediaType": "video",
"maxAds": 300,
"maxConcurrency": 3,
"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}

2. Export a competitor's complete ad history

{
"scrapeType": "pageAds",
"items": ["https://www.facebook.com/nike", "15087023444"],
"country": "US",
"activeStatus": "all",
"maxAds": 0,
"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}

3. Political ad spend & funding transparency

{
"scrapeType": "search",
"items": ["election", "climate policy"],
"country": "US",
"adType": "POLITICAL_AND_ISSUE_ADS",
"activeStatus": "all",
"maxAds": 1000,
"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}

4. Look up specific ads by URL or archive ID

{
"scrapeType": "adDetail",
"items": ["https://www.facebook.com/ads/library/?id=1677230640306960", "987654321012345"],
"country": "US",
"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}

5. EU DSA disclosure research (German market)

{
"scrapeType": "search",
"items": ["kredit", "versicherung"],
"country": "DE",
"adType": "FINANCIAL_PRODUCTS_AND_SERVICES_ADS",
"activeStatus": "active",
"maxAds": 500,
"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "DE" }
}

6. Bulk niche sweep — 10 keywords in parallel

{
"scrapeType": "search",
"items": ["protein powder", "creatine", "pre workout", "bcaa", "collagen", "greens powder", "electrolytes", "fat burner", "mass gainer", "whey isolate"],
"country": "US",
"activeStatus": "active",
"maxAds": 100,
"maxConcurrency": 10,
"proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "US" }
}

Output example

A real (truncated) record for a dynamic product ad. Empty/unavailable fields are omitted from each record:

{
"adArchiveId": "1677230640306960",
"adLibraryUrl": "https://www.facebook.com/ads/library/?id=1677230640306960&country=US",
"pageId": "151871258163795",
"pageName": "Amazon Fashion",
"pageProfilePictureUrl": "https://scontent-phx1-1.xx.fbcdn.net/v/t39.35426-6/604776825_...jpg",
"pageProfileUrl": "https://www.facebook.com/AmazonFashion/",
"pageLikeCount": 4214242,
"pageCategories": ["Clothing (Brand)"],
"pageIsDeleted": false,
"adContent": "Fits that go the distance and level up your A-game.",
"adTitle": "Amazon Fashion",
"adLinkCaption": "amazon.com",
"adLinkUrl": "https://www.amazon.com/b?node=210992350011&...",
"adCallToActionType": "SHOP_NOW",
"adCallToActionText": "Shop now",
"adFormat": "dpa",
"imageUrls": [
"https://scontent-phx1-1.xx.fbcdn.net/v/t39.35426-6/605282513_...jpg",
"https://scontent-phx1-1.xx.fbcdn.net/v/t39.35426-6/601802920_...jpg"
],
"videoUrls": [],
"videoPreviewImageUrls": [],
"cards": [
{
"title": "Amazon Fashion",
"body": "Fits that go the distance and level up your A-game.",
"caption": "amazon.com",
"link_description": "Online shopping for Nike Women's from a great selection...",
"link_url": "https://www.amazon.com/dp/B0F12WP9MX?...",
"cta_type": "SHOP_NOW",
"cta_text": "Shop Now",
"original_image_url": "https://scontent-phx1-1.xx.fbcdn.net/v/t39.35426-6/605282513_...jpg",
"resized_image_url": "https://scontent-phx1-1.xx.fbcdn.net/v/t39.35426-6/605282513_...jpg"
}
],
"startDate": "2026-02-12T08:00:00+00:00",
"endDate": "2026-04-26T07:00:00+00:00",
"isActive": true,
"containsSensitiveContent": false,
"containsDigitalCreatedMedia": false,
"platforms": ["FACEBOOK", "INSTAGRAM"],
"categories": ["UNKNOWN"],
"regionalRegulationData": {
"finserv": { "is_deemed_finserv": false, "is_limited_delivery": false },
"tw_anti_scam": { "is_limited_delivery": false }
},
"scrapedAt": "2026-04-29T09:44:37.286884+00:00"
}

Political and issue ads additionally carry spend, currency, impressions ranges, and fundingEntity ("Paid for by ...").


How much does it cost to scrape the Facebook Ads Library?

You pay per ad delivered to the dataset — nothing else. No platform-usage surcharges, no subscription, no charge for runs that return nothing.

PlanPrice per adPrice per 1,000 ads
Apify Free$0.0015$1.50
Paid Apify plansfrom $0.001from $1.00

Worked examples:

ScenarioAdsFree planPaid plans
One brand's active ads500$0.75$0.50
Niche keyword sweep5,000$7.50$5.00
Full competitor set, all history20,000$30.00$20.00

Apify's free plan includes $5 of usage credits every month — roughly 3,300 ads/month at no cost. For comparison, most Meta ads scrapers on Apify charge $3–$17 per 1,000 ads.


Integrations: Google Sheets, Make, Zapier, n8n & more

Connect the dataset to your stack with Apify's native integrations:

  • Google Sheets — append new ads to a spreadsheet after every run.
  • Make, Zapier, n8n — trigger downstream automation (alerts, enrichment, reports).
  • Slack / email — get notified when a competitor launches new creatives.
  • Webhooks — POST run results to your own endpoint.
  • API clientsJavaScript and Python clients, or plain REST.
  • Schedules — run it hourly/daily/weekly with cron-style scheduling in the Apify Console.

Use with AI agents (MCP)

This actor works out of the box with the Apify MCP server, so AI agents and assistants (Claude, Cursor, VS Code, LibreChat, custom agents) can call it as a tool. Example prompt:

"Scrape the 100 most recent active Facebook ads for 'standing desk' in the US, then summarize the top hooks, offers, and CTA types the advertisers are using."

The agent runs this actor via MCP, waits for the dataset, and analyzes the results — no glue code needed.


  • Ad spy & competitor research — track every Facebook & Instagram ad your competitors run, when they launched, in which countries.
  • Dropshipping & e-commerce creative research — filter mediaType: video and rank by totalActiveTime to surface long-running (likely profitable) creatives.
  • Media buying intelligence — pull whole page ad libraries, filter isActive, and watch launch cadence.
  • Political ad transparency & journalism — spend ranges, impressions, funding entities, and regional disclosures for political/issue ads.
  • Brand & trademark monitoring — alert when your brand name shows up in other advertisers' creatives.
  • Affiliate marketing — see which offers and angles are being promoted in your niche right now.
  • Agency reporting — bulk-export client + competitor ad libraries into Looker, Tableau, BigQuery, or Sheets.
  • AI / LLM training data — a clean, structured corpus of real ad copy and creative URLs.
  • EU DSA compliance researchregionalRegulationData carries the Digital Services Act disclosures Meta exposes for EU-targeted ads.

The Ad Library is a public transparency tool Meta operates specifically so that journalists, researchers, regulators, and competitors can inspect ads. This actor accesses only that public data — no login, no private information. Scraping publicly available data is generally legal, but you're responsible for how you use it: respect Meta's terms for commercial use, don't republish creatives you don't own, and be mindful of GDPR when any personal data is involved. Read more in Apify's guide: Is web scraping legal?


FAQ

Does the Facebook Ad Library have a public API?

Officially yes, but it's heavily restricted: it requires a verified Meta developer account, an approved app, and access tokens, and it primarily covers political and issue ads. This actor is the practical alternative — it reads the same public Ad Library pages anyone can open in a browser and covers all ad types.

Do I need a Facebook account or API key?

No. The Ad Library is public. The actor uses no cookies, tokens, or Graph API access — just the HTML and GraphQL endpoints the website serves to anonymous visitors.

Do I need proxies?

The default configuration already uses Apify residential proxies, which work reliably. You can also plug your own proxy URLs into the proxy editor. Datacenter IPs are frequently blocked by Meta, so residential is recommended.

Can I export to CSV or Excel?

Yes. Every run's dataset can be downloaded as JSON, CSV, Excel, or XML straight from the Apify Console, or fetched via the API.

Will I be charged for runs that return nothing?

No. You're charged per ad pushed to the dataset. A run that finds zero ads costs zero.

Why did I get fewer ads than expected?

Common reasons: the ads only run in a different country than the one you filtered (try country: "ALL"), the ads are inactive (activeStatus: "all" includes past ads), or maxAds capped the run. Meta's own result counts are also approximate.

The actor returned 0 ads — what should I do?

Check the country filter first (an ad targeted only at Germany won't appear under US), switch activeStatus to all, and verify the keyword or page actually has ads in the Ad Library UI. Zero-result runs don't cost anything, so testing filters is free.

Why are some fields missing from my records?

Two reasons. First, Meta only exposes spend, impressions, and fundingEntity for political/issue ads — commercial ads never carry them. Second, this actor omits empty fields from each record instead of writing null, so records only contain data that actually exists.

How do I scrape all ads from a competitor's Facebook page?

Set scrapeType: "pageAds", paste the page URL (vanity names like facebook.com/nike are resolved to numeric IDs automatically), set activeStatus: "all" and maxAds: 0.

Can I get Instagram-only ads?

Every record includes a platforms array (FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, THREADS). Scrape normally and filter records where platforms contains only INSTAGRAM in your spreadsheet or code.

How fresh is the data?

Real-time. Every run hits the Ad Library directly — there's no cache in between. scrapedAt timestamps every record.

What is containsDigitalCreatedMedia?

Meta's AI-content disclosure flag: true means the advertiser disclosed that the creative was generated or significantly altered with AI. Useful for tracking AI-generated ad creative adoption.

Can I schedule recurring scrapes?

Yes — use Apify Schedules to run the actor daily or weekly with the same input, and pair it with the Google Sheets or Slack integration to get a rolling feed of new competitor ads.

Is there a limit on how many ads I can scrape?

maxAds accepts up to 10,000 per input item, or set it to 0 for unlimited pagination. Long runs stream results continuously, so partial data is available even before the run finishes.


Feedback & support

Found a bug or missing a feature? Open a ticket on the Issues tab of this actor — issues are monitored and fixes usually ship quickly. If a run misbehaves, include the run ID so it can be reproduced.


More scrapers by this developer


Tags: facebook ads scraper, meta ad library scraper, facebook ad library api alternative, instagram ads scraper, ad spy tool, competitor ad research, dropshipping winning products, ad creative research, facebook ads bulk export, meta ads database, political ads scraper, EU DSA ads, AI ad disclosure, carousel ad scraper, DPA scraper, facebook ads JSON CSV export, media buying intelligence, brand monitoring, affiliate ad research, agency reporting