# Meta Ad Library Longevity, EU Reach & Spend Spy Pro (`voxatools/meta-ad-library-longevity-spy-scraper`) Actor

Extract active Facebook & Instagram ads from Meta Ad Library with 90+ day Evergreen Winner scoring, DCO clone deduplication, and EU DSA Beneficiary, Payer & Reach metrics — no login cookies required, $0.00 start fee, $1.50/1k base ads or $2.50/1k w/ EU DSA Detail.

- **URL**: https://apify.com/voxatools/meta-ad-library-longevity-spy-scraper.md
- **Developed by:** [VoxaTools](https://apify.com/voxatools) (community)
- **Categories:** Marketing, Lead generation, AI
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

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 (Facebook & Instagram) Ad Library Longevity, EU Reach & Spend Spy Pro

**Extract active and historical Facebook, Instagram, Messenger, and Audience Network ads with 90+ day Evergreen Winner scoring, Dynamic Creative (DCO) collation clone deduplication, and EU DSA Beneficiary, Payer & Reach intelligence — zero Facebook login cookies required.**

> ⚡ **Start in 10 Seconds / Zero Setup:** Click **Start** below with the pre-filled default targets (`zalando.de`, `hubspot.com`, `asos.com`) or pass a single field `{"queries": ["zalando.de"]}` — no cookies, no API keys, and `$0.00` Actor Start fee. Try the instant free web preview at **[voxatools.com/tools/meta-ad-library-longevity-spy-checker](https://voxatools.com/tools/meta-ad-library-longevity-spy-checker)**.

***

### 1. Why B2B Media Buyers & Growth Teams Switch to VoxaTools

Most Facebook Ad Library scrapers launch heavy headless browsers that burn residential proxy bandwidth, get blocked by challenge walls, and dump hundreds of uncleaned Dynamic Creative (DCO) duplicate rows into your dataset. You end up paying **$5.00 to $8.75 per 1,000 raw rows** while still having to calculate ad longevity and EU reach manually in Excel.

**VoxaTools Meta Ad Library Longevity, EU Reach & Spend Spy Pro** uses a direct **3-Step HTTP/SSR/GraphQL Engine**:

- **Step 1 — Automatic Challenge Handshake** — Completes Meta's 1-hop challenge verification in milliseconds without launching Chromium or requiring personal Facebook cookies.
- **Step 2 — Direct SSR Collation Stream** — Extracts active creative cards, start dates, publisher platforms, CTAs, and `collation_id` groups straight from the server-rendered payload.
- **Step 3 — EU DSA Transparency Enrichment** — Queries Meta's official EU Digital Services Act (DSA) transparency endpoint to unlock verified `beneficiaryName`, `payerName`, `euTotalReach`, and age/gender/country breakdowns.

#### What You Can Do With This Tool — 6 Core B2B Intelligence Capabilities

| # | Feature ID | Capability Name | B2B Decision Value |
|---|---|---|---|
| 1 | **SF-01** | **Creative Longevity & Winner Scoring (0-100)** | Automatically computes `observedActiveDays`, `longevityWinnerScore` (`0–100`), and classifies ads into `EVERGREEN_CONTROL` (`180+ days`), `SCALING_WINNER` (`90–179 days`), `PROVEN_RUNNER` (`30–89 days`), or `TESTING_PHASE` (`<30 days`). |
| 2 | **SF-02** | **DCO Collation Clone Deduplication** | Collapses identical Dynamic Creative variants sharing the same `collationId` or content hash into 1 representative winner row with `collationVariantCount` and `deduplicatedClonesSaved` — saving 40%–70% of wasted PPE charges. |
| 3 | **SF-03** | **EU DSA Beneficiary, Payer & Reach Decoder** | Extracts verified legal `beneficiaryName`, `payerName`, `euTotalReach`, `euReachPerDay`, `euAgeCountryGenderBreakdown`, and transparent illustrative CPM spend bounds (`€8 / €14 / €22` CPM). |
| 4 | **SF-04** | **Strict Brand & Entity Isolation Guard** | Eliminates keyword noise by verifying that `pageId`, `pageName`, `igUsername`, or landing domain matches your target brand (`strictEntityIsolation: true`). |
| 5 | **SF-05** | **10-Parameter Stateful Incremental Diff Radar** | Persists a post-push Key-Value Store checkpoint keyed by a 10-parameter `scopeKey` (`STATE-DELTA-<sha256Short12>-v1`) to isolate newly launched or deactivated ads across weekly runs. |
| 6 | **SF-06** | **1-Click AI Creative Teardown Prompt** | Generates an MCP-ready `aiCreativeTeardownPrompt` per ad or advertiser dossier for instant hook teardown and counter-creative generation in Claude, ChatGPT, or Cursor. |

***

### 2. Strategic 3-Column Comparison Matrix

| # | Capability / Pricing Metric | Legacy Browser Scrapers | Flat-Fee / Add-On Scrapers | VoxaTools Meta Ad Spy Pro |
|---|---|---|---|---|
| 1 | **Base Price per 1,000 Ads** | $5.00 – $8.75 / 1,000 ads | $3.00 – $4.90 / 1,000 ads | **$1.50 / 1,000 deduplicated ads** |
| 2 | **EU DSA Reach + Beneficiary/Payer** | Raw or missing | Often unparsed or extra fee | **$2.50 / 1,000 ads all-in** (`result` + verified `detail`) |
| 3 | **B2B Advertiser Executive Dossier** | ❌ Not supported | ❌ Not supported | **$2.80 / 1,000 dossiers** (`advertiserSummaryMode: true`) |
| 4 | **DCO Collation Clone Deduplication** | ❌ Charges for every duplicate | ❌ Charges for every duplicate | ✅ **Built-in (`deduplicatedClonesSaved`)** |
| 5 | **90+ Day Evergreen Winner Scoring** | ❌ Manual date math required | ❌ Manual date math required | ✅ **Pre-scored `0–100` + `longevityTier`** |
| 6 | **4-Condition `detailVerified` Billing Guard** | ❌ Bills even on empty fields | ❌ Bills flat rate on US/non-EU | ✅ **$0.00 `detail` fee on non-EU or unverified rows** |
| 7 | **Ads / Dossiers per $5.00 Free Credit** | 570 – 1,000 raw rows | 1,020 – 1,666 raw rows | **3,333 Base Ads / 2,000 EU DSA Ads / 1,785 Dossiers** |

***

### 3. Quick-Start Guide & Copy-Paste Input Examples

#### Recipe 1 — Minimal 1-Field AI Agent & MCP Call (Default EU DSA Reach in Germany)

```json
{
  "queries": [
    "zalando.de"
  ]
}
```

#### Recipe 2 — 90+ Day Evergreen Winner Spy (Base Scan Only — $1.50 / 1,000 Ads)

```json
{
  "queries": [
    "zalando.de",
    "asos.com",
    "hubspot.com"
  ],
  "countryFilter": "US",
  "activeStatus": "ACTIVE",
  "mediaType": "VIDEO",
  "minActiveDays": 90,
  "maxAdsPerTarget": 25,
  "deduplicateCollationVariants": true,
  "strictEntityIsolation": true,
  "includeEuDsaAndLongevityMetrics": false,
  "maxChargedUsd": 2.5
}
```

#### Recipe 3 — EU DSA Beneficiary, Payer & Reach Deep Audit ($2.50 / 1,000 Verified EU Ads)

```json
{
  "queries": [
    "zalando.de",
    "klarna.com"
  ],
  "countryFilter": "DE",
  "activeStatus": "ACTIVE",
  "mediaType": "ALL",
  "publisherPlatforms": [
    "FACEBOOK",
    "INSTAGRAM"
  ],
  "minActiveDays": 30,
  "maxAdsPerTarget": 20,
  "deduplicateCollationVariants": true,
  "strictEntityIsolation": true,
  "includeEuDsaAndLongevityMetrics": true,
  "maxChargedUsd": 5
}
```

#### Recipe 4 — Consolidated B2B Advertiser Executive Dossier Mode ($2.80 / 1,000 Dossiers All-In)

```json
{
  "queries": [
    "zalando.de",
    "hubspot.com",
    "asos.com"
  ],
  "countryFilter": "DE",
  "activeStatus": "ACTIVE",
  "maxAdsPerTarget": 20,
  "advertiserSummaryMode": true,
  "includeEuDsaAndLongevityMetrics": true,
  "downloadMediaAssets": false,
  "maxChargedUsd": 5
}
```

#### Recipe 5 — Weekly Incremental Launch Radar + Verified KVS Media Snapshots ($3.30 / 1,000 Full Forensic)

```json
{
  "pageIds": [
    "20531316728"
  ],
  "adLibraryUrls": [
    "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=DE&q=zalando.de"
  ],
  "countryFilter": "DE",
  "activeStatus": "ACTIVE",
  "mediaType": "IMAGE",
  "maxAdsPerTarget": 15,
  "deduplicateCollationVariants": true,
  "strictEntityIsolation": true,
  "includeEuDsaAndLongevityMetrics": true,
  "onlyNewAdsSinceLastRun": true,
  "downloadMediaAssets": true,
  "maxChargedUsd": 5
}
```

***

### 4. Complete Input Parameters Reference

| # | Parameter Key | Type | Default | Description |
|---|---|---|---|---|
| 1 | `queries` | `array` | `["zalando.de", "hubspot.com", "asos.com"]` | Target brand domains or advertiser keywords to search in Meta Ad Library (max 50 targets). |
| 2 | `pageIds` | `array` | `[]` | Optional numeric Facebook Page IDs (`view_all_page_id`) for 100% exact advertiser extraction. |
| 3 | `adLibraryUrls` | `array` | `[]` | Optional direct `https://www.facebook.com/ads/library/?...` URLs (protected by 2-step Socket-Pinned SSRF guard). |
| 4 | `countryFilter` | `string` | `"DE"` | 2-letter ISO country code (`"DE"`, `"FR"`, `"NL"`, `"ES"`, `"US"`, `"GB"`) or `"ALL"`. Defaults to `"DE"` for EU DSA telemetry. |
| 5 | `activeStatus` | `string` | `"ACTIVE"` | Filter by ad delivery status (`"ACTIVE"`, `"INACTIVE"`, or `"ALL"`). |
| 6 | `mediaType` | `string` | `"ALL"` | Filter by creative media format (`"ALL"`, `"VIDEO"`, `"IMAGE"`, `"MEME"`, or `"NONE"`). |
| 7 | `publisherPlatforms` | `array` | `[]` | Filter by Meta publisher platforms (`"FACEBOOK"`, `"INSTAGRAM"`, `"AUDIENCE_NETWORK"`, `"MESSENGER"`). |
| 8 | `minActiveDays` | `integer` | `0` | Minimum continuous active days (`0..3650`). Set to `90` to isolate proven Evergreen Winners. |
| 9 | `maxAdsPerTarget` | `integer` | `20` | Maximum deduplicated ads emitted per target (`1..500`). Default Cost Guard caps at `20`. |
| 10 | `deduplicateCollationVariants` | `boolean` | `true` | Collapse identical Dynamic Creative (`collationId` / content SHA-256) variants into 1 representative record. |
| 11 | `strictEntityIsolation` | `boolean` | `true` | Discard unrelated pages unless `pageId`, `pageName`, `igUsername`, or `resolvedDomain` matches target query. |
| 12 | `includeEuDsaAndLongevityMetrics` | `boolean` | `true` | Enable Step-3 GraphQL `AdLibraryV3AdDetailsQuery` for EU DSA Beneficiary, Payer & Reach (`+$0.0010/ad` only when `detailVerified === true`). |
| 13 | `advertiserSummaryMode` | `boolean` | `false` | Emit 1 consolidated `ADVERTISER_B2B_DOSSIER` per target page (`$0.0028/dossier`, mutually exclusive with `result`, `detail`, and `asset`). |
| 14 | `onlyNewAdsSinceLastRun` | `boolean` | `false` | Compare against stateful KVS checkpoint (`STATE-DELTA-<sha256Short12>-v1`) and emit only newly launched ads. |
| 15 | `downloadMediaAssets` | `boolean` | `false` | Download 1 verified creative image/poster (`1,001B–40,000B`, JPEG/PNG/WebP magic-byte verified) to KVS (`+$0.0008/asset`). |
| 16 | `maxChargedUsd` | `number` | `5` | Hard USD spending ceiling (`0.01..1000`). Slices output cleanly before exceeding your budget. |
| 17 | `allowApifyProxy` | `boolean` | `false` | Allow optional fallback to Apify Proxy on HTTP 429 on Apify Cloud (`false` by default for `$0.00` proxy cost). |
| 18 | `proxyConfiguration` | `object` | `{"useApifyProxy": false}` | Optional Apify Proxy configuration object when `allowApifyProxy: true`. |

***

### 5. Verified 37-Field Output Dataset Sample

```json
{
  "recordType": "AD_CREATIVE_INTELLIGENCE",
  "queryInput": "zalando.de",
  "countryFilter": "DE",
  "queryDiagnosticStatus": "OK",
  "entityMatchVerified": true,
  "adArchiveId": "954812039481029",
  "collationId": "718293049182736",
  "pageId": "20531316728",
  "pageName": "Zalando",
  "isActive": true,
  "startDateIso": "2025-11-15T08:00:00.000Z",
  "endDateIso": null,
  "displayFormat": "VIDEO",
  "publisherPlatforms": [
    "FACEBOOK",
    "INSTAGRAM"
  ],
  "creativeBodyText": "Entdecke die neue Frühjahrskollektion bei Zalando — Kostenloser Versand & 100 Tage Rückgaberecht.",
  "creativeTitle": "Zalando — Neue Saison, Neuer Style",
  "longevityMetrics": {
    "observedActiveDays": 148,
    "longevityWinnerScore": 87,
    "longevityTier": "SCALING_WINNER",
    "epistemicNote": "Computed from observed start_date in Meta Ad Library"
  },
  "euDsaTransparency": {
    "euDsaStatus": "OBSERVED_EU_DSA_DISCLOSURE",
    "detailVerified": true,
    "isAaaEligible": true,
    "beneficiaryName": "Zalando SE",
    "payerName": "Zalando Marketing Services GmbH",
    "payerBeneficiaryDistinctObserved": true,
    "payerBeneficiaryRelationshipNote": "OBSERVED_NAME_DIFFERENCE_ONLY_LEGAL_RELATIONSHIP_UNVERIFIED",
    "euTotalReach": 482500,
    "euReachPerDay": 3260.14,
    "euAgeRange": "18-65+",
    "euGenderAudience": "ALL",
    "euAgeCountryGenderBreakdown": [
      {
        "country": "DE",
        "age_gender_breakdowns": [
          {
            "age_range": "25-34",
            "male": 64200,
            "female": 112400,
            "unknown": 1800
          }
        ]
      }
    ],
    "illustrativeSpendSimulation": {
      "isOfficialMetaSpend": false,
      "epistemicWarning": "ILLUSTRATIVE_CPM_SIMULATION_ONLY — Meta EU DSA discloses eu_total_reach for commercial ads, not exact monetary spend.",
      "assumedCpmLowEur": 8,
      "assumedCpmMidEur": 14,
      "assumedCpmHighEur": 22,
      "simulatedSpendLowEur": 3860,
      "simulatedSpendMidEur": 6755,
      "simulatedSpendHighEur": 10615
    }
  },
  "advertiserPageProfile": {
    "igUsername": "zalando",
    "igFollowers": 1245000,
    "igVerified": true,
    "pageLikes": 8920410,
    "pageCategory": "E-commerce website",
    "pageVerified": true
  },
  "collationSummary": {
    "collationId": "718293049182736",
    "collationVariantCount": 6,
    "deduplicatedClonesSaved": 5
  },
  "landingFunnelIntelligence": {
    "landingUrlRaw": "https://www.zalando.de/damen-home/?utm_source=facebook&utm_medium=cpc",
    "resolvedDomain": "zalando.de",
    "funnelPathType": "CATEGORY_COLLECTION_LP",
    "ctaText": "Shop Now",
    "ctaType": "SHOP_NOW",
    "detectedOfferHook": "FREE_SHIPPING_100_DAY_RETURNS",
    "videoHdUrl": "https://video.fbcdn.net/v/t42.1790-2/sample_zalando_hd.mp4"
  },
  "incrementalDiffRadar": {
    "scopeKey": "STATE-DELTA-9f8e7d6c5b4a-v1",
    "paginationComplete": true,
    "isTruncatedByMaxAds": false,
    "deltaClassification": "BASELINE_INITIALIZED",
    "isNewSinceLastRun": true,
    "newlyLaunchedAdIds": [
      "954812039481029"
    ],
    "deactivatedAdIds": [],
    "droppedFromSampleWindowIds": []
  },
  "b2bSalesDossier": null,
  "forensicSnapshot": null,
  "billingProvenance": {
    "baseCharged": true,
    "detailCharged": true,
    "advertiserCharged": false,
    "assetCharged": false,
    "totalRecordChargeUsd": 0.0025
  },
  "scrapedAt": "2026-04-12T10:00:00.000Z",
  "id": "954812039481029",
  "adLibraryUrl": "https://www.facebook.com/ads/library/?id=954812039481029",
  "sourceUrl": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=DE&q=zalando.de&search_type=keyword_unordered",
  "requestIdentifier": "META-REQ-954812039481",
  "observedActiveDays": 148,
  "longevityScore": 87,
  "longevityTier": "SCALING_WINNER",
  "isLongRunningWinner": true,
  "cloneCount": 6,
  "deduplicatedClonesSaved": 5,
  "aiCreativeTeardownPrompt": "[VoxaTools Meta Ad Intelligence — voxatools.com] Reverse-engineer this 148-day SCALING_WINNER VIDEO ad from \"Zalando\"..."
}
```

***

### 6. Transparent Modular Pay-Per-Event Pricing

You never pay an Actor Start fee (`$0.00`). Every PPE event is modular, guarded by `maxChargedUsd`, and billed **only after** `Actor.pushData` succeeds:

| # | PPE Event Name | Unit Price | Price per 1,000 | Trigger Condition & Billing Guard |
|---|---|---|---|---|
| 1 | `result` | `$0.0015` | **$1.50 / 1,000 ads** | Base custom event per deduplicated ad record emitted when `advertiserSummaryMode: false`. |
| 2 | `detail` | `+$0.0010` | **+$1.00 / 1,000 ads** (`$2.50/1k` total) | Charged ONLY when `includeEuDsaAndLongevityMetrics: true`, `advertiserSummaryMode: false`, and all 4 `detailVerified` conditions pass (`euDsaStatus === "OBSERVED_EU_DSA_DISCLOSURE"`, non-null beneficiary/payer/reach, non-empty `euAgeCountryGenderBreakdown`, and `queryDiagnosticStatus === "OK"`). **$0.00 on US/non-EU ads!** |
| 3 | `advertiser` | `$0.0028` | **$2.80 / 1,000 dossiers** | Standalone all-in event when `advertiserSummaryMode: true`. Strictly mutually exclusive with `result`, `detail`, and `asset`. |
| 4 | `asset` | `+$0.0008` | **+$0.80 / 1,000 assets** (`$3.30/1k` full) | Charged ONLY when `downloadMediaAssets: true`, `advertiserSummaryMode: false`, and 1 verified image/poster (`1,001B–40,000B`, JPEG/PNG/WebP magic bytes) is written to KVS. Protected by a `2.0 MB` per `1,000` ads circuit breaker. |

#### What Your $5.00 Apify Monthly Free Credit Unlocks

| # | Extraction Mode | Effective Rate per 1,000 | Volume Covered by $5.00 Free Credit |
|---|---|---|---|
| 1 | **Base Longevity & DCO Dedup Scan** (`includeEuDsaAndLongevityMetrics: false`) | **$1.50 / 1,000 ads** | **3,333 deduplicated ads** |
| 2 | **Default EU DSA Reach + Beneficiary/Payer Mode** (`countryFilter: "DE"`) | **$2.50 / 1,000 ads** | **2,000 EU DSA-enriched ads** |
| 3 | **B2B Advertiser Executive Dossier Mode** (`advertiserSummaryMode: true`) | **$2.80 / 1,000 dossiers** | **1,785 B2B advertiser dossiers** |
| 4 | **Full Forensic Media Snapshot Mode** (`downloadMediaAssets: true`) | **$3.30 / 1,000 ads** | **1,515 forensic ads with KVS binaries** |
| 5 | **Default Cost Guard Run** (`3 targets × 20 ads = 60 ads` in `DE`) | **$0.15 per run** | **33 full competitive spy runs** |

***

### 7. AI Agent MCP Integration & Cross-Tool Workflows

Connect this Actor directly to **Claude Desktop, Cursor, Windsurf, or OpenAI Agents SDK** via the Apify MCP Server:

```javascript
// claude_desktop_config.json / .cursor/mcp.json
{
  "mcpServers": {
    "voxatools-meta-ad-spy": {
      "url": "https://mcp.apify.com/?actors=voxatools/meta-ad-library-longevity-spy-scraper"
    }
  }
}
```

#### Recommended Chained B2B Intelligence Workflows

1. **Detect Meta Pixel & Tech Stack First** -> Run **[voxatools/shopify-b2b-tech-stack-detector](https://apify.com/voxatools/shopify-b2b-tech-stack-detector)** to find e-commerce stores firing the Meta Pixel, then pipe their domains into `meta-ad-library-longevity-spy-scraper` to confirm whether they are **Pixel-Active / Ad-Starved** or scaling 90+ day Evergreen Winners.
2. **Cross-Channel Ad Longevity Audit** -> Combine Meta Ad Library winners with **[voxatools/google-ads-transparency-scraper](https://apify.com/voxatools/google-ads-transparency-scraper)** and **[voxatools/tiktok-creative-center-scraper](https://apify.com/voxatools/tiktok-creative-center-scraper)**.
3. **Verify EU DSA Legal Entities** -> Pipe the extracted `euDsaTransparency.payerName` and `beneficiaryName` into **[voxatools/eu-vat-vies-company-verifier](https://apify.com/voxatools/eu-vat-vies-company-verifier)** for corporate KYB and VAT verification.

***

### 8. Frequently Asked Questions (FAQ) & Changelog

#### Frequently Asked Questions (FAQ)

- **Q1: Do I need to provide Facebook login cookies or a Meta Developer App token?**
  No. The engine uses a 3-step public handshake and server-rendered data extraction — zero cookies, zero login risk, and zero browser startup delay.
- **Q2: Why does `countryFilter` default to `"DE"` (Germany)?**
  Under the EU Digital Services Act (DSA), Meta is legally required to disclose `beneficiaryName`, `payerName`, `euTotalReach`, and age/gender breakdowns for ads delivered in EU/EEA member states. Defaulting to `"DE"` ensures you get rich EU DSA intelligence out of the box.
- **Q3: Am I charged the `+$0.0010` (`detail`) fee when scanning US or UK ads?**
  **Never.** For non-EU countries (`US`, `GB`, `CA`, `AU`), `euDsaStatus` is set to `"NOT_DISCLOSED_OUTSIDE_EU_DSA_SCOPE"` and `detailVerified` is `false`, so you only pay the `$0.0015` base `result` rate.
- **Q4: Are the EUR spend numbers in `illustrativeSpendSimulation` official Meta billing figures?**
  No. For commercial (non-political) ads, Meta discloses exact `euTotalReach`, not monetary spend. We multiply verified `euTotalReach` by transparent Low (`€8`), Mid (`€14`), and High (`€22`) CPM benchmarks and label `isOfficialMetaSpend: false`.

#### Changelog

- **v1.0 (2026-04-12)** — Initial production release with 3-step HTTP/SSR/GraphQL engine, 2-step Socket-Pinned SSRF guard, DCO collation deduplication, 4-condition `detailVerified` EU DSA gate, `advertiserSummaryMode` mutual-exclusion lock, 10-parameter stateful KVS delta radar, and `2.0 MB` media asset circuit breaker.

# Actor input Schema

## `queries` (type: `array`):

Brand domains or advertiser names to search in Meta Ad Library (e.g., \['zalando.de', 'hubspot.com', 'asos.com']). Max 50 targets per run.

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

Optional list of numeric Facebook Page IDs (e.g., \['20531316728']) for 100% exact advertiser extraction.

## `adLibraryUrls` (type: `array`):

Optional direct https://www.facebook.com/ads/library/?... URLs. Non-Meta hosts or private IPs are strictly rejected.

## `countryFilter` (type: `string`):

2-letter ISO country code (e.g., 'DE', 'FR', 'NL', 'ES', 'IT', 'PL', 'SE', 'US', 'GB') or 'ALL'. Defaults to 'DE' so EU DSA Reach and Beneficiary/Payer data are immediately available.

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

Filter by active delivery status: ACTIVE, INACTIVE, or ALL.

## `mediaType` (type: `string`):

Filter by creative media format: ALL, VIDEO, IMAGE, MEME, or NONE.

## `publisherPlatforms` (type: `array`):

Optional filter for publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER.

## `minActiveDays` (type: `integer`):

Only return ads that have been continuously active for at least N days (e.g., 30, 60, or 90 days).

## `maxAdsPerTarget` (type: `integer`):

Maximum deduplicated ads to emit per target query/page. Defaults to 20 (3 targets = 60 ads, ~$0.15 with EU DSA enabled) to protect your budget.

## `deduplicateCollationVariants` (type: `boolean`):

Collapse identical Dynamic Creative Optimization (DCO) collation variants into a single representative record with collationVariantCount.

## `strictEntityIsolation` (type: `boolean`):

Discard unrelated pages returned by broad keyword searches unless pageName, igUsername, or landing domain matches the target query.

## `includeEuDsaAndLongevityMetrics` (type: `boolean`):

Enables Step-3 GraphQL AdLibraryV3AdDetailsQuery to extract EU DSA Beneficiary, Payer, EU Total Reach, Age/Gender/Country breakdowns, and illustrative CPM spend bounds. Charges +$0.0010/ad ONLY when detailVerified === true.

## `advertiserSummaryMode` (type: `boolean`):

Emit 1 consolidated B2B Advertiser Dossier per target page instead of individual ad rows. Strictly mutually exclusive with 'result', 'detail', and 'asset' events.

## `onlyNewAdsSinceLastRun` (type: `boolean`):

Compare against the previous run's KVS checkpoint (keyed by 10-parameter scopeKey) and emit only newly launched or state-changed ads. Checkpoint writes only AFTER pushData.

## `downloadMediaAssets` (type: `boolean`):

Downloads 1 primary creative image or video poster thumbnail per ad (1,001B–40,000B, JPEG/PNG/WebP magic-byte verified) via Direct Socket-Pinned CDN and writes 1 binary KVS key. Disabled automatically in advertiserSummaryMode.

## `maxChargedUsd` (type: `number`):

Maximum total USD to charge for this run across all PPE events. The Actor stops cleanly before exceeding this ceiling.

## `allowApifyProxy` (type: `boolean`):

Allow automatic fallback to Apify Proxy on Apify Cloud if direct Zero-Browser requests encounter HTTP 429. Hard-locked to false on Free Micro-Web Edge.

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

Optional Apify Proxy settings (only used when allowApifyProxy=true and direct Zero-Browser requests encounter rate limits).

## Actor input object example

```json
{
  "queries": [
    "zalando.de",
    "hubspot.com",
    "asos.com"
  ],
  "pageIds": [],
  "adLibraryUrls": [],
  "countryFilter": "DE",
  "activeStatus": "ACTIVE",
  "mediaType": "ALL",
  "publisherPlatforms": [],
  "minActiveDays": 0,
  "maxAdsPerTarget": 20,
  "deduplicateCollationVariants": true,
  "strictEntityIsolation": true,
  "includeEuDsaAndLongevityMetrics": true,
  "advertiserSummaryMode": false,
  "onlyNewAdsSinceLastRun": false,
  "downloadMediaAssets": false,
  "maxChargedUsd": 5,
  "allowApifyProxy": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `metaAdsIntelligenceDataset` (type: `string`):

Structured Facebook, Instagram, Messenger, and Audience Network ad intelligence records with 90+ day Evergreen Winner scores, DCO collation clone deduplication, EU DSA Beneficiary/Payer & Reach breakdowns, and B2B advertiser dossiers.

## `executiveCompetitorSummary` (type: `string`):

Aggregated run benchmark including Evergreen Winner distribution, DCO collation clone savings, EU DSA reach & illustrative CPM spend totals, and billing provenance.

# 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 = {
    "queries": [
        "zalando.de",
        "hubspot.com",
        "asos.com"
    ],
    "countryFilter": "DE"
};

// Run the Actor and wait for it to finish
const run = await client.actor("voxatools/meta-ad-library-longevity-spy-scraper").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 = {
    "queries": [
        "zalando.de",
        "hubspot.com",
        "asos.com",
    ],
    "countryFilter": "DE",
}

# Run the Actor and wait for it to finish
run = client.actor("voxatools/meta-ad-library-longevity-spy-scraper").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 '{
  "queries": [
    "zalando.de",
    "hubspot.com",
    "asos.com"
  ],
  "countryFilter": "DE"
}' |
apify call voxatools/meta-ad-library-longevity-spy-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,voxatools/meta-ad-library-longevity-spy-scraper"
        }
    }
}
```

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/NPhqaTJPQyCoevrhc/builds/icWmy6gWSPBgec1IL/openapi.json
