# Facebook Ad Library Leads - Advertiser Finder (`flash_scraper/facebook-ads-leads-scraper`) Actor

Find active advertisers in the Meta (Facebook) Ad Library by keyword/niche and turn them into contactable leads: name, page URL, website, email, phone, active-ad count (buying-intent signal), a 0-100 lead score, dedupe, optional AI cold openers. Export CSV/JSON.

- **URL**: https://apify.com/flash\_scraper/facebook-ads-leads-scraper.md
- **Developed by:** [Flash Scrape](https://apify.com/flash_scraper) (community)
- **Categories:** Lead generation, Social media, Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $14.00 / 1,000 leads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Facebook Ad Library Leads - Advertiser Finder

**Find active advertisers in the Meta (Facebook) Ad Library by keyword or niche** and turn them into contactable leads — one row per advertiser page, not one row per ad. Every business that shows up is currently spending money on Facebook/Instagram ads, which makes this one of the strongest buying-intent signals you can prospect on.

Built for **agencies, freelancers, and SaaS sales teams** who sell to businesses that already advertise — ad management, creative, CRO, marketing automation, POS, and similar tools.

---

### How it works

1. You give it search terms / niches (e.g. `skincare`, `crm software`, `dentist`) and a country.
2. It runs the official Meta Ad Library scraper over the matching Ad Library search URLs and pulls active ads.
3. Ad-level results are **rolled up to one row per unique advertiser page** — duplicates collapse, and each page's number of active ads is counted (a strong signal of who's actually spending budget).
4. It visits each advertiser's destination website (home + `/contact` + `/about`) to extract an email and social links — no key needed for this step.
5. It applies your quality filters, dedupes again (by page, website domain, and email), and scores every lead 0–100 so the best prospects sort to the top.
6. *(Optional)* It writes a personalized one-sentence cold-outreach opener per lead using your own OpenAI/Anthropic key.
7. You get a clean dataset, ready for CSV/JSON export or CRM import.

No coding, no Facebook login, and no proxies to configure — just type a search and run.

---

### What data you get

Every run returns one row per advertiser page, best-scored leads first:

- **name** — advertiser / Page name.
- **page_url** — the advertiser's Facebook Page URL.
- **page_id** — the Facebook Page ID, when available.
- **website** — the destination site their ads link to.
- **email** / **email_status** — best email found on their site (`found` / `missing`).
- **extra_emails** — other emails discovered on the site, if any.
- **phone** — pulled from the advertiser's About page when available.
- **ads_count** — how many currently ACTIVE ads that page is running (buying-intent signal).
- **linkedin** / **facebook** / **twitter** — social links found during enrichment.
- **lead_score** — 0–100 combining contactability (email/website/phone) and ad spend signal.
- **icebreaker** — personalized cold-outreach opener (only when AI openers are on).

---

### Input

