# Facebook Ad Library Scraper: Winning Ads & Funnel Spy (`junodcreator/facebook-ads-library-advertiser-enricher`) Actor

Scrape active Facebook & Instagram ads from Meta Ad Library. Filter Winning Ads by longevity (active days >= 14), unwrap CTA destination URLs, and enrich advertiser landing pages for Shopify/GHL/ClickFunnels funnels, emails, WhatsApp, socials, and pixels.

- **URL**: https://apify.com/junodcreator/facebook-ads-library-advertiser-enricher.md
- **Developed by:** [Juno Artha Dinamika](https://apify.com/junodcreator) (community)
- **Categories:** Social media, Marketing, Lead generation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 ad creative scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Facebook / Meta Ad Library Winning Ads & Advertiser Funnel Enricher

Find profitable, long-running ads in the **Facebook / Meta Ad Library** and automatically enrich the advertiser's landing page with **emails, phone/WhatsApp numbers, social profiles, ad pixels, and funnel tech stack** — with **zero Facebook login required**.

Most Ad Library scrapers dump thousands of short-lived test ads with no contact details. This Actor filters ads by **active run duration (`minActiveDays`)** so you only collect proven "Winning Ads" that advertisers are actively paying to scale, then crawls each advertiser's destination URL to build an outreach-ready B2B lead record.

***

### What data can you extract?

| Data Field | Description | Example |
| :--- | :--- | :--- |
| **Ad Creative & Copy** | `adArchiveId`, Ad Library URL, headline, primary body copy, link description, media type (`VIDEO`, `IMAGE`, `CAROUSEL`), media URLs | `"Permanent Full-Arch Dental Implants — Free 3D CT Scan"` |
| **CTA & Destination** | Call-to-action button text (`Learn More`, `Shop Now`, `Book Now`), raw CTA destination link, cleaned advertiser domain | `brightsmileimplants.com` (`BOOK_NOW`) |
| **Longevity & Winning Score** | `startDate`, `activeDays` count, `isWinningAd` flag, `collationCount` (number of active variations), and `longevityTier` | `63 active days` (`proven_winner_30d_plus`) |
| **Advertiser Page Info** | Facebook `pageId`, `pageName`, profile URL, page category, page likes, Instagram handle, and publisher platforms (`FACEBOOK`, `INSTAGRAM`) | `BrightSmile Implant Studio` (`pageId: 108492017482910`) |
| **Funnel & Tech Stack** | Primary funnel classification + detected technologies (`Shopify`, `WooCommerce`, `GoHighLevel`, `ClickFunnels`, `Webflow`, `Next.js`, `Kajabi`, `HubSpot`) | `Lead-Gen Funnel (GoHighLevel)` |
| **Ad Pixels Installed** | Checks whether the advertiser's landing page runs Meta Pixel, TikTok Pixel, Google Tag Manager, Google Ads, or Klaviyo | `metaPixel: true, tiktokPixel: false, klaviyo: false` |
| **B2B Contact Details** | Business emails, phone / WhatsApp numbers, and LinkedIn, Instagram, TikTok, YouTube, X/Twitter links extracted from the advertiser's site | `care@brightsmileimplants.com`, `+15125550192` |

***

### Why Media Buyers, Agencies & SaaS Sales Teams Use This Actor

1. **Filter by Ad Longevity (`minActiveDays`):** An ad running continuously for 14, 30, or 90+ days is almost certainly generating positive ROAS. Filtering out 1–3 day test ads saves compute and gives you verified ad spenders.
2. **Spot Pixel & Funnel Gaps Instantly:** See if an advertiser is scaling video ads on Meta (`metaPixel: true`) without running TikTok (`tiktokPixel: false`), Google Ads (`googleAds: false`), or Klaviyo email flows (`klaviyo: false`).
3. **Search by Keywords, Page IDs, or Direct Ad Library URLs:** Enter niche keywords (`searchKeywords`), specific competitor Facebook Page IDs (`pageIds`), or paste full URLs copied straight from your browser (`directAdLibraryUrls`).
4. **No Facebook Account or Cookies Needed:** Runs on public Meta Ad Library endpoints with automatic challenge resolution. Your personal Facebook account is never used.

***

### Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `searchKeywords` | `string[]` | `["skincare", "dental clinic", ...]` | Keywords, niches, or brand names to search in Meta Ad Library. |
| `pageIds` | `string[]` | `[]` | Specific Facebook Page IDs (`view_all_page_id`) to monitor directly. |
| `directAdLibraryUrls` | `string[]` | `[]` | Full Meta Ad Library URLs copied from your browser (`https://www.facebook.com/ads/library/?...`). |
| `countryCode` | `string` | `"US"` | 2-letter ISO country code (`"US"`, `"GB"`, `"CA"`, `"AU"`, `"DE"`, `"ALL"`). |
| `minActiveDays` | `integer` | `14` | Only output ads that have been active for at least this many days (`0` = include all active ads). |
| `mediaType` | `string` | `"ALL"` | Filter by `"ALL"`, `"VIDEO"`, `"IMAGE"`, or `"MEME"`. |
| `enrichAdvertiserLandingPage` | `boolean` | `true` | Visit the advertiser's CTA landing page to extract emails, phone numbers, social links, pixels, and funnel stack. |
| `maxAds` | `integer` | `100` | Maximum number of qualifying ads to output. |
| `maxTotalChargeUsd` | `number` | `5.0` | Hard spending cap in USD for Pay-Per-Event billing. |

#### Example Input JSON

```json
{
  "searchKeywords": ["medspa", "roofing contractor", "b2b saas"],
  "directAdLibraryUrls": [
    "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=ai+agency"
  ],
  "countryCode": "US",
  "minActiveDays": 21,
  "mediaType": "VIDEO",
  "enrichAdvertiserLandingPage": true,
  "maxAds": 50,
  "maxTotalChargeUsd": 5.0
}
```

***

### Output Example

```json
{
  "adArchiveId": "894120573819204",
  "adLibraryUrl": "https://www.facebook.com/ads/library/?id=894120573819204",
  "searchKeyword": "dental clinic",
  "countryCode": "US",
  "pageId": "108492017482910",
  "pageName": "BrightSmile Implant Studio",
  "pageProfileUrl": "https://www.facebook.com/108492017482910",
  "pageCategory": "Medical & Health",
  "pageLikesCount": 4820,
  "instagramHandle": "brightsmileimplants",
  "isActive": true,
  "startDate": "2026-08-19T00:00:00.000Z",
  "endDate": null,
  "activeDays": 63,
  "isWinningAd": true,
  "longevityTier": "proven_winner_30d_plus",
  "collationCount": 6,
  "publisherPlatforms": ["FACEBOOK", "INSTAGRAM"],
  "mediaType": "VIDEO",
  "adHeadline": "Permanent Full-Arch Dental Implants — Free 3D CT Scan This Month",
  "adBodyText": "Struggling with loose dentures or missing teeth? See if you qualify for our New Smile in 24 Hours protocol. Tap below to book your complimentary consultation.",
  "adLinkDescription": "Rated 4.9 Stars by 600+ Patients",
  "ctaText": "Book Now",
  "ctaType": "BOOK_NOW",
  "ctaDestinationUrl": "https://offer.brightsmileimplants.com/free-consult",
  "advertiserDomain": "brightsmileimplants.com",
  "creativeMediaUrls": [
    "https://video.fosu2-1.fna.fbcdn.net/v/t42.1790-2/894120573819204.mp4"
  ],
  "primaryFunnelType": "Lead-Gen Funnel (GoHighLevel)",
  "advertiserEmails": ["care@brightsmileimplants.com"],
  "advertiserPhones": ["+15125550192"],
  "advertiserSocials": {
    "linkedin": null,
    "instagram": "https://www.instagram.com/brightsmileimplants",
    "tiktok": null,
    "youtube": null,
    "twitter": null,
    "facebook": "https://www.facebook.com/brightsmileimplants"
  },
  "advertiserAdPixels": {
    "metaPixel": true,
    "tiktokPixel": false,
    "googleTagManager": true,
    "googleAds": true,
    "klaviyo": false
  },
  "advertiserPlatformStack": ["GoHighLevel", "WordPress"],
  "extractionTier": "tier1_live_json",
  "scrapedAt": "2026-10-21T16:50:19.804Z"
}
```

***

### Pricing (Pay-Per-Event)

Landing page enrichment is **deduplicated by domain** — if one advertiser is running 15 winning ads pointing to the same domain, you only pay for `advertiser-funnel-enriched` **once**.

| Event Name | Price (USD) | Triggered When |
| :--- | :--- | :--- |
| `actor-start` | **$0.005** | Charged once when the Actor starts. |
| `ad-creative-scraped` | **$0.002** | An active ad meeting your `minActiveDays` filter is extracted. |
| `winning-ad-longevity-scored` | **$0.001** | Longevity metrics exist and `activeDays >= 14` (`isWinningAd: true`). |
| `advertiser-funnel-enriched` | **$0.004** | Charged **once per unique advertiser domain** when landing page enrichment is enabled. |

***

### Integrations & Automation Workflows

Turn active Meta ad spenders into qualified pipeline automatically:

- **Clay.com / Instantly / Smartlead:** Feed `advertiserDomain`, `advertiserEmails`, `activeDays`, and `advertiserAdPixels` into personalized outreach (e.g., *"Saw you've been scaling your dental implant video ad on Meta for 63 days without a TikTok pixel installed..."*).
- **Make.com / n8n / Zapier:** Schedule weekly creative spy runs across your niche keywords and push winning ad copy + video URLs straight into Notion, Airtable, or Slack creative swipe files.
- **One-Click CSV / Excel Export:** Download complete advertiser lead lists and funnel audits directly from the Apify Dataset tab.

***

### FAQ

**Do I need a Facebook account or cookies to run this?**\
No. The Actor queries public Meta Ad Library pages and handles verification automatically without any personal Facebook session.

**Can I paste a link directly from the Facebook Ad Library?**\
Yes. Copy any search URL or page URL from the Meta Ad Library in your browser and paste it into `directAdLibraryUrls`.

# Actor input Schema

## `searchKeywords` (type: `array`):

Keywords, product niches, or brand names to query in the Meta Ad Library (e.g., 'skincare', 'dental clinic', 'saas', 'coaching').

## `pageIds` (type: `array`):

Optional list of specific Facebook Page IDs (`view_all_page_id`) to spy on directly in addition to keyword searches.

## `directAdLibraryUrls` (type: `array`):

Optional list of full Meta Ad Library search or page URLs copied from your browser (e.g., 'https://www.facebook.com/ads/library/?active_status=active\&ad_type=all\&country=US\&q=skincare'). Query parameters (`q`, `view_all_page_id`, `country`) are parsed automatically.

## `countryCode` (type: `string`):

2-letter ISO country code for the Meta Ad Library search (e.g., 'US', 'GB', 'CA', 'AU', 'DE', 'ALL').

## `minActiveDays` (type: `integer`):

Only extract and charge for ads that have been running continuously for at least this many days (e.g., 14+ days indicates a profitable Winning Ad).

## `mediaType` (type: `string`):

Filter ads by creative format in Meta Ad Library.

## `enrichAdvertiserLandingPage` (type: `boolean`):

When enabled, visits each advertiser's CTA destination domain once to detect e-commerce/funnel technology (Shopify, WooCommerce, GoHighLevel, ClickFunnels, Webflow), business emails, phone/WhatsApp numbers, social profiles, and installed ad pixels.

## `maxAds` (type: `integer`):

Maximum number of qualifying active ads to extract across all search keywords.

## `maxTotalChargeUsd` (type: `number`):

Hard spending cap in USD for this run. The Actor automatically stops charging and finishes gracefully once this threshold is reached.

## `proxyConfiguration` (type: `object`):

Apify Proxy settings for bypassing Meta Ad Library rate limits and visiting external advertiser landing pages.

## Actor input object example

```json
{
  "searchKeywords": [
    "skincare",
    "dental clinic",
    "saas",
    "coaching"
  ],
  "pageIds": [],
  "directAdLibraryUrls": [],
  "countryCode": "US",
  "minActiveDays": 14,
  "mediaType": "ALL",
  "enrichAdvertiserLandingPage": true,
  "maxAds": 25,
  "maxTotalChargeUsd": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

Full B2B dataset containing Meta ad creatives, active days longevity metrics, CTA destination URLs, funnel tech stack, emails, WhatsApp/phones, and tracking pixels.

## `outputSummary` (type: `string`):

Execution summary report including total ads scraped, winning ads scored, funnels enriched, and Pay-Per-Event (PPE) billing ledger.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchKeywords": [
        "skincare",
        "dental clinic",
        "saas",
        "coaching"
    ],
    "pageIds": [],
    "directAdLibraryUrls": [],
    "countryCode": "US",
    "minActiveDays": 14,
    "mediaType": "ALL",
    "enrichAdvertiserLandingPage": true,
    "maxAds": 25,
    "maxTotalChargeUsd": 5,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("junodcreator/facebook-ads-library-advertiser-enricher").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchKeywords": [
        "skincare",
        "dental clinic",
        "saas",
        "coaching",
    ],
    "pageIds": [],
    "directAdLibraryUrls": [],
    "countryCode": "US",
    "minActiveDays": 14,
    "mediaType": "ALL",
    "enrichAdvertiserLandingPage": True,
    "maxAds": 25,
    "maxTotalChargeUsd": 5,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("junodcreator/facebook-ads-library-advertiser-enricher").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchKeywords": [
    "skincare",
    "dental clinic",
    "saas",
    "coaching"
  ],
  "pageIds": [],
  "directAdLibraryUrls": [],
  "countryCode": "US",
  "minActiveDays": 14,
  "mediaType": "ALL",
  "enrichAdvertiserLandingPage": true,
  "maxAds": 25,
  "maxTotalChargeUsd": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call junodcreator/facebook-ads-library-advertiser-enricher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,junodcreator/facebook-ads-library-advertiser-enricher"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hhkyaeDMj9Bs4WLSZ/builds/JRu4rHV9hGZuJV2z7/openapi.json
