# Shopify & DTC Store Revenue-Leak, Policy & Stack Enricher (`signalcraft-labs/shopify-dtc-revenue-leak-enricher`) Actor

Enrich Shopify and DTC stores in one fast zero-proxy HTTP pass: installed apps (Klaviyo, Loop, Recharge, Gorgias), BNPL/payments, free-shipping threshold, return window, /products.json catalog leaks, and Clay/MCP agency pitch scores.

- **URL**: https://apify.com/signalcraft-labs/shopify-dtc-revenue-leak-enricher.md
- **Developed by:** [Turtle SK](https://apify.com/signalcraft-labs) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 enriched dtc store

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/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

## Shopify & DTC Store Revenue-Leak, Policy & Stack Enricher

Qualify Shopify and DTC e-commerce stores in **one fast, zero-proxy, zero-API-key pass** for **CRO agencies, Klaviyo/SMS retention agencies, 3PL logistics & returns SaaS sales, BNPL fintech teams, Clay, n8n, and MCP AI agents**.

### What Data You Get per Store

1. **Platform, Currency & Shopify Plus Detection**
   - Accurately detects `shopify`, `woocommerce`, `bigcommerce`, `magento`, `squarespace`, or `custom_dtc` using real asset/DOM markers (no false positives from blog mentions).
   - Extracts `storeCurrency` (`USD`, `EUR`, `GBP`, `KRW`, `JPY`, etc.), `storeCountry`, `myshopifyDomain`, `shopifyThemeName`, and `isShopifyPlus`.
   - Automatic `www.` fallback and checkout-subdomain guard ensure apex redirects to `checkout.*` still enrich the main storefront.
2. **Public Catalog Leak Audit (`/products.json` + `/collections/all/products.json` Fallback)**
   - Samples up to 50 public Shopify products to calculate `sampledProductCount`, `avgProductPrice`, `minProductPrice`, `maxProductPrice`, `outOfStockRatePct`, `missingAltImagesCount`, `thinDescriptionsCount`, and `zeroPriceVariantsCount` (filtering out shipping-protection/gift-card `$0` noise variants).
   - Currency-aware parsing supports zero-decimal currencies (`KRW`, `JPY`, `VND`, `IDR`, `CLP`) without dropping high-denomination prices or triggering false USD BNPL alerts.
3. **55+ Installed DTC Apps, Web Pixels & Payment/BNPL Methods**
   - Parses both standard script tags and Shopify's modern `webPixelsConfigList` setup.
   - **Email & SMS**: Klaviyo, Omnisend, Attentive, Postscript, Yotpo SMSBump, Mailchimp, Sendlane, Privy.
   - **Reviews & UGC**: Judge.me, Yotpo Reviews, Loox, Okendo, Stamped.io, Junip, Trustpilot, Bazaarvoice.
   - **Returns & Post-Purchase**: Loop Returns, AfterShip, Narvar, Redo, Route, Happy Returns, Malomo, ReturnGO.
   - **Subscriptions, Loyalty & Helpdesk**: Recharge, Skio, Stay AI, Bold Subscriptions, Appstle, Smile.io, LoyaltyLion, Yotpo Loyalty, Gorgias, Zendesk, Richpanel, Re:amaze, Tidio, Gladly.
   - **Ads, Attribution & CRO**: Meta Pixel, TikTok Pixel, GA4, GTM, Triple Whale, Northbeam, Pinterest Tag, Snap Pixel, Microsoft Clarity, Hotjar, Elevar, Intelligems, Rebuy, Shoplift, Convert.com.
   - **Checkout & BNPL**: Shop Pay, Apple Pay, Google Pay, PayPal, Amazon Pay, Venmo, Klarna, Affirm, Afterpay, Sezzle, Stripe, Adyen.
4. **Shipping & Return Policy Intelligence**
   - Extracts main policy content (`.shopify-policy__body`, `<main>`, `<article>`, `.rte`) so large Shopify Plus mega-menus never truncate policy copy, and automatically falls back to `/policies/shipping-policy` and `/policies/refund-policy`.
   - Extracts `freeShippingThreshold`, `returnWindowDays`, `hasFreeReturns`, `hasRestockingFee` (with negation guards for `"never charge a restocking fee"` / `"do not offer free returns"`), `offersInternationalShipping`, and `carriersDetected` (`UPS`, `FedEx`, `USPS`, `DHL`, `Royal Mail`, `Canada Post`).
5. **Persona-Aware Agency Opportunity Score (`0–100`) & Pitch Hooks**
   - Choose `general_dtc`, `cro_agency`, `email_sms_agency`, `logistics_returns_sales`, or `payments_bnpl_sales`.
   - Outputs Clay-ready flat columns (`revenueLeaks`, `topPitchAngles`, `opportunityScore`, `opportunityTier`) plus full itemized `details.scoreBreakdown`.

### Example Input

```json
{
  "domains": [
    "allbirds.com",
    "deathwishcoffee.com",
    "beardbrand.com"
  ],
  "targetPersona": "cro_agency",
  "includeCatalogAudit": true,
  "includePolicies": true,
  "maxDomains": 500,
  "maxConcurrency": 5,
  "requestTimeoutMs": 10000
}
```

### Example Output Item

```json
{
  "domain": "allbirds.com",
  "storeName": "Allbirds",
  "status": "ok",
  "errorReason": null,
  "platform": "shopify",
  "storeCurrency": "USD",
  "storeCountry": "US",
  "myshopifyDomain": "allbirds.myshopify.com",
  "isShopifyPlus": true,
  "targetPersona": "cro_agency",
  "opportunityScore": 74,
  "opportunityTier": "hot",
  "sampledProductCount": 50,
  "avgProductPrice": 98.5,
  "outOfStockRatePct": 34.2,
  "missingAltImagesCount": 132,
  "thinDescriptionsCount": 0,
  "zeroPriceVariantsCount": 0,
  "freeShippingThreshold": 75,
  "returnWindowDays": 15,
  "hasFreeReturns": true,
  "hasRestockingFee": false,
  "offersInternationalShipping": true,
  "emailSmsApps": ["Attentive"],
  "reviewsApps": [],
  "returnsPostPurchaseApps": ["Redo"],
  "subscriptionLoyaltyApps": [],
  "helpdeskApps": [],
  "adsAnalyticsApps": ["Elevar", "Google Tag Manager", "Meta Pixel", "Microsoft Clarity", "Triple Whale"],
  "paymentBnplMethods": ["Apple Pay", "Shop Pay"],
  "carriersDetected": ["UPS", "USPS"],
  "publicEmails": ["help@allbirds.com"],
  "revenueLeaks": [
    "132 product images missing alt text in sampled catalog",
    "High out-of-stock rate (34.2% of sampled variants unavailable)",
    "Average SKU price $98.5 with no visible BNPL option (Klarna/Affirm/Afterpay)"
  ],
  "topPitchAngles": [
    "Found 132 missing product alt tags across 50 sampled SKUs.",
    "Running storefront without a detectable reviews/UGC engine (Judge.me, Okendo, Yotpo, Loox).",
    "34.2% of sampled product variants are out of stock: back-in-stock flow opportunity."
  ],
  "auditedAt": "2026-11-29T12:00:00.000Z",
  "details": {
    "finalUrl": "https://www.allbirds.com/",
    "httpStatus": 200,
    "metaDescription": "Allbirds: Comfortable shoes and apparel made with natural materials.",
    "storeCurrency": "USD",
    "storeCountry": "US",
    "myshopifyDomain": "allbirds.myshopify.com",
    "isShopifyPlus": true,
    "shopifyThemeName": "Allbirds Production",
    "socialLinks": {
      "instagram": "https://www.instagram.com/allbirds",
      "tiktok": "https://www.tiktok.com/@weareallbirds",
      "facebook": "https://www.facebook.com/weareallbirds",
      "youtube": "https://www.youtube.com/channel/UCnGErLCau5qNJ0Xwe6uEyTw"
    },
    "catalog": {
      "catalogAccessible": true,
      "sampledProductCount": 50,
      "sampledVariantCount": 254,
      "avgProductPrice": 98.5,
      "minProductPrice": 18,
      "maxProductPrice": 148,
      "outOfStockVariantsCount": 87,
      "outOfStockRatePct": 34.2,
      "missingAltImagesCount": 132,
      "thinDescriptionsCount": 0,
      "zeroPriceVariantsCount": 0,
      "vendorsCount": 1,
      "sampleProductTitles": ["Men's Tree Runner", "Women's Wool Runner"]
    },
    "policies": {
      "shippingPolicyUrl": "https://www.allbirds.com/policies/shipping-policy",
      "returnPolicyUrl": "https://www.allbirds.com/pages/returns-exchanges",
      "freeShippingThreshold": 75,
      "returnWindowDays": 15,
      "hasFreeReturns": true,
      "hasRestockingFee": false,
      "offersInternationalShipping": true,
      "carriersDetected": ["UPS", "USPS"]
    },
    "scoreBreakdown": [
      { "signal": "shopify_storefront", "points": 14, "reason": "Confirmed Shopify storefront" },
      { "signal": "active_sku_catalog", "points": 14, "reason": "50+ active products in public catalog" },
      { "signal": "catalog_seo_cro_gap", "points": 20, "reason": "Verified product alt-text or description leaks" },
      { "signal": "missing_reviews_app", "points": 14, "reason": "No dedicated review/UGC app detected" },
      { "signal": "oos_revenue_leak", "points": 12, "reason": "34.2% variant out-of-stock rate" }
    ]
  }
}
```

### Pay-Per-Event Pricing

You pay **only** for successfully enriched stores (`status: "ok"` or `"partial"`). Invalid domains, SSRF-blocked targets, unreachable hosts, and Cloudflare/PerimeterX WAF challenge interstitials are charged **$0.00**.

| Apify Subscription Tier | `store-enriched` Rate (per 1,000 stores) | Price per Enriched Store |
| --- | ---: | ---: |
| **Free** | $15.00 | $0.0150 |
| **Starter (Bronze)** | $14.00 | $0.0140 |
| **Scale (Silver)** | $13.50 | $0.0135 |
| **Business (Gold)** | $12.00 | $0.0120 |

- **Actor Start Event (`apify-actor-start`)**: `$0.00005` per run (waives the first 5 seconds of Apify platform compute cost).
- **Budget Protection (`maxTotalChargeUsd`)**: Dataset pushes are serialized and checked against your remaining budget before charging, stopping cleanly with zero over-charges.

### Quick-Start Integrations

#### 1. Chain from Any Apify Dataset (`sourceDatasetId`)

Pipe output directly from Google Maps Scraper, Store Leads, or Meta Ad Library without writing glue code. Pagination (`limit: 200` per page) and filtering of directory/social hosts (`google.com`, `maps.google.com`, `facebook.com`, `instagram.com`, `tiktok.com`, `linkedin.com`, `youtube.com`, `pinterest.com`, `amazon.com`, `apify.com`) are built in:

```json
{
  "sourceDatasetId": "your-username~google-maps-shopify-leads",
  "targetPersona": "email_sms_agency",
  "maxDomains": 1000
}
```

#### 2. Clay (HTTP API Enrichment Column)

Point a Clay **HTTP API** column (`POST`) at Apify's synchronous run endpoint:

```text
POST https://api.apify.com/v2/acts/<ACTOR_ID>/run-sync-get-dataset-items?token=<APIFY_TOKEN>
```

```json
{
  "domains": ["{{Domain}}"],
  "targetPersona": "cro_agency"
}
```

Map `opportunityScore`, `opportunityTier`, `storeCurrency`, `isShopifyPlus`, `outOfStockRatePct`, `missingAltImagesCount`, `revenueLeaks[0]`, and `topPitchAngles[0]` directly into Clay columns for personalized outbound copy.

#### 3. n8n Workflow

Use the **Apify** node (`Run an Actor and get dataset items`) or an **HTTP Request** node pointing to `run-sync-get-dataset-items`:

```json
{
  "domains": ["={{ $json.website }}"],
  "targetPersona": "logistics_returns_sales",
  "includeCatalogAudit": true,
  "includePolicies": true
}
```

#### 4. MCP (AI Sales & Research Agents)

Invoke this Actor as an MCP tool via Apify's MCP server (`https://mcp.apify.com`) with structured arguments:

```json
{
  "domains": ["beardbrand.com", "deathwishcoffee.com"],
  "targetPersona": "payments_bnpl_sales"
}
```

### Security & Compliance

- Queries strictly public storefront HTML, public `/policies/*` routes, and Shopify's public `/products.json` / `/collections/all/products.json` endpoints — no login bypass, no checkout tampering, no personal data scraping.
- Full 128-bit IPv6 + IPv4 SSRF protection blocks loopback, RFC1918, link-local, metadata, IPv4-compatible (`::/96`), NAT64 (`64:ff9b::/96`), 6to4 (`2002::/16`), Teredo (`2001::/32`), ULA (`fc00::/7`), and site-local (`fec0::/10`) ranges across every redirect hop.
- DNS-pinned native HTTP/HTTPS requests eliminate DNS rebinding TOCTOU races and enforce shared per-request deadlines and strict stream byte caps.

# Actor input Schema

## `domains` (type: `array`):

List of Shopify or DTC storefront domains or URLs (for example, 'allbirds.com' or 'https://bombas.com').

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

Optional Apify Dataset ID or named dataset (for example, 'username~my-leads') to chain domains from Google Maps, Store Leads, or Ad Library scrapers. Directory/social URLs are automatically filtered out.

## `targetPersona` (type: `string`):

Tailors the 0-100 opportunity score and cold outreach hooks to your target agency or e-commerce SaaS ICP.

## `includeCatalogAudit` (type: `boolean`):

Fetches up to 50 public products on Shopify stores to calculate average SKU price, out-of-stock ratio, missing image alt text, thin descriptions, and $0 variant anomalies.

## `includePolicies` (type: `boolean`):

Probes public shipping and refund policy pages to extract free-shipping thresholds, return window days, restocking fees, international shipping, and carrier mentions.

## `maxDomains` (type: `integer`):

Upper limit on the number of unique store domains to enrich in a single run.

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

Maximum number of store domains enriched in parallel.

## `requestTimeoutMs` (type: `integer`):

Per-request HTTP timeout in milliseconds before failing over cleanly.

## Actor input object example

```json
{
  "domains": [
    "allbirds.com",
    "deathwishcoffee.com",
    "beardbrand.com"
  ],
  "targetPersona": "general_dtc",
  "includeCatalogAudit": true,
  "includePolicies": true,
  "maxDomains": 500,
  "maxConcurrency": 5,
  "requestTimeoutMs": 10000
}
```

# Actor output Schema

## `resultsDatasetUrl` (type: `string`):

URL to the default Apify dataset containing one structured enrichment record per store domain.

# 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 = {
    "domains": [
        "allbirds.com",
        "deathwishcoffee.com",
        "beardbrand.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("signalcraft-labs/shopify-dtc-revenue-leak-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 = { "domains": [
        "allbirds.com",
        "deathwishcoffee.com",
        "beardbrand.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("signalcraft-labs/shopify-dtc-revenue-leak-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 '{
  "domains": [
    "allbirds.com",
    "deathwishcoffee.com",
    "beardbrand.com"
  ]
}' |
apify call signalcraft-labs/shopify-dtc-revenue-leak-enricher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,signalcraft-labs/shopify-dtc-revenue-leak-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/bC5cT7VjI1GXeq9WT/builds/lNOaHtlUVDSwqfihh/openapi.json