```json
{
  "searchTerms": ["crm software", "meal prep"],
  "country": "US",
  "maxItems": 100,
  "onlyWithWebsite": true,
  "onlyWithEmail": true,
  "enrichEmails": true,
  "writeOpeners": false
}
````

| Field | What it does |
|---|---|
| **searchTerms** | Keywords, niches, products, or brand names to search the Meta Ad Library for — one per line. Required. |
| **country** | Two-letter country code for the Ad Library search, e.g. `US`, `GB`, `CA`, `AU`. Default `US`. |
| **maxItems** | Max ads to pull across all search terms before rolling up to unique advertiser pages (1–5000, default 100). More ads scanned = more unique advertisers found. |
| **onlyWithWebsite** | Drop advertisers with no destination website. |
| **onlyWithEmail** | Drop advertisers where no email could be found. Best for cold-email campaigns. |
| **enrichEmails** | Visit each advertiser's website to find emails + socials (default on, no key needed). |
| **writeOpeners** | Add an AI cold-outreach opener per lead — needs your own OpenAI/Anthropic key. |
| **llmProvider / llmApiKey / llmModel** | Your own AI key — used only to write openers, never stored. |

***

### Output sample

```json
{
  "name": "Bright Skincare Co.",
  "page_url": "https://www.facebook.com/brightskincareco",
  "page_id": "123456789",
  "website": "https://brightskincare.com",
  "email": "hello@brightskincare.com",
  "email_status": "found",
  "phone": "+1 512-555-0199",
  "ads_count": 14,
  "linkedin": "https://linkedin.com/company/bright-skincare",
  "facebook": "https://facebook.com/brightskincareco",
  "lead_score": 85,
  "icebreaker": "Noticed you're running 14 active ads for Bright Skincare right now…"
}
```

Results render as a sortable table on the Output tab and export to CSV, JSON, or Excel, or pull via API.

***

### Who buys this

Anyone selling to businesses that already run Facebook/Instagram ads: ad-management and creative agencies, marketing automation and CRM vendors, conversion-rate-optimization tools, and freelance media buyers looking for warm outbound targets. `ads_count` and `lead_score` let you prioritize prospects that are actively spending, not just browsing.

***

### Pricing

**Pay-per-result — you're charged only for the advertiser leads delivered *after* filtering and dedupe.** Email enrichment is included with no extra API key; AI openers run on your own OpenAI/Anthropic key, so that cost never touches this actor.

***

### FAQ

**Is this legal?** This actor collects **public** ad and business data from the Meta Ad Library and public websites. Use it for legitimate B2B outreach and follow applicable anti-spam laws (CAN-SPAM, GDPR) in how you contact leads.

**Do I need a Facebook login or API key?** No. Ad Library search and email enrichment work with no key at all. A key is only needed if you turn on AI cold-outreach openers — and it's *your* key, used once per run and never stored.

**Why one row per advertiser instead of one row per ad?** Ad-level data is noisy — the same business can run dozens of ad variants. This actor rolls everything up to one row per unique advertiser page so you get a clean lead list, with `ads_count` telling you how active that advertiser currently is.

**Where do the emails come from?** From each advertiser's own destination website (home / contact / about pages), plus their Facebook About page when available. Many advertisers don't publish an email anywhere — use `onlyWithEmail` to keep only the leads that are actually contactable.

**How many results can I get?** Set `maxItems` from 1 to 5000 ads scanned per run, across as many search terms as you like — more ads scanned means more unique advertisers discovered.

**Can I export to CSV or a CRM?** Yes — export CSV, JSON, or Excel from the Output/Storage tab or via the API.

***

### Other Flash Scrape scrapers

Looking for leads on other platforms? Check out the rest of the Flash Scrape suite:

- [Google Maps Leads Scraper](https://apify.com/flash_scraper/google-maps-leads-opener) — Google Maps business leads
- [Restaurant Leads Scraper](https://apify.com/flash_scraper/restaurant-leads-scraper) — restaurant leads with tech-stack detection
- [Instagram Leads Scraper](https://apify.com/flash_scraper/instagram-leads-scraper) — Instagram profile leads
- [Smart Scraper by Example](https://apify.com/flash_scraper/smart-scraper-by-example) — no-code web scraper

# Actor input Schema

## `searchTerms` (type: `array`):

Keywords, niches, products, or brand names to search the Meta Ad Library for — one per line. Each term finds businesses currently running ads about it. e.g. 'skincare', 'crm software', 'meal prep', 'dentist'.

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

Two-letter country code for the Meta Ad Library search (where the ads run). e.g. 'US', 'GB', 'CA', 'AU'.

## `maxItems` (type: `integer`):

Maximum number of ads to pull from the Ad Library across all search terms, before rolling them up to unique advertiser pages. More ads = more unique advertisers discovered.

## `onlyWithWebsite` (type: `boolean`):

Drop advertisers with no destination website (you can't enrich an email without one).

## `onlyWithEmail` (type: `boolean`):

Drop advertisers where no email could be found. Best for cold-email campaigns.

## `enrichEmails` (type: `boolean`):

Visit each advertiser's destination website (home + /contact + /about) to extract emails and social links. Higher email fill-rate. No key needed.

## `writeOpeners` (type: `boolean`):

Generate a personalized one-sentence outreach opener for each advertiser. Requires your OpenAI/Anthropic key below.

## `llmProvider` (type: `string`):

AI provider used to write the cold openers — OpenAI (GPT) or Anthropic (Claude). Use the provider that matches the LLM API key you supply.

## `llmApiKey` (type: `string`):

Your own OpenAI or Anthropic API key. Used only to write the openers; never stored.

## `llmModel` (type: `string`):

Override the default model (gpt-4o-mini for OpenAI, claude-haiku-4-5-20251001 for Anthropic).

## Actor input object example

```json
{
  "searchTerms": [
    "crm software",
    "meal prep"
  ],
  "country": "US",
  "maxItems": 100,
  "onlyWithWebsite": false,
  "onlyWithEmail": false,
  "enrichEmails": true,
  "writeOpeners": false,
  "llmProvider": "openai"
}
```

# Actor output Schema

## `results` (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 = {
    "searchTerms": [
        "skincare"
    ],
    "country": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("flash_scraper/facebook-ads-leads-scraper").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 = {
    "searchTerms": ["skincare"],
    "country": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("flash_scraper/facebook-ads-leads-scraper").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "searchTerms": [
    "skincare"
  ],
  "country": "US"
}' |
apify call flash_scraper/facebook-ads-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=flash_scraper/facebook-ads-leads-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Facebook Ad Library Leads - Advertiser Finder",
        "description": "Find active advertisers in the Meta (Facebook) Ad Library by keyword/niche and turn them into contactable leads: name, page URL, website, email, phone, active-ad count (buying-intent signal), a 0-100 lead score, dedupe, optional AI cold openers. Export CSV/JSON.",
        "version": "0.1",
        "x-build-id": "acVqP2tX3IozNbjmB"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/flash_scraper~facebook-ads-leads-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-flash_scraper-facebook-ads-leads-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/flash_scraper~facebook-ads-leads-scraper/runs": {
            "post": {
                "operationId": "runs-sync-flash_scraper-facebook-ads-leads-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/flash_scraper~facebook-ads-leads-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-flash_scraper-facebook-ads-leads-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "searchTerms"
                ],
                "properties": {
                    "searchTerms": {
                        "title": "Search terms / niches (what advertisers sell)",
                        "type": "array",
                        "description": "Keywords, niches, products, or brand names to search the Meta Ad Library for — one per line. Each term finds businesses currently running ads about it. e.g. 'skincare', 'crm software', 'meal prep', 'dentist'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "country": {
                        "title": "Country",
                        "type": "string",
                        "description": "Two-letter country code for the Meta Ad Library search (where the ads run). e.g. 'US', 'GB', 'CA', 'AU'.",
                        "default": "US"
                    },
                    "maxItems": {
                        "title": "Max ads to scan",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of ads to pull from the Ad Library across all search terms, before rolling them up to unique advertiser pages. More ads = more unique advertisers discovered.",
                        "default": 100
                    },
                    "onlyWithWebsite": {
                        "title": "Only advertisers with a website",
                        "type": "boolean",
                        "description": "Drop advertisers with no destination website (you can't enrich an email without one).",
                        "default": false
                    },
                    "onlyWithEmail": {
                        "title": "Only advertisers with an email",
                        "type": "boolean",
                        "description": "Drop advertisers where no email could be found. Best for cold-email campaigns.",
                        "default": false
                    },
                    "enrichEmails": {
                        "title": "Find emails on the advertiser website",
                        "type": "boolean",
                        "description": "Visit each advertiser's destination website (home + /contact + /about) to extract emails and social links. Higher email fill-rate. No key needed.",
                        "default": true
                    },
                    "writeOpeners": {
                        "title": "Write an AI cold-opener per lead",
                        "type": "boolean",
                        "description": "Generate a personalized one-sentence outreach opener for each advertiser. Requires your OpenAI/Anthropic key below.",
                        "default": false
                    },
                    "llmProvider": {
                        "title": "AI provider (for openers)",
                        "enum": [
                            "openai",
                            "anthropic"
                        ],
                        "type": "string",
                        "description": "AI provider used to write the cold openers — OpenAI (GPT) or Anthropic (Claude). Use the provider that matches the LLM API key you supply.",
                        "default": "openai"
                    },
                    "llmApiKey": {
                        "title": "AI API key (for openers)",
                        "type": "string",
                        "description": "Your own OpenAI or Anthropic API key. Used only to write the openers; never stored."
                    },
                    "llmModel": {
                        "title": "AI model (optional)",
                        "type": "string",
                        "description": "Override the default model (gpt-4o-mini for OpenAI, claude-haiku-4-5-20251001 for Anthropic)."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
