# Meta Ad Library Click-to-WhatsApp Ads Scraper (`clovis/meta-ad-library-whatsapp-ads`) Actor

Find businesses running Click-to-WhatsApp ads in the Meta Ad Library, by country and keyword. Advertiser page, category, size, creative, CTA and days running. No login, pay per ad saved.

- **URL**: https://apify.com/clovis/meta-ad-library-whatsapp-ads.md
- **Developed by:** [Daniel Rodríguez](https://apify.com/clovis) (community)
- **Categories:** Lead generation, Marketing, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Meta Ad Library Click-to-WhatsApp Ads Scraper

Find every business that is paying Meta to send customers to its WhatsApp, in any country, in minutes.

Agencies, WhatsApp Business solution providers and lead-gen teams use it to build lists of advertisers that already have budget, a WhatsApp line and a sales flow: the warmest possible outbound list. Researchers use it to measure how Click-to-WhatsApp advertising spreads by market and vertical.

### What you get

One row per ad. Fields that matter most:

| Field | Example |
|---|---|
| `page_name` | Femme Cosmetics |
| `page_categories` | \["Health & Beauty"] |
| `page_like_count` | 16488 |
| `page_url` | https://www.facebook.com/61563780793600/ |
| `cta_type` | WHATSAPP\_MESSAGE |
| `cta_text` | Enviar mensaje de WhatsApp |
| `title` | Escribenos para mas info |
| `body` | Dale a tus rizos la definición que merecen… |
| `days_running` | 312 |
| `publisher_platform` | \["FACEBOOK","INSTAGRAM","WHATSAPP"] |
| `ad_url` | https://www.facebook.com/ads/library/?id=1490506798909645 |

Plus `ad_archive_id`, `country_searched`, `search_term`, `page_id`, `whatsapp_link`, `whatsapp_phone` (when the ad's link carries a number), `caption`, `display_format`, `start_date`, `end_date`, `is_active`, `collation_count`, `images`, `videos`, `scraped_at`, and the delivery estimates Meta publishes for some ads: `impressions_text`, `reach_estimate`, `spend`, `currency`, `eu_total_reach`, `eu_age_gender_breakdown`, `eu_country_breakdown`.

### Why this one

- **Ads targeted at the country, not just shown there.** The Ad Library's country filter also returns foreign advertisers whose audience spilled over. This actor keeps only ads targeted at the country by default, so a Mexico list is Mexican businesses.
- **Small and medium businesses on purpose.** Filter advertisers by page likes to drop big brands and dynamic catalog ads, and keep the local clinic, store or school that actually needs a WhatsApp reply.
- **Honest output.** Fields that Meta does not publish stay null. Nothing is estimated or invented.
- **Pay for what you keep.** One event per ad saved. Scanned ads that the filter drops are free.

Example item:

```json
{
  "ad_archive_id": "1490506798909645",
  "ad_url": "https://www.facebook.com/ads/library/?id=1490506798909645",
  "country_searched": "CO",
  "search_term": "whatsapp",
  "page_id": "427370767118409",
  "page_name": "Femme Cosmetics",
  "page_url": "https://www.facebook.com/61563780793600/",
  "page_categories": ["Health & Beauty"],
  "page_like_count": 16488,
  "cta_type": "WHATSAPP_MESSAGE",
  "cta_text": "Enviar mensaje de WhatsApp",
  "title": "Escribenos para mas info",
  "body": "😍 Dale a tus rizos la definición que merecen con SOY RIZOS…",
  "display_format": "VIDEO",
  "publisher_platform": ["FACEBOOK", "INSTAGRAM", "AUDIENCE_NETWORK", "MESSENGER", "WHATSAPP"],
  "start_date": "2025-10-30",
  "days_running": 312,
  "is_active": true
}
```

### How to use it

1. Pick the countries (ISO codes: `CO`, `MX`, `BR`, `ES`, `IN`, `ID`…).
2. Pick search terms. `whatsapp` alone finds most Click-to-WhatsApp ads, because advertisers write it in the ad. Add vertical words to narrow: `agenda tu cita`, `pide por whatsapp`, `delivery`, `cotiza`.
3. Leave **Only Click-to-WhatsApp ads** on. Turn it off if you want every ad that matches the term.
4. Set **Max ads per search** to control cost. You pay per ad saved, not per ad scanned.

Advertiser page IDs can be passed instead of search terms to pull everything a specific page is running.

### Why this and not the official API

The official Ad Library API only exposes political and social-issue ads. Commercial ads, and therefore their call-to-action type, are only visible in the public Ad Library website. This actor reads that public site, without logging in, and keeps only the ads whose button opens WhatsApp, including carousel cards.

### Limits worth knowing

- The Ad Library does not publish the destination phone number of a Click-to-WhatsApp ad. You get the advertiser page, its category, size and the creative. Enrich the number from the page or the advertiser's website in a second step.
- Ad text is in the advertiser's language. Search terms match that text.
- Meta blocks datacenter IPs. The default proxy setting uses residential proxies; images and video files are not downloaded, so traffic stays small.
- Meta rotates the internal query id every few weeks. The actor learns the current one from the page itself and falls back to the last known value.

### Pricing

Pay per event: one event per ad saved. Scanned ads that the WhatsApp filter drops are free.

# Actor input Schema

## `countries` (type: `array`):

ISO 3166-1 alpha-2 codes of the countries where the ads are shown, e.g. CO, MX, BR, ES, IN.

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

Keywords to search in the ad text or advertiser name. One search is run per country and term. Tip: use words your customers use, e.g. 'whatsapp', 'pide por whatsapp', 'agenda tu cita', 'delivery'.

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

Optional. Restrict the search to these Facebook page IDs instead of a keyword search.

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

Only active ads (currently running), only inactive, or all.

## `targetedCountryOnly` (type: `boolean`):

By default the Ad Library returns every ad that was SHOWN in the country, including foreign advertisers whose audience spilled over. Turn this on to keep only ads whose advertiser targeted that country.

## `maxPageLikes` (type: `integer`):

Optional. Drop advertisers with more likes than this. Useful to skip big brands and keep small and medium businesses (e.g. 100000).

## `minPageLikes` (type: `integer`):

Optional. Drop advertisers with fewer likes than this.

## `onlyWhatsApp` (type: `boolean`):

Keep only ads whose call to action opens WhatsApp (CTA type WHATSAPP\_MESSAGE, including carousel cards). Turn off to get every ad matching the search.

## `maxAdsPerSearch` (type: `integer`):

Stop each country+term search after this many ads have been SAVED (after the WhatsApp filter). Use it to control cost. Default 20 is a quick sample; raise it for a full list.

## `maxPagesPerSearch` (type: `integer`):

Safety cap on how many result pages (about 10 ads each) to scan per search, whatever the filter keeps. Each page takes about 4 seconds.

## `enrichPages` (type: `boolean`):

Second step: visit each advertiser's public Facebook page (no login) and add its website, phone numbers, emails, WhatsApp link and Instagram when the page shows them. One 'page' event per page visited; roughly 2 to 5 MB of residential traffic each.

## `maxPagesToEnrich` (type: `integer`):

Cap on advertiser pages visited in the second step (one visit per unique page, whatever the number of ads).

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

Meta blocks datacenter IPs. Keep Apify residential proxies unless you bring your own.

## Actor input object example

```json
{
  "countries": [
    "CO"
  ],
  "searchTerms": [
    "whatsapp"
  ],
  "pageIds": [],
  "activeStatus": "active",
  "targetedCountryOnly": true,
  "onlyWhatsApp": true,
  "maxAdsPerSearch": 20,
  "maxPagesPerSearch": 15,
  "enrichPages": false,
  "maxPagesToEnrich": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

One item per Click-to-WhatsApp ad: advertiser page, category, likes, CTA, creative, dates and days running.

## `adsJson` (type: `string`):

No description

## `adsCsv` (type: `string`):

No description

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

Searches run, ads scanned and ads saved.

# 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 = {
    "countries": [
        "CO"
    ],
    "searchTerms": [
        "whatsapp"
    ],
    "maxAdsPerSearch": 20,
    "maxPagesPerSearch": 15,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("clovis/meta-ad-library-whatsapp-ads").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 = {
    "countries": ["CO"],
    "searchTerms": ["whatsapp"],
    "maxAdsPerSearch": 20,
    "maxPagesPerSearch": 15,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("clovis/meta-ad-library-whatsapp-ads").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 '{
  "countries": [
    "CO"
  ],
  "searchTerms": [
    "whatsapp"
  ],
  "maxAdsPerSearch": 20,
  "maxPagesPerSearch": 15,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call clovis/meta-ad-library-whatsapp-ads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clovis/meta-ad-library-whatsapp-ads"
        }
    }
}

```

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/WfI39bI5DpSZJz02F/builds/iEraQ8aNeJeRZgWud/openapi.json
