# Facebook Ads Library Scraper: Find Winning Ads + AI (`ingeniela/winning-facebook-ads-finder`) Actor

Find the ads that keep running or top the charts in your niche on Facebook, Instagram, Google (YouTube, Search) and TikTok, with a winning score, the AI breakdown of hook, angle and offer, and new ads written for your brand.

- **URL**: https://apify.com/ingeniela/winning-facebook-ads-finder.md
- **Developed by:** [Ingeniela](https://apify.com/ingeniela) (community)
- **Categories:** AI, E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 90.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 scored ads

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 Library Scraper: Find Winning Ads + AI

Nobody keeps paying for an ad that does not sell. The ads that have been **running for months**, in **many versions**, on **several placements**, are the ones making money. This Actor searches the **Meta Ads Library** (Facebook and Instagram), the **Google Ads Transparency Center** (YouTube, Search and Display) and the **TikTok Creative Center top ads** for your niche or your competitors, scores every ad by how "proven" it is, breaks down the best ones with AI (hook, angle, offer, emotion, proof and a reusable template), and writes **new ads for your brand** based on what keeps working.

> 🔁 Turn on **Monitor mode** and schedule it daily: you only see the ads your competitors launched since the last run.

### Tutorial (1 minute)

![Step-by-step tutorial: what to fill in, click Start, the real result and the price](https://api.apify.com/v2/key-value-stores/RXaOr7FspyrQ4JP88/records/winning-ads-finder-tutorial.gif)

*Every result in this tutorial comes from a real run.*

### What you get

- **Every ad** with advertiser, start date, **days running**, number of **versions**, platforms, format (video, image, carousel, catalog), text, headline, CTA, landing page, image or video link and the Ads Library link.
- **Winning score (0-100)** and a label: `winner` (proven), `promising` or `testing`. Results come sorted, best first.
- **AI breakdown** of the top ads: hook, angle, offer, emotion, proof, why it keeps running and a fill-in-the-blanks template.
- **New ads for you** (when you describe your brand): the patterns that keep winning and 8 new ads with hook, primary text, headline, CTA and visual idea.

### How to use it

1. Choose the **platforms**. Add **keywords** (for example `collagen supplement`, `invoice software`), searched on Meta and TikTok, your **competitors' Facebook pages**, and for Google your **competitors' domains** (`theordinary.com`): Google's library is searched by advertiser.
2. Choose the **country** and the **format**. Keep **only active ads** on.
3. Optional: set **minimum days running** to 30 to keep only proven ads.
4. Describe **your brand and offer** to get new ads.
5. Click **Start**. The table shows the creatives as images.

### Monitor mode

Turn on **Monitor mode** and schedule the Actor weekly. Each run returns only the ads you have **not seen in earlier runs**, on every platform, so you find out when a competitor launches a new campaign. Every row also has an `isNew` flag.

### How the score works

| Signal | Points |
|---|---|
| Days running (90+ days = max) | up to 55 |
| Still active today | 15 |
| Number of versions (6+ = max) | up to 20 |
| Several placements (Facebook, Instagram, Messenger…) | up to 10 |

70 or more = `winner`, 45-69 = `promising`, below 45 = `testing`.

The other platforms use the signals they publish:

- **Google:** days served (60+ days = 100) plus extra points for more variations. Brand-new Google ads score as `testing`.
- **TikTok:** the Creative Center ranks top ads by CTR (or impressions, conversion rate, 6-second view rate or likes, your choice). The #1 ad gets 100, and each position below it 4 points less. Every row shows its **CTR**.

### Pricing

| Event | Price |
|---|---|
| Ad in the results with its score | $0.003 |
| AI breakdown of one ad (built-in AI) | $0.02 |
| New ads for your brand (built-in AI) | $0.20 |

**Example:** 100 ads, 20 AI breakdowns and new ads = $0.30 + $0.40 + $0.20 = **$0.90**, plus collecting the ads (about $0.08). With your own AI key: $0.30.

Collecting the ads runs on your Apify account, with a spend limit you set:

- Meta: about US$0.00075 per ad;
- Google: about US$0.0019 per ad;
- TikTok: about US$0.001 per ad.

Want the video ads transcribed, a contact sheet of each one and shoot-ready scripts? See [Winning Ads to Scripts](https://apify.com/ingeniela/winning-ad-video-script-writer).

### FAQ

**Can I see spend or results?** Meta only shows spend and reach for political ads and, in the EU, reach. Days running and versions are the best public signal that an ad works.

**Can I copy the ads?** Use them for inspiration. The AI writes new ads that reuse the mechanism, not the wording, claims or images of other brands.

# Actor input Schema

## `platforms` (type: `array`):

Keywords search Meta and TikTok; Google is searched by competitor domain.

## `googleAdvertisers` (type: `array`):

Google's ad library is searched by advertiser, e.g. 'theordinary.com'.

## `tiktokPeriod` (type: `string`):

Creative Center period.

## `tiktokOrderBy` (type: `string`):

What 'winning' means on TikTok.

## `keywords` (type: `array`):

Words in the ads, e.g. 'skincare serum', 'CRM for agencies'.

## `advertiserUrls` (type: `array`):

Competitors' Facebook pages or any Meta Ads Library search link.

## `country` (type: `string`):

Two-letter code (US, GB, ES, MX, BR…) or ALL.

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

Type of creative.

## `activeOnly` (type: `boolean`):

Ads still running today (recommended: they are the ones still making money).

## `maxAdsPerSource` (type: `integer`):

Ads to read per search.

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

e.g. 30 to keep only proven ads.

## `scraperMaxCostUsd` (type: `integer`):

Upper limit for collecting the ads (about US$0.00075 per ad).

## `onlyNewAds` (type: `boolean`):

Schedule it weekly to get only your competitors' new ads (on every platform).

## `aiAnalysis` (type: `boolean`):

Hook, angle, offer, emotion, proof, why it works and a reusable template.

## `aiMaxAds` (type: `integer`):

Highest winning score first.

## `yourBrand` (type: `string`):

e.g. 'Pepfine, peptide serum for women 35+, 30-day guarantee'. Empty = no new ads.

## `language` (type: `string`):

Language of the AI breakdown and new ads.

## `aiProvider` (type: `string`):

Leave all keys empty to use the built-in AI (billed per AI event).

## `aiModel` (type: `string`):

Empty = a good default for the provider.

## `anthropicApiKey` (type: `string`):

With your own key (any provider) that provider bills you and AI events are not charged.

## `openaiApiKey` (type: `string`):

Your own key from platform.openai.com.

## `openrouterApiKey` (type: `string`):

Your own key from openrouter.ai/keys.

## `geminiApiKey` (type: `string`):

Your own key from aistudio.google.com/apikey.

## `xaiApiKey` (type: `string`):

Your own key from console.x.ai.

## `deepseekApiKey` (type: `string`):

Your own key from platform.deepseek.com.

## `mistralApiKey` (type: `string`):

Your own key from console.mistral.ai.

## Actor input object example

```json
{
  "platforms": [
    "meta",
    "tiktok"
  ],
  "tiktokPeriod": "30",
  "tiktokOrderBy": "ctr",
  "keywords": [
    "collagen supplement"
  ],
  "country": "US",
  "mediaType": "all",
  "activeOnly": true,
  "maxAdsPerSource": 30,
  "minDaysRunning": 0,
  "scraperMaxCostUsd": 3,
  "onlyNewAds": false,
  "aiAnalysis": true,
  "aiMaxAds": 20,
  "language": "English",
  "aiProvider": "auto"
}
```

# Actor output Schema

## `ads` (type: `string`):

No description

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

No description

# 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 = {
    "platforms": [
        "meta",
        "tiktok"
    ],
    "keywords": [
        "collagen supplement"
    ],
    "country": "US",
    "maxAdsPerSource": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("ingeniela/winning-facebook-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 = {
    "platforms": [
        "meta",
        "tiktok",
    ],
    "keywords": ["collagen supplement"],
    "country": "US",
    "maxAdsPerSource": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("ingeniela/winning-facebook-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 '{
  "platforms": [
    "meta",
    "tiktok"
  ],
  "keywords": [
    "collagen supplement"
  ],
  "country": "US",
  "maxAdsPerSource": 30
}' |
apify call ingeniela/winning-facebook-ads-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ingeniela/winning-facebook-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/tAHEM0EPoi8aQwuzO/builds/mbsKvjtFilOqhAtWo/openapi.json
