# Facebook Ads Spy: Winning Ads Finder from Meta Ad Library (`weav3rx/facebook-winning-ads-finder`) Actor

Find the winning ads in your Facebook Ad Library scraper results: winner score from days running, variations and activity, plus advertisers who scale right now, landing pages, formats and CTAs. No scraping, no logins, cheap.

- **URL**: https://apify.com/weav3rx/facebook-winning-ads-finder.md
- **Developed by:** [Roman Golovko](https://apify.com/weav3rx) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 ad-analyses

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 Ads Spy: Winning Ads Finder from Meta Ad Library

**Find the ads that actually make money in your Facebook Ad Library scraper results.** Advertisers don't keep paying for ads that lose money, so an ad that has run for months, is still running and was duplicated into many variations is almost always a winner. This Actor scores every ad by those public signals and ranks them, or summarizes every advertiser: who is scaling right now, what runs longest, where the traffic goes.

> **Winner score 98:** "Running for 150 days and still active." "Duplicated into 6 ad variations." "One of the 3 longest-running ads of Glow Skincare." "Shown on Facebook, Instagram, Messenger."

Built for **media buyers, e-commerce and dropshipping stores, performance agencies and copywriters** looking for proven angles.

### Why this one

- 🏆 **Winner score 0-100** from days running (up to 50), still active (20), number of variations (up to 20) and being one of the advertiser's longest runners (10), with plain-English reasons.
- 📅 **Correct "days running" even for old datasets:** the Actor uses the date your data describes (the newest date in it), not today, and stopped ads count only until they stopped.
- 🧩 **Creatives, not duplicates:** ads Meta groups as one creative are merged, with all their archive IDs, platforms and countries.
- 📈 **Advertiser mode:** creatives, active ads, new ads in the last 7 and 30 days, a `scaling` flag, longest and median days running, formats, top landing domains and CTAs, and the 3 best ads per advertiser.
- 🛍️ **Catalog ads handled:** templates like `{{product.name}}` are replaced by the real card text.
- 🔗 **Real landing domains:** Facebook link shims are unwrapped.
- 💸 **Cheap:** a fraction of what scraping the ads cost you. No proxies, no logins, nothing to break.

### How to use

1. Run a Facebook Ad Library scraper for a keyword, a competitor's page or a niche.
2. Open this Actor, pick that run's dataset in **Facebook Ad Library results**.
3. Choose **Winning ads** (ranked creatives) or **Advertisers** (one summary per page) and run it.
4. Filter with *Only ads that are still running* and *Min days running* to get just the proven ads.

### Output example (winning ads)

```json
{
  "winnerScore": 98,
  "winnerReasons": [
    "Running for 150 days and still active.",
    "Duplicated into 6 ad variations (advertisers scale what works).",
    "One of the 3 longest-running ads of Glow Skincare.",
    "Shown on Facebook, Instagram, Messenger."
  ],
  "pageName": "Glow Skincare",
  "pageUrl": "https://www.facebook.com/glowskin",
  "pageLikes": 52000,
  "isActive": true,
  "startDate": "2026-06-23",
  "daysRunning": 150,
  "variations": 6,
  "format": "VIDEO",
  "headline": "Glow Serum",
  "primaryText": "Clear skin in 14 days...",
  "cta": "Shop now",
  "landingUrl": "https://glowskin.com/serum?utm_source=fb",
  "landingDomain": "glowskin.com",
  "platforms": ["FACEBOOK", "INSTAGRAM", "MESSENGER"],
  "adLibraryUrl": "https://www.facebook.com/ads/library/?id=1234567890"
}
```

### Output example (advertisers)

```json
{
  "pageName": "Glow Skincare",
  "creatives": 42,
  "activeCreatives": 31,
  "newLast7Days": 9,
  "newLast30Days": 17,
  "scaling": true,
  "longestRunningDays": 150,
  "medianDaysRunning": 21,
  "formats": [{ "name": "VIDEO", "count": 25 }, { "name": "IMAGE", "count": 17 }],
  "topLandingDomains": [{ "name": "glowskin.com", "count": 40 }],
  "topCtas": [{ "name": "Shop now", "count": 38 }],
  "notes": ["Launched 9 new ads in the last 7 days: actively testing or scaling.", "Has an ad running for 150 days: a proven winner."],
  "topAds": [{ "winnerScore": 98, "daysRunning": 150, "headline": "Glow Serum", "adLibraryUrl": "https://www.facebook.com/ads/library/?id=1234567890" }]
}
```

### FAQ

**Does it scrape Facebook?** No. It analyzes the results of a Facebook Ad Library scraper you already ran (both camelCase and snake_case field formats are supported). That's why it's fast, cheap and never blocked.

**Does the Ad Library show spend or results?** Not for commercial ads. That's why the winner score uses the signals that are public: how long an ad runs, whether it's still running, and how many variations the advertiser made of it.

**How does pricing work?** You pay per ad analyzed in your input. Duplicates (same archive ID) are counted once.

Need another signal or found a bug? Open an issue on the **Issues** tab.

# Actor input Schema

## `datasets` (type: `array`):

Pick datasets of a Facebook / Meta Ad Library scraper run. Several datasets are merged; duplicate ads are removed.

## `jsonData` (type: `array`):

An array of ads in the Ad Library scraper format (adArchiveID, pageName, startDate, isActive, collationCount, snapshot...).

## `outputType` (type: `string`):

Winning ads ranked by winner score, or one summary per advertiser (who scales now, what runs longest, where traffic goes).

## `onlyActive` (type: `boolean`):

For winning ads output.

## `minDaysRunning` (type: `integer`):

For winning ads output. E.g. 30 to keep only ads that ran a month or longer.

## `maxResults` (type: `integer`):

Keep only the top results.

## Actor input object example

```json
{
  "jsonData": [
    {
      "adArchiveID": "100001",
      "pageID": "111",
      "pageName": "Example Skincare",
      "isActive": true,
      "startDate": 1782904000,
      "endDate": 1795000000,
      "collationCount": 5,
      "publisherPlatform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "snapshot": {
        "body": {
          "text": "Clear skin in 14 days"
        },
        "title": "Glow Serum",
        "linkUrl": "https://glowskin.com/serum",
        "ctaText": "Shop now",
        "displayFormat": "IMAGE",
        "pageLikeCount": 52000
      }
    },
    {
      "adArchiveID": "100002",
      "pageID": "111",
      "pageName": "Example Skincare",
      "isActive": true,
      "startDate": 1791976000,
      "endDate": 1795000000,
      "collationCount": 1,
      "publisherPlatform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "snapshot": {
        "body": {
          "text": "Clear skin in 14 days"
        },
        "title": "Serum + Cream bundle",
        "linkUrl": "https://glowskin.com/serum",
        "ctaText": "Shop now",
        "displayFormat": "VIDEO",
        "pageLikeCount": 52000
      }
    },
    {
      "adArchiveID": "100003",
      "pageID": "111",
      "pageName": "Example Skincare",
      "isActive": true,
      "startDate": 1794654400,
      "endDate": 1795000000,
      "collationCount": 1,
      "publisherPlatform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "snapshot": {
        "body": {
          "text": "Clear skin in 14 days"
        },
        "title": "New: night mask",
        "linkUrl": "https://glowskin.com/serum",
        "ctaText": "Shop now",
        "displayFormat": "IMAGE",
        "pageLikeCount": 52000
      }
    },
    {
      "adArchiveID": "100004",
      "pageID": "111",
      "pageName": "Example Skincare",
      "isActive": false,
      "startDate": 1777720000,
      "endDate": 1795000000,
      "collationCount": 1,
      "publisherPlatform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "snapshot": {
        "body": {
          "text": "Clear skin in 14 days"
        },
        "title": "Glow Serum",
        "linkUrl": "https://glowskin.com/serum",
        "ctaText": "Shop now",
        "displayFormat": "IMAGE",
        "pageLikeCount": 52000
      }
    }
  ],
  "outputType": "ads",
  "onlyActive": false,
  "minDaysRunning": 0,
  "maxResults": 100000
}
```

# Actor output Schema

## `results` (type: `string`):

Winning ads or advertisers.

## `summary` (type: `string`):

Ads, creatives, results and the date the data describes.

# 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 = {
    "jsonData": [
        {
            "adArchiveID": "100001",
            "pageID": "111",
            "pageName": "Example Skincare",
            "isActive": true,
            "startDate": 1782904000,
            "endDate": 1795000000,
            "collationCount": 5,
            "publisherPlatform": [
                "FACEBOOK",
                "INSTAGRAM"
            ],
            "snapshot": {
                "body": {
                    "text": "Clear skin in 14 days"
                },
                "title": "Glow Serum",
                "linkUrl": "https://glowskin.com/serum",
                "ctaText": "Shop now",
                "displayFormat": "IMAGE",
                "pageLikeCount": 52000
            }
        },
        {
            "adArchiveID": "100002",
            "pageID": "111",
            "pageName": "Example Skincare",
            "isActive": true,
            "startDate": 1791976000,
            "endDate": 1795000000,
            "collationCount": 1,
            "publisherPlatform": [
                "FACEBOOK",
                "INSTAGRAM"
            ],
            "snapshot": {
                "body": {
                    "text": "Clear skin in 14 days"
                },
                "title": "Serum + Cream bundle",
                "linkUrl": "https://glowskin.com/serum",
                "ctaText": "Shop now",
                "displayFormat": "VIDEO",
                "pageLikeCount": 52000
            }
        },
        {
            "adArchiveID": "100003",
            "pageID": "111",
            "pageName": "Example Skincare",
            "isActive": true,
            "startDate": 1794654400,
            "endDate": 1795000000,
            "collationCount": 1,
            "publisherPlatform": [
                "FACEBOOK",
                "INSTAGRAM"
            ],
            "snapshot": {
                "body": {
                    "text": "Clear skin in 14 days"
                },
                "title": "New: night mask",
                "linkUrl": "https://glowskin.com/serum",
                "ctaText": "Shop now",
                "displayFormat": "IMAGE",
                "pageLikeCount": 52000
            }
        },
        {
            "adArchiveID": "100004",
            "pageID": "111",
            "pageName": "Example Skincare",
            "isActive": false,
            "startDate": 1777720000,
            "endDate": 1795000000,
            "collationCount": 1,
            "publisherPlatform": [
                "FACEBOOK",
                "INSTAGRAM"
            ],
            "snapshot": {
                "body": {
                    "text": "Clear skin in 14 days"
                },
                "title": "Glow Serum",
                "linkUrl": "https://glowskin.com/serum",
                "ctaText": "Shop now",
                "displayFormat": "IMAGE",
                "pageLikeCount": 52000
            }
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("weav3rx/facebook-winning-ads-finder").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 = { "jsonData": [
        {
            "adArchiveID": "100001",
            "pageID": "111",
            "pageName": "Example Skincare",
            "isActive": True,
            "startDate": 1782904000,
            "endDate": 1795000000,
            "collationCount": 5,
            "publisherPlatform": [
                "FACEBOOK",
                "INSTAGRAM",
            ],
            "snapshot": {
                "body": { "text": "Clear skin in 14 days" },
                "title": "Glow Serum",
                "linkUrl": "https://glowskin.com/serum",
                "ctaText": "Shop now",
                "displayFormat": "IMAGE",
                "pageLikeCount": 52000,
            },
        },
        {
            "adArchiveID": "100002",
            "pageID": "111",
            "pageName": "Example Skincare",
            "isActive": True,
            "startDate": 1791976000,
            "endDate": 1795000000,
            "collationCount": 1,
            "publisherPlatform": [
                "FACEBOOK",
                "INSTAGRAM",
            ],
            "snapshot": {
                "body": { "text": "Clear skin in 14 days" },
                "title": "Serum + Cream bundle",
                "linkUrl": "https://glowskin.com/serum",
                "ctaText": "Shop now",
                "displayFormat": "VIDEO",
                "pageLikeCount": 52000,
            },
        },
        {
            "adArchiveID": "100003",
            "pageID": "111",
            "pageName": "Example Skincare",
            "isActive": True,
            "startDate": 1794654400,
            "endDate": 1795000000,
            "collationCount": 1,
            "publisherPlatform": [
                "FACEBOOK",
                "INSTAGRAM",
            ],
            "snapshot": {
                "body": { "text": "Clear skin in 14 days" },
                "title": "New: night mask",
                "linkUrl": "https://glowskin.com/serum",
                "ctaText": "Shop now",
                "displayFormat": "IMAGE",
                "pageLikeCount": 52000,
            },
        },
        {
            "adArchiveID": "100004",
            "pageID": "111",
            "pageName": "Example Skincare",
            "isActive": False,
            "startDate": 1777720000,
            "endDate": 1795000000,
            "collationCount": 1,
            "publisherPlatform": [
                "FACEBOOK",
                "INSTAGRAM",
            ],
            "snapshot": {
                "body": { "text": "Clear skin in 14 days" },
                "title": "Glow Serum",
                "linkUrl": "https://glowskin.com/serum",
                "ctaText": "Shop now",
                "displayFormat": "IMAGE",
                "pageLikeCount": 52000,
            },
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("weav3rx/facebook-winning-ads-finder").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 '{
  "jsonData": [
    {
      "adArchiveID": "100001",
      "pageID": "111",
      "pageName": "Example Skincare",
      "isActive": true,
      "startDate": 1782904000,
      "endDate": 1795000000,
      "collationCount": 5,
      "publisherPlatform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "snapshot": {
        "body": {
          "text": "Clear skin in 14 days"
        },
        "title": "Glow Serum",
        "linkUrl": "https://glowskin.com/serum",
        "ctaText": "Shop now",
        "displayFormat": "IMAGE",
        "pageLikeCount": 52000
      }
    },
    {
      "adArchiveID": "100002",
      "pageID": "111",
      "pageName": "Example Skincare",
      "isActive": true,
      "startDate": 1791976000,
      "endDate": 1795000000,
      "collationCount": 1,
      "publisherPlatform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "snapshot": {
        "body": {
          "text": "Clear skin in 14 days"
        },
        "title": "Serum + Cream bundle",
        "linkUrl": "https://glowskin.com/serum",
        "ctaText": "Shop now",
        "displayFormat": "VIDEO",
        "pageLikeCount": 52000
      }
    },
    {
      "adArchiveID": "100003",
      "pageID": "111",
      "pageName": "Example Skincare",
      "isActive": true,
      "startDate": 1794654400,
      "endDate": 1795000000,
      "collationCount": 1,
      "publisherPlatform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "snapshot": {
        "body": {
          "text": "Clear skin in 14 days"
        },
        "title": "New: night mask",
        "linkUrl": "https://glowskin.com/serum",
        "ctaText": "Shop now",
        "displayFormat": "IMAGE",
        "pageLikeCount": 52000
      }
    },
    {
      "adArchiveID": "100004",
      "pageID": "111",
      "pageName": "Example Skincare",
      "isActive": false,
      "startDate": 1777720000,
      "endDate": 1795000000,
      "collationCount": 1,
      "publisherPlatform": [
        "FACEBOOK",
        "INSTAGRAM"
      ],
      "snapshot": {
        "body": {
          "text": "Clear skin in 14 days"
        },
        "title": "Glow Serum",
        "linkUrl": "https://glowskin.com/serum",
        "ctaText": "Shop now",
        "displayFormat": "IMAGE",
        "pageLikeCount": 52000
      }
    }
  ]
}' |
apify call weav3rx/facebook-winning-ads-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,weav3rx/facebook-winning-ads-finder"
        }
    }
}
```

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/bEZ59T0POG4rWmnPP/builds/AMJERCdOir7vxs1ZO/openapi.json
