# Facebook Ad Leads (`deepmine/facebook-ad-leads`) Actor

Facebook ad leads: search the Meta Ad Library by keyword and get advertisers with a phone or email, plus website, Instagram, LinkedIn, active ad count, first ad date, platforms, category and followers. $1.99 per 1,000 advertisers on Starter, charged only for advertisers with a contact. No login.

- **URL**: https://apify.com/deepmine/facebook-ad-leads.md
- **Developed by:** [DeepMine](https://apify.com/deepmine) (community)
- **Categories:** Lead generation, Social media
- **Features:** Limited permissions
- **Stats:** 3 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.29 / 1,000 advertiser with a contacts

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/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 Ad Leads: Advertisers with Contacts

Find businesses that are **paying for Facebook and Instagram ads right now** and get their **phone, email, website and
social profiles** in one table. Type a keyword (roofing, dentist, med spa, solar...), pick a country, and Facebook Ad
Leads searches the Meta Ad Library, keeps one row per advertiser, and joins each one with the contact details on its
Facebook page and its own website.

**You pay only for advertisers with a contact.** Advertisers without a phone or email are listed free in the run
summary and never charged.

No login, no cookies, no browser.

### What you get for each advertiser

| Field | Example |
|---|---|
| 🏢 Advertiser | PBS Direct |
| 🔗 Facebook | https://www.facebook.com/pbsdirect |
| 📣 Ads | 12 (Meta's count of the advertiser's ads in your country and ad status) |
| 📅 First ad | 2024-09-11 |
| 📱 Platforms | Facebook, Instagram, Messenger, Audience Network |
| 🗂️ Category | Building Materials |
| 👥 Followers | 43,505 |
| 📞 Phone | (877) 398-8898 |
| ✉️ Email | sales@pbsdirect.com |
| 🌐 Website | https://pbsdirect.com/ |
| 📸 Instagram | https://instagram.com/pbsdirect |
| 💬 Sample ad | Get your Metal roofing today! Starting at $2.65 LF… |

Plus every email and phone found, LinkedIn, X, TikTok and YouTube links, the address when the page lists one, the ad's
landing page, the creator's page on a paid partnership, a link to the advertiser's ads in the Ad Library, the page id, where the contacts came from (Facebook,
website or both), the search term and the scrape time.

### Who it's for

- **Agencies and freelancers** selling ads, creatives, landing pages or SEO: these businesses already spend on ads.
- **SaaS and B2B sales teams** prospecting by industry: an active ad budget is a strong buying signal.
- **Market researchers** mapping who advertises in a niche, how many ads each runs and since when.

### How to use it

1. Add one or more **search terms**: words the ads use (roofing, dental implants, med spa, solar panels).
2. Set the **country** where the ads ran (US, GB, DE, ... or ALL).
3. Set **Max advertisers** (try 25 first) and run.
4. Optional: **Min ads per advertiser** to keep only bigger spenders, **Only advertisers with an email** to pay only
   for email leads, and **Ad status** to find advertisers whose ads stopped.

Each advertiser appears once per run, whichever search term found it. With several terms, each gets an equal share of
Max advertisers; a term that runs out of advertisers leaves its share to the others.

Contacts come from the advertiser's own Facebook page and own website only. A link-in-bio, community or marketplace
page (Linktree, Skool, Beacons, Thumbtack, ...) is not read as the advertiser's site, and an address of such a platform
never counts as a lead, so you never pay for another business's email.

A **paid partnership** ad (a creator's post that a brand pays to promote) is the brand's lead: the row has the brand's
page and contacts, and the creator's page is in `partnerPageUrl`.

### Input example

```json
{
  "searchQueries": ["roofing", "gutter installation"],
  "country": "US",
  "activeStatus": "active",
  "minActiveAds": 2,
  "maxAdvertisers": 100,
  "onlyWithEmail": false
}
```

### Output example

```json
{
  "advertiser": "PBS Direct",
  "pageUrl": "https://www.facebook.com/pbsdirect",
  "activeAds": 1,
  "firstAdAt": "2024-09-11",
  "platforms": ["Audience Network", "Facebook", "Instagram", "Messenger"],
  "category": "Building Materials",
  "followers": 43505,
  "phone": "(877) 398-8898",
  "email": "sales@pbsdirect.com",
  "website": "https://pbsdirect.com/",
  "instagram": "https://instagram.com/pbsdirect",
  "sampleAdText": "Get your Metal roofing today! Starting at $2.65 LF…",
  "emails": ["sales@pbsdirect.com", "orders@pbsdirect.com"],
  "phones": ["(877) 398-8898"],
  "linkedin": "https://linkedin.com/company/pbsdirect",
  "contactSource": ["facebook", "website"],
  "adLibraryUrl": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&search_type=page&view_all_page_id=1996237887300263",
  "pageId": "1996237887300263",
  "searchQuery": "roofing",
  "country": "US",
  "scrapedAt": "2026-11-03T22:54:57Z"
}
```

The **Overview** tab shows the main columns; the **Contacts** tab shows every phone, email and social link.
The run summary (`OUTPUT` in the key-value store) lists how many advertisers were checked, the ones without a contact
(name and Facebook link, free), and per-search counts.

### Pricing

Pay per advertiser with a contact (phone or email; with *Only advertisers with an email*, an email). No start fee.
Advertisers without a contact, and duplicates across your search terms, are free.

| Apify plan | Price per 1,000 advertisers with a contact |
|---|---|
| Free | $2.49 |
| Starter | $1.99 |
| Scale | $1.69 |
| Business | $1.29 |

Set a spending limit on the run and Facebook Ad Leads stops there.

### How it works

1. Searches the **Meta Ad Library** for your keywords in your country and keeps one row per advertiser (Facebook page).
2. Reads Meta's ad count for each advertiser, and skips those under your minimum.
3. At the same time, reads the **Contact and basic info** section of the advertiser's Facebook page: phone, email, website, address and
   social links.
4. Scans the advertiser's **website** (homepage plus up to 2 contact or about pages) for more emails, phones and social
   profiles; the site's own-domain emails come first.

### FAQ

**Why are some advertisers missing?** Only advertisers with a phone or email are delivered. Big brands often list no
contact on Facebook; they're in the run summary, free.

**Why fewer results than Max advertisers?** The search ran out of new advertisers. Add more search terms, use ALL
countries, or set Ad status to All ads.

**Are the emails verified?** They're published by the business on its Facebook page or website. The page's own email
comes first.

**Do I need a Facebook account or cookies?** No. Everything is read logged out.

**Is the profile picture link permanent?** No: Facebook signs it and it expires after a few days.

### Related Actors

- Meta Ad Library Scraper: every ad with its creative, text and dates.
- Facebook Pages Scraper: full page details (contacts, rating, hours, transparency) for page links you already have.
- Website Contact Scraper: emails, phones and social profiles from any list of websites.

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search in the Meta Ad Library (what the ads say: dentist, roofing, med spa, solar...). Each advertiser is delivered once per run, whichever term found it.

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

Two-letter country code where the ads ran (US, GB, DE, ...), or ALL for every country.

## `activeStatus` (type: `string`):

Advertisers with ads running now (active), ads that stopped (inactive), or both.

## `minActiveAds` (type: `integer`):

Skip advertisers with fewer ads than this (Meta's count for the country and status above). Bigger spenders run more ads.

## `maxAdvertisers` (type: `integer`):

Stop after this many advertisers with a contact. You pay per advertiser delivered; advertisers without a phone or email are never charged.

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

On: deliver (and charge) only advertisers with an email. Off: a phone or an email.

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

Residential proxies are the default and recommended: Meta refuses most datacenter IPs past the first page of results, and Facebook answers the page contact query on residential only. Datacenter IPs are used for the rest.

## Actor input object example

```json
{
  "searchQueries": [
    "roofing"
  ],
  "country": "US",
  "activeStatus": "active",
  "minActiveAds": 1,
  "maxAdvertisers": 25,
  "onlyWithEmail": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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 = {
    "searchQueries": [
        "roofing"
    ],
    "country": "US",
    "maxAdvertisers": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("deepmine/facebook-ad-leads").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 = {
    "searchQueries": ["roofing"],
    "country": "US",
    "maxAdvertisers": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("deepmine/facebook-ad-leads").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 '{
  "searchQueries": [
    "roofing"
  ],
  "country": "US",
  "maxAdvertisers": 25
}' |
apify call deepmine/facebook-ad-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deepmine/facebook-ad-leads"
        }
    }
}
```

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/cgzf0Un0P4RBzoSi7/builds/Ixg8KTxfwYahCKy0p/openapi.json
