Skip to main content
Glama
Apify B2B & E-Commerce MCP Server

Apify B2B & E-Commerce MCP Server

audit_meta_ads_advertisers

Idempotent

Deduplicate Meta Ad Library datasets or DTC landing URLs into audited advertiser brands, adding tech-stack detection, DNS deliverability checks, and verified emails for outreach.

Instructions

Deduplicate Meta Ad Library datasets or DTC ad landing URLs into audited advertiser brands with tech-stack detection, DNS deliverability checks, verified emails, and outreach copy. Supply at least one source (landingPageUrls, rawCsvOrUrls, sourceDatasetId, or sourceRunId; omitting all returns 0 items at $0); dedupStoreName persists 16-shard KV snapshots for skip_seen ($0 repeats) or weekly watch_diff triggers, while onlyWithEmail, onlyWithActiveLeaks, and minLeakScore filter before billing. Persists KV dedup snapshots and optional webhookUrl batches (explaining readOnlyHint=false), runs ~15-60s per 20 brands with per-brand WAF/403/timeout isolation in OUTPUT_SUMMARY, and bills $4.50/1K unique brands ($0 on marketplaces, WAF skips, repeats, or filtered misses). Use for Meta Ad Library and DTC advertiser audits; do not use for local SMB audits (use audit_local_b2b_websites) or Shopify SKU price tracking (use monitor_shopify_competitor_deltas).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "audit_meta_ads_advertisers"
  }
}

Input Schema

NameRequiredDescriptionDefault
dedupModeNoWhen dedupStoreName is set: skip_seen skips previously audited brands at $0; watch_diff detects ad/ESP/pixel/404/DMARC changes.skip_seen
maxBrandsNoMaximum unique deduplicated brand domains to audit (1-2,000).
webhookUrlNoOptional SSRF-protected HTTP/HTTPS webhook URL to receive audited advertiser JSON on completion.
sourceRunIdNoOptional upstream Apify Run ID or Console URL; automatically resolves defaultDatasetId and streams records.
agencyPresetNoAgency service vertical used to score leaks and tailor coldEmailSubject, coldEmailOpener, and linkedInDm.auto_best_fit
minLeakScoreNoOptional minimum 0-100 leakScore threshold ($0 below threshold).
rawCsvOrUrlsNoOptional pasted CSV, TSV/Google Sheets rows, or newline-separated URLs/domains.
onlyWithEmailNoWhen true, save and bill only advertisers where at least 1 brand email is recovered ($0 otherwise).
dedupStoreNameNoOptional Apify Named Key-Value Store (16-shard compact snapshots) for weekly skip_seen ($0 repeats) or watch_diff buying-trigger tracking.
crmExportPresetNoOptional CRM flat column mapping preset (default keeps standard structured schema).default
landingPageUrlsNoUp to 2,000 ad landing URLs, bare DTC domains, l.facebook.com links, or shorteners/bio links (bit.ly, linktr.ee). Optional when sourceDatasetId, sourceRunId, or rawCsvOrUrls is provided.
sourceDatasetIdNoOptional upstream Apify Dataset ID or URL from any Meta/Social Ad Library scraper (streams in 250-item pages and aggregates active ads per brand).
customAgencyOfferNoOptional 1-line agency value proposition deterministically woven into outreach copy ($0 AI).
enableDnsEmailCheckNoRun out-of-band 11-query DNS MX/SPF/DMARC/BIMI checks ($0) to output deliverabilityGrade (A-F) and emailProvider.
onlyWithActiveLeaksNoWhen true, skip leak-free advertisers at $0.
dnsFallbackOnBlockedNoDefault false skips WAF-blocked (403/429) brands at $0. Set true to run out-of-band DNS-only audit on live blocked domains.

Output Schema

