๐ข Facebook Ads Library Scraper [From ๐ฐ$0.45/1K]
Pricing
from $0.45 / 1,000 results
๐ข Facebook Ads Library Scraper [From ๐ฐ$0.45/1K]
[From $0.45/1K] Extract active & inactive ads from the Meta / Facebook Ad Library by keyword, advertiser Page ID, or Ad Library URL โ HD video MP4s, images, carousel cards, unwrapped landing pages, UTMs & days running.
Pricing
from $0.45 / 1,000 results
Rating
0.0
(0)
Developer
Khan
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
3 hours ago
Last modified
Categories
Share
Extract active and inactive ads from the Meta / Facebook Ad Library (facebook.com/ads/library) by search keyword, competitor brand, advertiser Facebook Page ID, or direct Ad Library URL โ including HD & SD video MP4 links, high-resolution images, carousel/DCO cards, clean unwrapped destination URLs, UTM parameters, days running, and EU/DSA transparency reach data. Zero Facebook login, cookies, or proxy configuration required.
Built for performance marketers, D2C e-commerce brands, creative strategists, media buyers, B2B lead generation teams, and ad spy intelligence platforms who need fast, structured creative and funnel data from Facebook, Instagram, Messenger, Audience Network, and Threads ads.
โจ Key Features
| Feature | Why It Matters |
|---|---|
| ๐ Multi-Mode Input (Keywords, Page IDs, or URLs) | Search by product keywords ("creatine gummies", "medspa"), advertiser Facebook Page IDs (view_all_page_id), Facebook Page URLs, or full Ad Library search URLs. |
| ๐ฌ Direct HD & SD Video MP4s + Carousel Cards | Extracts direct videoHdUrl, videoSdUrl, preview thumbnails, high-resolution imageUrls, and every individual card inside CAROUSEL and DCO (Dynamic Creative) ads. |
| ๐ Clean Unwrapped Destination URLs & UTMs | Automatically unwraps l.facebook.com/l.php?u=... redirect links, strips fbclid tracking noise, extracts landingPageDomain, parses utmParameters, and classifies funnelType (shopify_ecommerce, click_to_whatsapp, lead_gen_form, calendly_booking, custom_lander). |
๐ Winning Ad Longevity Filter (minDaysRunning) | Computes exact daysRunning, collationCount (number of active duplicate variations), and isScalingWinner so you can filter strictly for proven, profitable ads running 14+, 30+, or 60+ days. |
| ๐ช๐บ EU/UK DSA Transparency & Political Spend Data | Captures euTotalReach, impressionsText, spend, currency, and byline disclaimers whenever disclosed by Meta Ad Library. |
| ๐ก๏ธ Zero Login & Built-In Anti-Blocking | Works 100% without Facebook cookies or accounts. Automatic residential proxy rotation and challenge handling are included out of the box. |
| ๐ง Landing Page Contacts Enrichment (Optional) | Toggle scrapeContacts to crawl each unique ad landing-page domain for emails, phones, and social profiles. Charged once per unique domain on success (website-contacts PPE event). |
| ๐งฉ Landing Page Tech Stack Scan (Optional) | Toggle scrapeTechStack to detect CMS, analytics, pixels, and frameworks on each unique landing domain. Charged once per unique domain on success (tech-stack PPE event). |
| ๐ Ready for Automation & AI Workflows | Export directly to JSON, CSV, Excel, Google Sheets, Make, n8n, Clay, or Zapier, or pipe ad copy and video URLs straight into multimodal AI creative analysis pipelines. |
๐งญ How to Use (Step-by-Step Console Guide)
- Open the Actor in Apify Console: Click Try for free to open the visual input configuration form.
- Choose Your Target Ads:
- Paste one or more Facebook Ad Library URLs into Facebook Ad Library URLs (
startUrls), or - Enter keywords/competitor brands in Search Keywords (
searchQueries), or - Enter numeric advertiser Page IDs in Advertiser Facebook Page IDs (
pageIds).
- Paste one or more Facebook Ad Library URLs into Facebook Ad Library URLs (
- Configure Filters (Optional): Select your target Country (
US,GB,DE,ALL, etc.), Ad Delivery Status (active,inactive,all), Creative Media Format (all,video,image), and Winning Ad Filter โ Minimum Days Active (minDaysRunning). - Set Your Extraction Limit: Enter the maximum number of ads to extract in Max Ads to Extract (
maxItems). - Optional Enrichment: Enable Landing Page Contacts Enrichment (
scrapeContacts) and/or Landing Page Tech Stack Scan (scrapeTechStack) to enrich each unique website landing domain. Meta/WhatsApp destinations are skipped automatically. - Run & Export: Click Start, watch real-time ad extraction in the log and Output table, and download your dataset in CSV, Excel, or JSON.
โ๏ธ Input Parameters & Sample Input JSON
| Parameter | Type | Default | Description |
|---|---|---|---|
startUrls | array | Sample Shopify search URL | One or more Facebook Ad Library search URLs or Facebook Page URLs. |
searchQueries | array | [] | Keywords, niches, or brand names to search in the Meta Ad Library (e.g., ["shopify", "creatine gummies"]). |
pageIds | array | [] | Numeric Facebook Page IDs (view_all_page_id) to extract all ads from specific advertisers. |
country | string | "US" | Two-letter ISO country code (US, GB, CA, AU, DE, FR, AE, BR, etc.) or "ALL". |
activeStatus | string | "active" | Filter by delivery state: "active", "inactive", or "all". |
mediaType | string | "all" | Filter by creative media type: "all", "video", "image", "meme", or "none". |
platforms | array | [] | Optional publisher platform filter (["FACEBOOK", "INSTAGRAM", "MESSENGER", "AUDIENCE_NETWORK", "THREADS"]). |
minDaysRunning | integer | 0 | Minimum days an ad must have been active to be included in the output (e.g., 14 or 30 for winning ads). |
startDateMin | string | "" | Optional lower launch date bound (YYYY-MM-DD). |
startDateMax | string | "" | Optional upper launch date bound (YYYY-MM-DD). |
maxItems | integer | 40 | Maximum number of ads to extract. Free plan runs are capped at 40 items per run; paid Apify plans support unlimited extraction. |
scrapeContacts | boolean | false | Crawl each unique website landing-page domain for emails, phones, and social profiles. Bills website-contacts once per domain on success. |
scrapeTechStack | boolean | false | Detect CMS, analytics, pixels, and frameworks on each unique website landing domain. Bills tech-stack once per domain on success. |
Example 1: Keyword & Winning Ad Spy Search
{"searchQueries": ["shopify", " supplement gummies"],"country": "US","activeStatus": "active","mediaType": "all","minDaysRunning": 14,"maxItems": 100}
Example 2: Direct Facebook Ad Library Search URL or Page ID
{"startUrls": [{"url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=shopify&search_type=keyword_unordered&media_type=all"}],"pageIds": ["359717073888008"],"maxItems": 40}
Example 3: Ads + Landing Page Contacts & Tech Stack
{"searchQueries": ["shopify"],"country": "US","activeStatus": "active","minDaysRunning": 14,"maxItems": 40,"scrapeContacts": true,"scrapeTechStack": true}
๐ฆ Output Schema & Sample Output JSON
Each extracted ad is saved as a structured JSON object in your Apify Dataset:
{"id": "1576835113754964","adArchiveId": "1576835113754964","adLibraryUrl": "https://www.facebook.com/ads/library/?id=1576835113754964","collationId": "1626456112064707","collationCount": 2,"isActive": true,"daysRunning": 338,"isScalingWinner": true,"startDateIso": "2025-11-12T08:00:00Z","endDateIso": "2026-10-16T07:00:00Z","pageId": "359717073888008","pageName": "WhatChimp","pageProfileUrl": "https://www.facebook.com/whatchimp/","pageProfilePictureUrl": "https://scontent.xx.fbcdn.net/v/t39.35426-6/sample_profile.jpg","pageCategories": ["Business"],"pageLikeCount": 13991,"displayFormat": "DCO","publisherPlatforms": ["facebook", "instagram", "threads"],"title": "0% Markup Fees on API","bodyText": "Send personalized bulk broadcasts on WhatsApp using the official WhatsApp Business API.","caption": "whatchimp.com","linkDescription": "Get 50% OFF Early-Bird Offer","ctaText": "Sign up","ctaType": "SIGN_UP","landingPageUrl": "https://whatchimp.com/special-offer/","landingPageDomain": "whatchimp.com","funnelType": "custom_lander","utmParameters": {},"imageUrls": ["https://scontent.xx.fbcdn.net/v/t39.35426-6/580616304_n.jpg?oe=6AD85831"],"videos": [{"videoHdUrl": "https://video.xx.fbcdn.net/v/t42/sample_hd.mp4?oe=6AD85831","videoSdUrl": "https://video.xx.fbcdn.net/v/t42/sample_sd.mp4?oe=6AD85831","videoPreviewImageUrl": "https://scontent.xx.fbcdn.net/v/t39.35426-6/thumb.jpg?oe=6AD85831"}],"carouselCards": [{"title": "0% Markup Fees on API","body": "Send personalized bulk broadcasts on WhatsApp.","linkDescription": "Get 50% OFF Early-Bird Offer","ctaText": "Sign Up","ctaType": "SIGN_UP","linkUrl": "https://whatchimp.com/special-offer/","imageUrl": "https://scontent.xx.fbcdn.net/v/t39.35426-6/580616304_n.jpg?oe=6AD85831","videoHdUrl": null,"videoSdUrl": null}],"mediaExpiresAtIso": "2026-10-21T06:14:09Z","euTotalReach": null,"impressionsText": null,"spend": null,"currency": null,"byline": null,"totalSearchResultsCount": 11897,"searchCountry": "US","searchQuery": "shopify","scrapedAt": "2026-10-16T18:14:42Z"}
๐ฐ Transparent Pay-Per-Event (PPE) Pricing
$0.00 Actor start fee โ you only pay for results successfully delivered to your dataset.
All residential proxy bandwidth, anti-bot challenge solving, and multi-slice pagination are included in the per-result event price. Running inside a lightweight 128 MB native Rust container keeps your Apify platform Compute Unit (CU) usage near $0.0001 per run.
| Apify Plan Tier | Price per Ad (apify-default-dataset-item) | Price per 1,000 Ads | Per-Run Quota Cap |
|---|---|---|---|
| Free Plan | $0.005 | $5.00 / 1K | Up to 40 ads / run |
Starter (Bronze) | $0.0011 | $1.10 / 1K | Unlimited (respects maxItems & budget) |
Scale (Silver) | $0.00075 | $0.75 / 1K | Unlimited (respects maxItems & budget) |
Business+ (Gold / Platinum / Diamond) | $0.00045 | $0.45 / 1K | Unlimited (respects maxItems & budget) |
Optional: Landing Page Contacts (website-contacts)
Charged once per unique landing-page domain when contacts enrichment succeeds (not per ad). Meta / WhatsApp destinations are skipped.
| Apify Plan Tier | Price per Domain | Price per 1,000 Domains |
|---|---|---|
| Free Plan | $0.005 | $5.00 / 1K |
Starter (Bronze) | $0.0014 | $1.40 / 1K |
Scale (Silver) | $0.00095 | $0.95 / 1K |
Business+ (Gold / Platinum / Diamond) | $0.0006 | $0.60 / 1K |
Optional: Landing Page Tech Stack (tech-stack)
Charged once per unique landing-page domain when the tech stack scan succeeds (not per ad).
| Apify Plan Tier | Price per Domain | Price per 1,000 Domains |
|---|---|---|
| Free Plan | $0.01 | $10.00 / 1K |
Starter (Bronze) | $0.002 | $2.00 / 1K |
Scale (Silver) | $0.0015 | $1.50 / 1K |
Business+ (Gold / Platinum / Diamond) | $0.0012 | $1.20 / 1K |
๐ API Integration Examples (Python, Node.js, cURL)
Python (apify-client)
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_API_TOKEN")run_input = {"searchQueries": ["shopify"],"country": "US","activeStatus": "active","minDaysRunning": 14,"maxItems": 40,# Optional Phase 1 enrichment (billed once per unique landing domain):# "scrapeContacts": True,# "scrapeTechStack": True,}run = client.actor("misterkhan/facebook-ads-library-scraper").call(run_input=run_input)for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(f"{item.get('pageName')} ({item.get('daysRunning')}d) -> {item.get('landingPageUrl')}")
Node.js (apify-client)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: 'YOUR_APIFY_API_TOKEN' });const run = await client.actor('misterkhan/facebook-ads-library-scraper').call({searchQueries: ['shopify'],country: 'US',activeStatus: 'active',maxItems: 40,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(`Extracted ${items.length} Facebook ads:`, items[0]);
cURL
curl -X POST "https://api.apify.com/v2/acts/misterkhan~facebook-ads-library-scraper/runs?token=YOUR_APIFY_API_TOKEN" \-H "Content-Type: application/json" \-d '{"searchQueries": ["shopify"],"country": "US","activeStatus": "active","maxItems": 40}'
โ Frequently Asked Questions (FAQ)
Do I need to provide Facebook cookies, login credentials, or proxies?
No. This Actor works 100% without a Facebook account or cookies, and residential proxy rotation is handled automatically at no extra cost.
How can I find only profitable "winning" ads?
Set minDaysRunning to 14 or 30 (and activeStatus to "active"). Ads that advertisers keep paying to run for 14โ30+ consecutive days or across multiple collated variations (isScalingWinner: true) are strong indicators of positive ROAS creatives.
Why do Facebook CDN image and video URLs include a mediaExpiresAtIso field?
Meta signs fbcdn.net image and video URLs with a hex expiration parameter (oe=). The scraper automatically decodes this hex timestamp into mediaExpiresAtIso so your downstream automation knows the exact UTC date/time before which media files should be downloaded if permanent archiving is required.
Is scraping the Facebook Ad Library legal?
The Meta Ad Library is a public transparency database published for public inspection. This Actor extracts only publicly visible ad records and does not collect private personal data. For general context on web scraping compliance, read Apify's guide on the legality of web scraping.
๐ Related Actors from Our Store
Combine this Actor with our other 128 MB Pay-Per-Event (PPE) tools in the same workflow ($0.00 start fee):
| Related Actor | Best For | Starting Price |
|---|---|---|
| ๐ Google Maps Places Scraper | Local business leads, phones, websites, ratings & coordinates | From ๐ฐ$0.55 / 1K |
| ๐ง Website Contact & Email Scraper | Extract business emails, phone numbers & social links from any website domain | From ๐ฐ$0.60 / 1K |
| ๐งฉ Website Tech Stack Scanner | Detect 7,000+ technologies, CMS, analytics, ad pixels & e-commerce platforms | From ๐ฐ$0.50 / 1K |
| ๐ Website to Clean Text & Markdown | Convert any web page into clean Markdown for LLMs, RAG pipelines & AI agents | From ๐ฐ$0.50 / 1K |
| ๐ธ Instagram Profile Status Checker | Bulk check Instagram handles for active vs. banned status, followers & bio links | From ๐ฐ$0.35 / 1K |
๐ See all Actors by misterkhan on Apify Store โ
๐ฌ Support & ๐งโโ๏ธ Legal Disclaimer
- Support & Feature Requests: Have a question, custom workflow need, or issue? Open a ticket in the Issues tab on this Actor's Apify Store page and we will respond promptly.
- Disclaimer: This Actor is an independent data extraction tool and is not affiliated with, endorsed by, or sponsored by Meta Platforms, Inc. or Facebook.