# Meta Ads Advertiser Leak Audit & Email Enricher (`maitreya_buddha/meta-ads-advertiser-leak-audit-email-enricher`) Actor

Turn Meta Ad Library datasets, Run IDs, Sheets/CSV, or landing URLs into audited DTC agency leads: 110+ tech stack, 404/OOS/DMARC leaks, verified emails & pitches ($4.50/1K; $0 skip).

- **URL**: https://apify.com/maitreya_buddha/meta-ads-advertiser-leak-audit-email-enricher.md
- **Developed by:** [BoGeun Kim](https://apify.com/maitreya_buddha) (community)
- **Categories:** Lead generation, Marketing, E-commerce
- **Features:** Full permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.50 / 1,000 audited advertiser brands

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

## Meta Ads Advertiser Leak Audit & Email Enricher

> **Turn messy Meta Ad Library exports, Apify Run IDs, pasted Google Sheets/CSV lists, or ad landing URLs into ready-to-pitch DTC agency leads — with 4-layer 110+ tech stack X-Ray, live 404/OOS/DMARC leak detection, verified brand emails, buyer-fit grading, and zero-hallucination outreach copy for `$4.50 / 1,000` unique brands.**

> **Independently Verified Reliability:** Part of the open-source External Business Intelligence MCP suite ranked **100/100 (#1 in Sales & CRM · Security Grade A · 23 ms edge latency)** on [mcptry](https://mcptry.com/servers/io.github.wonderpick/apify-b2b-ecom-automation-kit), **Grade A** on [Glama](https://glama.ai/mcp/servers/wonderpick/apify-b2b-ecom-automation-kit), and published on the **Official MCP Registry**. Built in **128 MB RAM pure HTTP** · **$0 default proxy fees · $0 AI API bills · $0 billed on non-brand platforms (Amazon, WhatsApp, Instagram, App Store), WAF-blocked/unreachable domains (default), weekly repeat brands (`dedupStoreName`), or optional filtered misses.**

***

#### Choose Your Track

- **[For Humans — Agencies, Freelancers & Outbound Operators](#for-humans-agencies-freelancers--outbound-operators):** Plain-English overview, 30-second free demo, ROI math, and side-by-side comparison vs. monthly subscriptions & enrichment workbenches.
- **[For AI Agents & Automation Builders — MCP, n8n, Make, LangChain & API](#for-ai-agents--automation-builders-mcp-n8n-make-api):** Exact input/output contracts, deterministic enums, zero-hallucination guardrails, `128 MB` latency/cost profile, and copy-paste MCP / REST / n8n snippets.

***

## For Humans: Agencies, Freelancers & Outbound Operators

### Try It in 30 Seconds (Zero Setup Required)

Click **Start** right now with the **5 prefilled live DTC brand URLs** — no API keys, no proxies, and no credit card beyond Apify's free monthly credits. In under 30 seconds you will see:

- **Live founder extraction + Tier-2 expansion pitch** on a healthy Scaling DTC brand (`chomps.com` — 19 tools found, 55 SKUs, Founder from JSON-LD, 1-click LinkedIn decision-maker search, and an actionable Cart Upsell pitch even at `leakScore: 0`).
- **Dual-Track 404 cash-burn detection + full brand recovery** (`brooklinen.com/...-404` — catches the dead paid ad link as `VIP_HOT` while still recovering `hello@brooklinen.com`, 517 SKUs, 16 tools, and ready-to-send outreach copy).
- **Honest headless / CSP handling, DMARC deliverability grading (A–F), and CS ticket-queue safety warnings** so you never send an embarrassing false-positive email.

***

### The Monday Morning Problem This Solves

Every performance marketing, TikTok/Google Ads, Klaviyo email/SMS, deliverability, CRO, and UGC agency hits the exact same wall:

You scrape 5,000 active ads from the Meta Ad Library and get a bloated spreadsheet packed with duplicate brands, `l.facebook.com` redirect links, Amazon/WhatsApp/App Store URLs, and **zero emails, zero tech stack proof, zero DMARC/SPF deliverability checks, and zero proof of where each advertiser is leaking money.**

Stitching together a monthly store database (`$75–$950/mo`), a technographic lookup subscription (`$295–$995/mo`), a multi-step enrichment workbench (`$149–$800/mo`), a B2B contact database (`$49–$149/mo`), and an AI copywriter easily costs **$300–$1,000+/month** — and **still** fires embarrassing *"you're missing a TikTok pixel!"* pitches at brands running Shopify Checkout Extensibility, server-side GTM, or headless Next.js storefronts.

**Paste an Apify Dataset ID, an Apify Run ID, a Google Sheets/CSV table, or landing URLs — click Start — and export a deduplicated, CRM-ready CSV (`instantly`, `smartlead`, `hubspot`, `lemlist`) plus an Executive Summary Report (`OUTPUT_SUMMARY.md`) for `$4.50 / 1,000` unique brands.**

***

### Side-by-Side Comparison: How We Stack Up Against Other Tool Categories

| What Agencies Actually Need to Close Deals | **This All-in-One Enricher (`$4.50 / 1K` unique brands)** | Generic Ad Scrapers + DIY Stacks | Static E-Commerce Store Databases (`$75–$950/mo`) | Technographic Indexes (`$295–$995/mo`) | Multi-Step Enrichment Workbenches (`$149–$800/mo`) | B2B Contact Databases (`$49–$149/mo`) |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **True Pricing (1,000 Unique Brands)** | **`$4.50` flat pay-as-you-go** (`$0` proxies, `$0` AI, `$0` skips) | `$5–$25` raw ads + hours of cleanup | `$75–$950/mo` locked subscription | `$295–$995/mo` locked subscription | **`$150–$600 / 1K`** across credit steps | `$49–$149/mo` seats + credit caps |
| **Brand Dedup & `$0` Marketplace Shield** | **Merges 50 ads -> 1 brand; unwraps `bit.ly`/`linktr.ee`; skips Amazon/WhatsApp/App Store at `$0`** | Bills every duplicate ad row & marketplace link | Static store list; not tied to live ad clicks | Domain index only; no ad dedup | Manual dedup formulas & wasted credits | No ad URL unwrapping |
| **Live Cash-Burn X-Ray (404 / OOS / DMARC)** | **Live HTTP 404/5xx, JSON-LD `OutOfStock`, homepage redirects, slow TTFB + 11-query DNS Grade A–F (`MX`/`SPF`/`DMARC`/`BIMI`/`DKIM`)** | None | Cached monthly snapshots; misses live 404/OOS | No live ad landing or DMARC audit | Requires 3–4 paid waterfall steps | None |
| **4-Layer 110+ Stack & Zero False Leaks** | **110+ rules + 34 Shopify Web Pixel IDs + 30+ OS 2.0 `shopify://apps/` blocks + CSP/Header/Cookie X-Ray — auto-suppresses false leaks on GTM & headless Next.js/Hydrogen** | None | Often misses sandboxed Checkout Extensibility pixels | Misses sandboxed web pixels & private CSP tags | Generic HTML regexes misfire on GTM/headless | No tech stack verification |
| **Tier-2 Pitches for Healthy Brands** | **Even when `leakScore: 0`, emits evidence-backed `expansionOpportunities` (SMS, Cart Upsell, Subscriptions, A/B Testing, Loyalty, UGC)** | None | None | Raw tech list only | Expensive LLM prompts per row | None |
| **Inbox Safety & Decision-Maker Access** | **`inboxType` guard flags `cs_ticket_queue` (Gorgias/Zendesk) to protect sender rep + 1-click `linkedinDecisionMakerSearchUrl` + `$0`-markup optional BYOK** | None | Generic `info@` emails only | No contacts | Extra per-contact enrichment credits | Stale job titles; no live ad-leak proof |
| **Honest Buyer Fit (Zero Fake Revenue)** | **Observable `buyerFitTier` (`Enterprise` / `Scaling DTC` / `Growing SMB` / `Early Stage`) backed by transparent `buyerFitSignals`** | None | Guessed revenue estimates | Traffic rank estimates only | Paid third-party estimates | Headcount ranges only |
| **Weekly Buying-Trigger Tracking** | **Built-in 16-shard KV store: `skip_seen` (`$0` skip repeats) OR `watch_diff` (`ad_volume_surge`, `esp_churned`, `pixel_added`, `new_404_leak`, `dmarc_unfixed`)** | Re-bills identical brands weekly | Static monthly export | Slow re-crawl cycle | Re-bills full enrichment on refresh | No weekly ad/stack change triggers |
| **1-Click CRM Export & Free Automation** | **5 CRM presets (`default`, `instantly`, `smartlead`, `hubspot`, `lemlist`) + Executive `OUTPUT_SUMMARY.md` + free ready-to-import n8n workflow** | Raw JSON | CSV export caps | Raw domain CSV | Complex table mapping | Basic CSV |

***

### 4 Dead-Simple Ways to Feed Advertisers In

1. **Paste an Apify Dataset ID or Run ID (`sourceDatasetId` / `sourceRunId`)**: Chain directly from any Meta/Social Ad Library scraper run. Streams in 250-item pages, unwraps `l.facebook.com`/`l.instagram.com`, merges ads per brand, and calculates `activeAdsCount`, `longestRunningAdDays`, `creativeMix`, `creativeVideoRatio`, `euTotalReach` (strictly when present in upstream data), and `adSpendTier`.
2. **Copy-Paste from Google Sheets, Excel, or CSV (`rawCsvOrUrls`)**: Paste spreadsheet rows (auto-detects `url`, `domain`, `website`, `link`, `advertiser`, `brand`, `page_name`, `active_ads`) or plain URLs one per line.
3. **Direct Landing URLs (`landingPageUrls`)**: Paste up to 2,000 ad URLs, bare brand domains, or shorteners/bio links (`bit.ly`, `linktr.ee`, `beacons.ai`).
4. **Raw Ad Library JSON (`rawAdRecords`)**: Send raw JSON ad items directly in a single API, MCP, or n8n call.

***

### 8 Agency Vertical Presets + Complete Zero-AI Outreach Bundle

Select `agencyPreset` to tailor `leakScore` (0–100), `leadPriority` (`VIP_HOT` / `WARM` / `NURTURE`), `recommendedAgencyAngle`, `coldEmailSubject`, `coldEmailOpener`, `coldEmailBody`, `followUpLine`, `linkedInDm`, and `personalizationProof` strictly from live verified proof:

- `auto_best_fit` — Prioritizes hard cash-burning leaks (HTTP 404/5xx, `OutOfStock`, password-locked) before retention, UGC, deliverability, and cross-channel expansion.
- `tiktok_google_ads` / `tiktok_ads_agency` / `google_ads_agency` — Finds Meta advertisers missing TikTok Pixel or Google Ads `AW-` tags (with honest GTM, Shopify Web Pixels, CSP, and DNS checks so you never pitch a false gap).
- `email_sms_retention` — Finds paid-ad brands lacking Klaviyo, Attentive, Postscript, Omnisend, Braze, or Yotpo SMS (verified across HTML, Web Pixels, OS 2.0 app blocks, CSP, and DNS DKIM/SPF).
- `cro_landing_page` — Catches broken 404/5xx ad links, JSON-LD `OutOfStock` products, homepage redirects, slow TTFB, missing UTMs, and missing review or A/B testing tools.
- `ugc_creative` — Targets advertisers running static image-only ad sets or long-running static creatives ready for UGC video refresh.
- `deliverability_agency` — Targets scaling advertisers failing Google/Yahoo 2024+ bulk-sender rules (`missing_dmarc_record`, `missing_spf_record`, `dmarc_policy_unenforced` `p=none`).
- **Optional `customAgencyOffer`**: Deterministically woven into your outreach copy with `$0` LLM bills and zero hallucinations.
- **Tier-2 Growth Pitches When `leakScore: 0`**: Healthy brands still generate evidence-grounded `expansionOpportunities` (`expansionScore`, `expansionAngle`) — e.g., Klaviyo without SMS, 50+ SKUs without cart upsell, consumable 50+ SKU catalogs without subscriptions, non-GTM stacks without A/B testing/loyalty, or image-heavy Meta ad mixes — while strictly suppressing client-side guesses on headless, GTM/tag-manager, or WAF-blocked stores.

***

### Live-Verified Real Output Sample (Two Live DTC Brands)

Below is real output captured directly from the engine (trimmed to key fields for readability):

```json
[
  {
    "brandName": "Chomps",
    "brandDomain": "chomps.com",
    "siteStatus": "ok",
    "auditDepth": "full",
    "commercePlatform": "Shopify",
    "storeSkuCount": 55,
    "techStackCount": 19,
    "serverSideOrGtmDetected": true,
    "serverSideToolsCsv": "Shopify Web Pixels Manager, Triple Whale, Littledata",
    "adPixelsCsv": "Google Ads, TikTok Pixel",
    "retentionToolsCsv": "Klaviyo, Postscript, Mailgun, SendGrid, Mailchimp",
    "croToolsCsv": "Reviews (Yotpo), Support Chat (Gorgias), A/B Testing (Shoplift), Consent Manager (OneTrust)",
    "primaryEmail": "team@chomps.com",
    "inboxType": "general",
    "outreachChannelRecommendation": "General brand inbox — send concise evidence opener & pair with 1-click LinkedIn decision-maker search for higher reply rates",
    "mxVerified": true,
    "emailProvider": "Microsoft 365",
    "deliverabilityGrade": "B",
    "dmarcPolicy": "quarantine",
    "executiveName": "Pete Maldonado",
    "executiveTitle": "Founder",
    "executiveSource": "json_ld",
    "linkedinDecisionMakerSearchUrl": "https://www.linkedin.com/search/results/people/?keywords=%22Pete%20Maldonado%22%20%22Chomps%22",
    "buyerFitTier": "Scaling DTC",
    "buyerFitSignalsCsv": "Enterprise stack (OneTrust) | Paid DTC stack (Triple Whale, Littledata, Klaviyo, Postscript) | 55 published SKUs | 19 marketing tools detected",
    "leakScore": 0,
    "expansionScore": 48,
    "expansionAngle": "Cart Upsell & AOV Expansion",
    "leadPriority": "NURTURE",
    "outreachStatus": "ready"
  },
  {
    "brandName": "Brooklinen",
    "brandDomain": "brooklinen.com",
    "siteStatus": "landing_404",
    "httpStatus": 404,
    "auditDepth": "full",
    "commercePlatform": "Shopify",
    "storeSkuCount": 517,
    "techStackCount": 16,
    "primaryEmail": "hello@brooklinen.com",
    "inboxType": "general",
    "spfFlatteningProvider": "EasyDMARC",
    "buyerFitTier": "Enterprise",
    "leakScore": 89,
    "leadPriority": "VIP_HOT",
    "outreachStatus": "ready",
    "detectedLeaksSummary": "Paid ad landing page returns HTTP 404 (dead link burning ad spend)",
    "recommendedAgencyAngle": "CRO & Ad Landing Page Recovery",
    "coldEmailSubject": "Heads up: Brooklinen's Meta ad link is returning HTTP 404",
    "coldEmailOpener": "I noticed Brooklinen is driving paid traffic to brooklinen.com, but one of your ad destination URLs currently returns HTTP 404—meaning paid clicks are hitting an error page instead of converting."
  }
]
```

***

### Pricing, Weekly Watch-Diff & Honest Scope Notes

- **Pay-per-event:** **`$0.0045` per audited brand (`$4.50 / 1,000 unique brands`)** + `$0.00005` run start.
- **16-Shard Named KV Store (`dedupStoreName`):**
  - `dedupMode: "skip_seen"` (default): Skips previously audited brands at **`$0`** on weekly re-runs.
  - `dedupMode: "watch_diff"`: Re-audits tracked brands against compact ~55-byte sharded snapshots (`WATCH_SHARD_0`..`WATCH_SHARD_F`, up to 48,000 brands at `<4 MB` heap) and flags `hasNewBuyingTrigger: true` + `changeTriggers` (`ad_volume_surge`, `esp_churned`, `pixel_added`, `new_404_leak`, `new_oos_leak`, `dmarc_unfixed`, `sku_count_change`).
- **Optional `$0` Quality Filters (all default OFF):** `onlyWithEmail`, `onlyWithActiveLeaks`, `minLeakScore`.
- **Honest Coverage Notes:**
  - Runs 100% pure HTTP at 128–256 MB RAM with **`$0` default proxy fees**.
  - By default (`dnsFallbackOnBlocked: false`), strict WAF-blocked (`403/429/503` challenges, `siteStatus: "bot_protected"`) and unreachable domains (`siteStatus: "unreachable"`) are skipped at **`$0`** and excluded from billing and `dedupStoreName`.
  - Turn ON `dnsFallbackOnBlocked: true` to audit live WAF-blocked or TCP-reset domains via out-of-band 11-query DNS X-Ray + 403 header/CSP hints + `/robots.txt` + Wikidata (`auditDepth: "dns_only"`, `siteStatus: "bot_protected_dns_audited"`), while dead `NXDOMAIN` domains stay `$0`.
  - **Published Contacts + Optional `$0`-Markup BYOK Waterfall:** Zero-cost scanning recovers published store/brand emails (`partnerships@`, `marketing@`, `hello@`, `press@`, `support@`), strict 0%-FP About/JSON-LD founder/CEO names, legal entities, and batched Wikidata data. Need personal executive work emails on top leads? Toggle `enableByokEnrichment: true` with your own secret `apolloApiKey`, `hunterApiKey`, and/or `zeroBounceApiKey` — automatically gated to `byokTriggerTiers` (default `["VIP_HOT"]`) and capped by `byokMaxLookups` (default `25`). Secret keys are marked `isSecret` and never logged or stored in datasets/KV stores.
  - **Honest Headless & CSP Handling:** Client-hydrated frameworks (Next.js, Remix/Hydrogen, Pack Digital, Nuxt) automatically suppress false missing-pixel/retention accusations, and CSP-only detections are reported transparently in `cspDetectedTools`.

***

## For AI Agents & Automation Builders (MCP, n8n, Make, API)

### Deterministic I/O Contract & Routing Enums

Designed for zero-hallucination tool calling, strict downstream branching, and low-memory cloud execution (`128 MB` verified, `256 MB` default, concurrency auto-capped `<= 2` at 128 MB and `<= 3` at 256 MB).

| Output Field | Deterministic Enum / Contract | Downstream Agent / Workflow Action |
| :--- | :--- | :--- |
| **`leadPriority`** | `VIP_HOT` | `WARM` | `NURTURE` | Route `VIP_HOT` to immediate Slack/CRM alert; `WARM` to nurture sequence; `NURTURE` to archive/watch list. |
| **`buyerFitTier`** | `Enterprise` | `Scaling DTC` | `Growing SMB` | `Early Stage` | `Unknown` | Qualify deal size from observable paid stack, SKU volume, ad scale, and Wikidata/RDAP proof (never hallucinated revenue). |
| **`inboxType`** | `b2b_direct` | `general` | `cs_ticket_queue` | `none` | Suppress automated cold blasts to `cs_ticket_queue` (Gorgias/Zendesk) to protect domain reputation; pivot to `linkedinDecisionMakerSearchUrl`. |
| **`outreachStatus`** | `ready` | `manual_review_required` | **Hard safety gate:** NEVER auto-send unless `outreachStatus === "ready"`, `primaryEmail` is non-empty (`inboxType !== "none"` and `inboxType !== "cs_ticket_queue"`), and `zeroBounceUnsafe !== true`. |
| **`deliverabilityGrade`** | `A` | `B` | `C` | `D` | `F` | `null` | Computed from 11-query DNS X-Ray (`MX`, `SPF`, `DMARC`, `BIMI`, `DKIM`). Grades `D`/`F` trigger deliverability agency pitches. |
| **`siteStatus` / `auditDepth`** | `ok` | `slow` | `landing_404` | `landing_5xx` | `parked_or_locked` | `headless_spa` | `headless_ssr_hydrated` | `bot_protected` | `bot_protected_dns_audited` | `unreachable` · Depth: `full` | `dns_only` | Distinguish real 404/5xx leaks (`landing_404`/`landing_5xx`) and product OOS (`isOutOfStock: true`) from WAF protection (`bot_protected`) or client-hydrated storefronts (`headless_ssr_hydrated`). |
| **`changeTriggers`** | `ad_volume_surge`, `ad_volume_drop`, `esp_churned`, `esp_added`, `pixel_removed`, `pixel_added`, `new_404_leak`, `new_oos_leak`, `dmarc_unfixed`, `sku_count_change` | Emitted when `dedupStoreName` + `dedupMode: "watch_diff"` detects a delta (`hasNewBuyingTrigger: true`). |

#### Key Guardrails for Autonomous Agents

- **2-Stage Run/Dataset Chaining & Permissions:** Pass `sourceRunId` or `sourceDatasetId` from any upstream Meta Ad Library scraper; the Actor streams in 250-item pages and outputs one deduplicated record per brand domain. *(This Actor requests `FULL_PERMISSIONS` solely so it can read your user-supplied `sourceDatasetId`/`sourceRunId` runs/datasets and persist your optional `dedupStoreName` watch-diff Key-Value Store; it never modifies or accesses unrelated account resources.)*
- **Zero-Hallucination Copy & Names:** `firstName` / `lastName` are populated ONLY from verified JSON-LD/About/BYOK names (empty string `""` when unknown — never fabricated). `zeroBounceUnsafe: true` moves invalid/catch-all-risk emails to `quarantinedEmail`, clears `primaryEmail` to `null`, and sets `inboxType: "none"`.
- **Outputs & Artifacts:**
  - **Dataset** with 3 structured views (*Overview*, *110+ Tech Stack & Deliverability*, *Contacts & CRM Copy*).
  - **Key-Value Store Summaries:** `OUTPUT_SUMMARY` (JSON KPIs + top leads) and `OUTPUT_SUMMARY.md` (executive Markdown report).
  - **SSRF-Safe Webhook (`webhookUrl`):** Blocks private/loopback/link-local/metadata IPs & `file://`; supports `webhookOnlyTiers` and secret `webhookHeaders`.
  - **Billing Integrity:** 50-item batched `Actor.charge({ eventName: 'advertiser-audited', count })` with exact `chargedCount` slicing.

***

### Copy-Paste Integration Snippets

#### 1. Zero-Install Remote MCP (Claude, Cursor, Windsurf, ChatGPT)

Connect to our open-source **External Business Intelligence MCP Server** (`Streamable HTTP`) and invoke **`audit_meta_ads_advertisers`** (or run the built-in **`audit_meta_ads_leaks_and_draft_pitches`** one-click prompt):

```json
{
  "mcpServers": {
    "apify-b2b-ecom-mcp": {
      "url": "https://apify-factory-rapidapi-gateway.apify-factory-rapidapi-gateway.workers.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_API_TOKEN"
      }
    }
  }
}
```

#### 2. Apify REST API (Single Sync Call — 256 MB RAM)

```bash
curl -X POST "https://api.apify.com/v2/acts/maitreya_buddha~meta-ads-advertiser-leak-audit-email-enricher/run-sync-get-dataset-items?memory=256" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "landingPageUrls": ["https://www.chomps.com/", "https://www.brooklinen.com/products/discontinued-summer-promo-demo-404"],
    "agencyPreset": "auto_best_fit",
    "crmExportPreset": "instantly",
    "maxBrands": 25
  }'
```

#### 3. Free Weekly n8n Workflow Template

Import the ready-to-run 13-node multi-branch Google Sheets + Slack + Gmail workflow ([`07-meta-ads-advertiser-leak-audit-outreach.json`](https://github.com/wonderpick/apify-b2b-ecom-automation-kit/blob/main/n8n-workflows/07-meta-ads-advertiser-leak-audit-outreach.json)) from [`wonderpick/apify-b2b-ecom-automation-kit`](https://github.com/wonderpick/apify-b2b-ecom-automation-kit) to automate weekly `watch_diff` monitoring, `VIP_HOT` routing, and `cs_ticket_queue` / `manual_review_required` / missing-email separation with zero hardcoded secrets. *(The Actor source also bundles a standalone 2-stage async polling template at `templates/n8n-weekly-meta-ads-audit.json`.)*

# Actor input Schema

## `sourceDatasetId` (type: `string`):

Paste a raw Apify Dataset ID, Apify Console Dataset URL, or Apify API Dataset URL from any Meta/Social Ad Library scraper. Automatically unwraps l.facebook.com redirects and aggregates active ad counts, runtime days, EU reach (when present), and creative mix.

## `sourceRunId` (type: `string`):

Paste an upstream Meta Ad Library scraper Run ID or Console Run URL. Automatically resolves its defaultDatasetId and streams records.

## `landingPageUrls` (type: `array`):

Paste up to 2,000 ad landing page URLs, bare brand domains, l.facebook.com tracking URLs, or shorteners/bio links (bit.ly, linktr.ee). Prefilled with 5 live DTC demos showcasing founder extraction, Tier-2 growth expansion, DMARC leak, Dual-Track 404 recovery, headless CSP handling, and CS inbox-risk warnings. Unrecoverable non-brand platforms (amazon.com, wa.me, instagram.com, apps.apple.com) are isolated at $0.

## `rawCsvOrUrls` (type: `string`):

Paste raw CSV, tab-separated Google Sheets/Excel rows (auto-detects url/domain/website/advertiser/brand/active_ads headers), or plain newline-separated URLs/domains.

## `rawAdRecords` (type: `array`):

Optional direct array of raw Meta/Social Ad Library JSON items for single-call API, MCP, or n8n workflows.

## `agencyPreset` (type: `string`):

Tailors leakScore (0-100), recommendedAgencyAngle, coldEmailSubject, coldEmailOpener, coldEmailBody, and linkedInDm to what your agency sells.

## `customAgencyOffer` (type: `string`):

Optional 1-line value proposition deterministically woven into outreach copy without LLM fees or hallucinations.

## `crmExportPreset` (type: `string`):

Auto-maps flat columns for direct CSV import into Instantly, Smartlead, HubSpot, or Lemlist (uses verified First/Last Name ONLY — empty string when unknown, never fabricated).

## `dedupStoreName` (type: `string`):

Optional Apify Named Key-Value Store (e.g. "meta-ads-watch-store"). Stores compact 16-shard brand snapshots (~55 bytes/brand, up to 48,000 brands at <4 MB RAM).

## `dedupMode` (type: `string`):

When dedupStoreName is set: skip_seen skips previously audited brands at $0; watch_diff re-audits tracked brands and emits changeTriggers (ad_volume_surge, esp_churned, pixel_added, new_404_leak, new_oos_leak, dmarc_unfixed, sku_count_change).

## `enableContactPageFollow` (type: `boolean`):

Follow up to 4 bounded internal pages (/contact, /about, /press, /wholesale, /partnerships, Shopify /policies/\*) to recover B2B emails, founders/CEOs, and legal entities (never mutates Track 1 status).

## `enableShortenerUnwrap` (type: `boolean`):

Unwrap ad URLs using shorteners (bit.ly, tinyurl.com, t.co, rebrand.ly) or bio-link hubs (linktr.ee, beacons.ai, stan.store) to recover the real brand domain before isolating non-brand platforms at $0.

## `enableDnsEmailCheck` (type: `boolean`):

Run out-of-band DNS MX, SPF (+ flattening detection), DMARC, BIMI, domain verification TXT, and DKIM CNAME X-Ray ($0 cost, 3.5s timeout).

## `enableStorefrontCatalogAudit` (type: `boolean`):

Extract published SKU count, currency, location (Shopify /meta.json) or median price & storewide OOS rate (WooCommerce Store API) at $0 cost.

## `enablePublicEntityLookup` (type: `boolean`):

Run 1 batched Wikidata organization query per 12 domains (with 1 fast retry) to enrich public legal names, CEO/founders, HQ location, and employee counts ($0 cost, fail-open).

## `enableDomainAgeRdap` (type: `boolean`):

Query public RDAP for domainCreatedAt, domainAgeYears, and registrar. Default OFF to keep run speed fast.

## `dnsFallbackOnBlocked` (type: `boolean`):

Default OFF skips WAF-blocked (403/429) and unreachable brands at $0. Turn ON to emit an auditDepth='dns_only' record with full 11-query DNS X-Ray, 403 header/CSP hints, /robots.txt, and Wikidata data on live blocked domains.

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

Optional $0 filter: save and bill ONLY advertisers with at least 1 recovered brand email. Leave OFF (default) to keep all audited advertisers.

## `onlyWithActiveLeaks` (type: `boolean`):

Optional $0 filter: skip leak-free advertisers at $0 cost.

## `minLeakScore` (type: `integer`):

Optional $0 filter: skip advertisers whose leakScore falls below this threshold (default 0 saves all advertisers).

## `maxBrands` (type: `integer`):

Maximum unique deduplicated brand domains to audit per run (1-2,000).

## `maxConcurrency` (type: `integer`):

Concurrent brand audits (1-10; automatically capped on lean containers to prevent OOM).

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

Leave OFF (default) for $0 direct HTTP auditing. Enable only if you want to route requests through Apify Proxy or custom proxy URLs.

## `enableByokEnrichment` (type: `boolean`):

Master switch for Bring-Your-Own-Key executive contact enrichment (Apollo -> Hunter -> ZeroBounce). Runs ONLY on matching byokTriggerTiers up to byokMaxLookups. API keys are secret and NEVER logged or saved.

## `apolloApiKey` (type: `string`):

Optional Apollo API key for decision-maker lookup (Founder/CEO/CMO/VP Marketing) on qualifying leads.

## `hunterApiKey` (type: `string`):

Optional Hunter API key fallback for executive email discovery when still missing a personal email.

## `zeroBounceApiKey` (type: `string`):

Optional ZeroBounce API key for real-time email validation on qualifying leads.

## `byokTriggerTiers` (type: `array`):

Only invoke BYOK APIs on leads matching these leadPriority tiers (defaults to \["VIP_HOT"] to protect your API credits).

## `byokMaxLookups` (type: `integer`):

Hard ceiling on how many leads can consume BYOK API calls in a single run (default 25).

## `webhookUrl` (type: `string`):

Optional HTTPS/HTTP webhook URL to receive audited leads JSON at run completion. Blocks private, loopback, link-local, and cloud metadata IPs.

## `webhookHeaders` (type: `object`):

Optional JSON object of custom headers (e.g. Authorization or X-Webhook-Secret). Never logged.

## `webhookOnlyTiers` (type: `array`):

Optional list of leadPriority tiers (e.g. \["VIP_HOT", "WARM"]) to send to webhookUrl. Leave empty to send all saved leads.

## Actor input object example

```json
{
  "landingPageUrls": [
    "https://www.chomps.com/",
    "https://www.bellroy.com/",
    "https://www.brooklinen.com/products/discontinued-summer-promo-demo-404",
    "https://www.gymshark.com/",
    "https://www.allbirds.com/"
  ],
  "agencyPreset": "auto_best_fit",
  "crmExportPreset": "default",
  "dedupMode": "skip_seen",
  "enableContactPageFollow": true,
  "enableShortenerUnwrap": true,
  "enableDnsEmailCheck": true,
  "enableStorefrontCatalogAudit": true,
  "enablePublicEntityLookup": true,
  "enableDomainAgeRdap": false,
  "dnsFallbackOnBlocked": false,
  "onlyWithEmail": false,
  "onlyWithActiveLeaks": false,
  "minLeakScore": 0,
  "maxBrands": 10,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "enableByokEnrichment": false,
  "byokTriggerTiers": [
    "VIP_HOT"
  ],
  "byokMaxLookups": 25,
  "webhookOnlyTiers": []
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `summaryJson` (type: `string`):

No description

## `summaryReport` (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 = {
    "landingPageUrls": [
        "https://www.chomps.com/",
        "https://www.bellroy.com/",
        "https://www.brooklinen.com/products/discontinued-summer-promo-demo-404",
        "https://www.gymshark.com/",
        "https://www.allbirds.com/"
    ],
    "maxBrands": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("maitreya_buddha/meta-ads-advertiser-leak-audit-email-enricher").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 = {
    "landingPageUrls": [
        "https://www.chomps.com/",
        "https://www.bellroy.com/",
        "https://www.brooklinen.com/products/discontinued-summer-promo-demo-404",
        "https://www.gymshark.com/",
        "https://www.allbirds.com/",
    ],
    "maxBrands": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("maitreya_buddha/meta-ads-advertiser-leak-audit-email-enricher").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 '{
  "landingPageUrls": [
    "https://www.chomps.com/",
    "https://www.bellroy.com/",
    "https://www.brooklinen.com/products/discontinued-summer-promo-demo-404",
    "https://www.gymshark.com/",
    "https://www.allbirds.com/"
  ],
  "maxBrands": 10
}' |
apify call maitreya_buddha/meta-ads-advertiser-leak-audit-email-enricher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,maitreya_buddha/meta-ads-advertiser-leak-audit-email-enricher"
        }
    }
}
```

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/f2r89GXD80BU78Xg3/builds/dNbNsG3RlE5VUwANz/openapi.json