NameRequiredDescriptionDefault
actorYesApify Actor slug that produced these records.
countYesTotal number of records returned in items.
itemsYesAudited DTC advertiser leads with 4-layer tech stack, live 404/OOS/DMARC leaks, buyer fit, inbox safety, and outreach copy.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / enableDnsEmailCheck
      Added value: +{
      +  "default": true,
      +  "description": "Run out-of-band 11-query DNS MX/SPF/DMARC/BIMI checks ($0) to output deliverabilityGrade (A-F) and emailProvider.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / webhookUrl
      Added value: +{
      +  "description": "Optional SSRF-protected HTTP/HTTPS webhook URL to receive audited advertiser JSON on completion.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / items / items / properties / linkedinDecisionMakerSearchUrl
      Added value: +{
      +  "description": "1-click LinkedIn decision-maker search URL.",
      +  "type": "string"
      +}
  2. Changed5 schema fields changed
    • addedInput schema / properties / customAgencyOffer
      Added value: +{
      +  "description": "Optional 1-line agency value proposition deterministically woven into outreach copy ($0 AI).",
      +  "type": "string"
      +}
    • addedInput schema / properties / dnsFallbackOnBlocked
      Added value: +{
      +  "default": false,
      +  "description": "Default false skips WAF-blocked (403/429) brands at $0. Set true to run out-of-band DNS-only audit on live blocked domains.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / items / items / properties / outreachStatus / description
      Previous value: -"Safety gate: ready, manual_review_required, no_email, or unsafe_email_quarantined."New value: +"Copy safety gate: ready or manual_review_required (pair with primaryEmail, inboxType, and zeroBounceUnsafe before sending)."
    • changedOutput schema / properties / items / items / properties / primaryEmail / description
      Previous value: -"Highest-priority verified brand email."New value: +"Highest-priority verified brand email (null when none or quarantined)."
    • changedOutput schema / properties / items / items / properties / siteStatus / description
      Previous value: -"Landing page status (ok, landing_404, out_of_stock, headless_ssr_hydrated, bot_protected, etc.)."New value: +"Landing page status (ok, slow, landing_404, landing_5xx, parked_or_locked, headless_spa, headless_ssr_hydrated, bot_protected, bot_protected_dns_audited, or unreachable)."
  3. Added

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well past the annotations: discloses write side effects (KV dedup snapshots, webhook batches) and directly reconciles them with readOnlyHint=false, plus runtime (~15-60s per 20 brands), per-brand WAF/403/timeout isolation surfaced in OUTPUT_SUMMARY, and a precise billing model with the $0 exemption list. Slightly dense and the '(explaining readOnlyHint=false)' parenthetical reads as meta-commentary rather than disclosure, but the substance is strong.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the source requirement are front-loaded and no sentence is filler, but the body is a single run-on paragraph packing billing, runtime, persistence, filtering and alternatives together. Splitting the cost and side-effect clauses into their own sentences would improve scanability without losing content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter, open-world, mutating tool with an output schema, the description covers sourcing, dedup persistence, cost gating, runtime, failure isolation and sibling routing. An agent has everything needed to decide whether to call it and what the call will cost.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description still adds real meaning by linking filters (onlyWithEmail, onlyWithActiveLeaks, minLeakScore) to billing behavior and by explaining that dedupStoreName enables $0 repeats via skip_seen or watch_diff triggers. These are cross-parameter relationships the schema cannot express per-property.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource chain: deduplicate Meta Ad Library datasets / DTC landing URLs into audited advertiser brands with tech-stack, DNS, email and outreach copy. It also names the sibling tools it is NOT (audit_local_b2b_websites, monitor_shopify_competitor_deltas), so an agent can route without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly covers when to use (Meta Ad Library and DTC advertiser audits), when not to use, and which alternative to pick in each excluded case. It additionally states the invocability rule — at least one of landingPageUrls/rawCsvOrUrls/sourceDatasetId/sourceRunId, or the tool returns 0 items at $0 — which is critical given zero required parameters.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.