# Facebook Ads Leak Checker — Dead Links & Missing Pixels (`magnova/ad-spend-watchdog`) Actor

Facebook Ads Leak Checker audits live Meta ads for spend leaks — dead destination pages, sold-out Shopify products, and landing pages where the Meta pixel never fires. Enter a keyword or a Facebook Page. Watch mode reports only new and cleared leaks. $0.01 per ad audited, no start fee.

- **URL**: https://apify.com/magnova/ad-spend-watchdog.md
- **Developed by:** [Magnova](https://apify.com/magnova) (community)
- **Categories:** Automation
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.00 / 1,000 ad auditeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Ads Leak Checker — Dead Links & Missing Pixels

**Facebook Ads Leak Checker** audits live Meta (Facebook/Instagram) ads for the leaks that quietly burn ad spend: destination pages that are dead, Shopify products that are sold out, and landing pages where the Meta pixel never fires — so every click is untrackable and unoptimizable.

Give it a keyword or a Facebook Page. It collects the advertiser's **active** ads from the public Meta Ad Library, opens **every ad's destination in a real browser** — the way an actual ad click lands — and reports one record per ad with exactly what's wrong.

### What it checks

| Check | Leak flagged | How it's verified |
|---|---|---|
| Destination loads | `DEAD_DESTINATION` | The page is loaded in headless Chromium: HTTP 404/410, an unreachable host, a parked domain, or a password-protected store. A bare 403 is **never** called dead — it's reported as `BOT_WALLED` unless the rendered page itself confirms it's gone. |
| Shopify product in stock | `OOS_PRODUCT` | For Shopify product pages, availability is read from the store's own product feed (`/products/<handle>.js`). |
| Meta pixel fires | `NO_META_PIXEL` | Network interception during the page load watches for pixel events (`facebook.com/tr` requests carrying `PageView` / `ViewContent`). Static-HTML pixel detection is **not** used — it's invalid on Shopify, where pixels are injected at runtime. |

Classifications that are **never** counted as leaks:

- `NOT_PUBLIC` — the ad exposes no destination while logged out (e.g. age-gated pharmaceutical ads). Reported, never flagged, and no login is ever attempted.
- `CANVAS_DOC` — Instant Experience destinations that live inside Facebook. Classified and skipped.
- `BOT_WALLED` — the destination blocks automated browsers. Reported as walled, not dead.

### Two ways to run it

- **Keyword mode** — enter a keyword (a niche, a product term, a competitor's brand) and a country; the checker audits the active ads the Ad Library returns for it.
- **Advertiser mode** — enter a Facebook Page URL or page name; the checker audits that page's active ads.

**Watch mode** turns either into a monitor: the first run saves a baseline and reports every leak; later runs of the same input report **only new leaks and cleared leaks** (`changeType: NEW_LEAK / CLEARED`), so a scheduled check stays silent while nothing changes.

### Input

| Field | Description |
|---|---|
| `mode` | `keyword` or `advertiser` |
| `query` | Keyword mode: the Ad Library search term, e.g. `supplements` |
| `pageUrl` | Advertiser mode: a Facebook Page URL or page name |
| `country` | Two-letter Ad Library country filter (default `US`) |
| `maxAds` | How many ads to audit, 1–100 (default 30) |
| `watchMode` | Report only changes after the first baseline run |
| `useProxy` | Route via US residential proxies (fallback; direct works by default) |

Example input:

```json
{
  "mode": "keyword",
  "query": "supplements",
  "country": "US",
  "maxAds": 30,
  "watchMode": false,
  "useProxy": false
}
```

### Output

One record per audited ad:

```json
{
  "recordType": "AD",
  "advertiser": "Nature Made",
  "pageName": "Nature Made",
  "pageUrl": "https://www.facebook.com/naturemade/",
  "libraryId": "1096455632928764",
  "startedRunning": "Oct 2, 2026",
  "adText": "Keep it moving with the #1 Pharmacist recommended brand of Vitamins and supplements…",
  "destinationUrl": "https://www.naturemade.com/collections/immune-supplements?utm_source=fbig&utm_medium=animsatedocial&utm_campaign=Q4Immune&utm_content=1kheadsfocus",
  "finalUrl": "https://www.naturemade.com/collections/immune-supplements?utm_source=fbig&utm_medium=animsatedocial&utm_campaign=Q4Immune&utm_content=1kheadsfocus",
  "httpStatus": 200,
  "destinationClass": "OK",
  "shopify": true,
  "productAvailable": null,
  "pixelEventsSeen": [],
  "leaks": ["NO_META_PIXEL"],
  "changeType": null,
  "checkedAt": "2026-11-22T01:31:55+00:00"
}
```

A healthy ad — destination loads, pixel fires, nothing to fix:

```json
{
  "recordType": "AD",
  "advertiser": "PetLab Co.",
  "pageUrl": "https://www.facebook.com/thepetlabco/",
  "libraryId": "1531843508294925",
  "startedRunning": "Jun 21, 2026",
  "destinationUrl": "https://campaigns.thepetlabco.com/tal_quizsph",
  "finalUrl": "https://campaigns.thepetlabco.com/tal_quizsph",
  "httpStatus": 200,
  "destinationClass": "OK",
  "shopify": false,
  "productAvailable": null,
  "pixelEventsSeen": ["PageView"],
  "leaks": [],
  "checkedAt": "2026-11-22T01:32:17+00:00"
}
```

Failed items (an ad card that can't be extracted cleanly, an audit that errors) come out as per-item `ERROR` records — one bad ad never fails the run. Each run ends with one `SUMMARY` record with counts. ERROR and SUMMARY records are never charged.

### Pricing

Pay per event — **$0.01 per ad audited**, no start fee. You pay for audited ads delivered to the dataset; in watch mode you pay for baseline ads and for ads whose leaks changed, not for re-checking unchanged ads.

| Plan tier | Price per ad audited |
|---|---|
| Free / Bronze | $0.01 |
| Silver | $0.0085 |
| Gold / Platinum / Diamond | $0.007 |

### Notes

- Public, logged-out Ad Library data only — no Facebook account, no login, no API key. If Meta ever serves a login wall or a CAPTCHA instead of the library, the run stops and tells you, rather than trying to get around it.
- Destinations are audited as a fresh, no-consent visit. A pixel that only fires after a visitor accepts a cookie banner will show as `NO_META_PIXEL` — which is also what a privacy-conscious visitor's click is worth until they consent.
- The same destination shared by several ad variants is loaded once per run and the verdict applied to each ad.

⭐ Finding this useful? A rating on the Apify Store helps other users discover this Actor — thank you!

# Actor input Schema

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

Two-letter country code for the Ad Library's country filter (the library shows different ads per country). Examples: US, GB, CA, AU, DE.

## `maxAds` (type: `integer`):

Maximum number of ads to collect and audit in this run (1-100). Each audited ad is one dataset record and one $0.01 charge. Start small (10-30) for a first check; a full sweep of a large advertiser can use up to 100.

## `mode` (type: `string`):

How to find the ads to audit. 'keyword' searches the Meta Ad Library for ads matching a keyword (e.g. a niche or a competitor's product term). 'advertiser' audits the active ads of one Facebook Page, given in the pageUrl field.

## `pageUrl` (type: `string`):

Advertiser mode only: the Facebook Page to audit — a page URL such as https://www.facebook.com/naturemade/ or just the page name. The actor resolves it in the Ad Library and audits that page's active ads.

## `query` (type: `string`):

Keyword mode only: the search term for the Meta Ad Library, e.g. 'supplements', 'collagen powder' or a competitor brand name. The actor audits the active ads the library returns for it.

## `useProxy` (type: `boolean`):

Route the browser through Apify RESIDENTIAL proxies (US) instead of direct platform egress. Direct egress works and is faster; turn this on only if Meta starts walling the direct route in your runs. Proxy usage costs extra platform credits.

## `watchMode` (type: `boolean`):

For scheduled repeat checks of the same input. The first watch run saves a baseline and reports every leak; later runs report only NEW leaks and CLEARED leaks (changeType field), so a scheduled check stays silent while nothing changes. Leave off for a one-off audit.

## Actor input object example

```json
{
  "country": "US",
  "maxAds": 30,
  "mode": "keyword",
  "pageUrl": "https://www.facebook.com/naturemade/",
  "query": "supplements",
  "useProxy": false,
  "watchMode": false
}
```

# 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 = {
    "country": "US",
    "maxAds": 30,
    "mode": "keyword",
    "pageUrl": "https://www.facebook.com/naturemade/",
    "query": "supplements",
    "useProxy": false,
    "watchMode": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("magnova/ad-spend-watchdog").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 = {
    "country": "US",
    "maxAds": 30,
    "mode": "keyword",
    "pageUrl": "https://www.facebook.com/naturemade/",
    "query": "supplements",
    "useProxy": False,
    "watchMode": False,
}

# Run the Actor and wait for it to finish
run = client.actor("magnova/ad-spend-watchdog").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 '{
  "country": "US",
  "maxAds": 30,
  "mode": "keyword",
  "pageUrl": "https://www.facebook.com/naturemade/",
  "query": "supplements",
  "useProxy": false,
  "watchMode": false
}' |
apify call magnova/ad-spend-watchdog --silent --output-dataset

```

## MCP server setup

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

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/5Zjqza5RCUxTQnP9K/builds/t68AYEepTNMMHEsBp/openapi.json
