# Shopify Store Auditor: Ads, Klaviyo & Cold-Email Hooks (`bbird923/shopify-outreach-audit-engine`) Actor

Audit Shopify stores at scale for Meta/TikTok/Google Web Pixels vs. Klaviyo/SMS gaps, SKU median price, out-of-stock %, DNS DMARC deliverability, AI-bot blocks, and verified emails. Outputs Clay-ready flat columns, 0-100 ICP score & zero-hallucination cold-email hooks.

- **URL**: https://apify.com/bbird923/shopify-outreach-audit-engine.md
- **Developed by:** [bbird](https://apify.com/bbird923) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 store audited

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/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 Revenue-Leak & Outreach Auditor (Clay, n8n & MCP Ready)

Turn any list of Shopify store domains into **qualified agency leads with deterministic, fact-backed cold-email hooks** — in seconds, with zero headless browsers and zero LLM hallucinations.

Built specifically for **Klaviyo / Email-SMS retention agencies, CRO studios, paid-media teams, SEO/GEO agencies, Clay GTM engineers, n8n automations, and AI agents (MCP)**.

***

### Why Agencies Use This Instead of Generic Tech-Stack Checkers or Claygent

| Feature | Generic App Checkers | AI Web Crawlers (e.g. Claygent) | **Shopify Revenue-Leak & Outreach Auditor** |
| :--- | :--- | :--- | :--- |
| **Output** | Raw list of script names | Unstructured text, prone to hallucination | **Flat CRM-ready columns + ICP Score (0–100) + Fact-Backed Cold-Email Hook** |
| **Paid-Ads vs. Retention Gap** | Manual filtering required | Inconsistent detection | **Automatic leak flags** (e.g. `PAID_ADS_NO_EMAIL_RETENTION`, `PAID_ADS_NO_SMS_RETENTION`) |
| **Catalog & Stock Health** | Usually missing | Expensive to crawl | **Reads `/products.json`** for SKU count, median price, and **Out-of-Stock %** |
| **Email Deliverability (DMARC)** | Missing | Missing | **Live DNS MX / SPF / DMARC audit** (catches missing DMARC inbox risk) |
| **AI Search (GEO) Readiness** | Missing | Missing | **Checks `robots.txt` AI-bot blocks** (`GPTBot`, `ClaudeBot`, `PerplexityBot`) & `/llms.txt` |
| **Cost per 1,000 Stores** | $3–$10 | $30–$100+ (LLM tokens + credits) | **~$5.00** (transparent Pay-Per-Event, zero proxy overhead) |

***

### What It Audits on Every Storefront

1. **Verified Shopify & Shopify Plus Detection** — Combines HTTP headers, storefront HTML fingerprints, theme metadata, `myshopify.com` domain, and `/products.json` verification.
2. **Catalog & Revenue-Health Telemetry** — Samples up to 250 public SKUs via `/products.json` to calculate SKU count, variant count, min/max/average/median price, currency, **out-of-stock ratio (%)**, and catalog freshness (`daysSinceLastUpdate`).
3. **90+ E-commerce Tech Stack & Ad Pixel Signatures**:
   - **Ad Pixels (with Pixel ID extraction):** Meta Pixel, TikTok Pixel, Google Ads, Pinterest Tag, Snap Pixel, Microsoft UET, Reddit Pixel, AppLovin, LinkedIn, X/Twitter.
   - **Email & SMS Retention:** Klaviyo, Omnisend, Mailchimp, Sendlane, Drip, Brevo, Attentive, Postscript, Yotpo SMSBump, Recart, Retention.com, etc.
   - **CRO, Reviews, Loyalty & Subscriptions:** Yotpo, Judge.me, Loox, Okendo, Stamped, Junip, Privy, OptiMonk, Recharge, Skio, Loop, Smile.io, LoyaltyLion, Rebuy, Gorgias, Zendesk, Triple Whale, Northbeam, Klarna, Afterpay, Shop Pay.
4. **PDP Schema, CRO & AI Search (GEO) Audit** — Automatically inspects a high-value in-stock product page for `Product` / `AggregateRating` JSON-LD schema, checks email capture forms & free-shipping bars, parses `robots.txt` for blocked AI crawlers, and checks `/llms.txt`.
5. **Public Contact & DNS Deliverability Verification** — Extracts public business emails (with automatic `/pages/contact` fallback), social profiles (Instagram, TikTok, Facebook, LinkedIn, YouTube, X), and verifies **DNS MX, SPF, DMARC policy**, and email provider (Google Workspace / Microsoft 365).
6. **Multi-Persona ICP Scoring & Deterministic Outreach Hook** — Select your `agencyPersona` (`klaviyo_retention`, `cro_conversion`, `paid_media`, `seo_geo`, or `general`) to generate a 0–100 score, priority tier (`A - Hot Prospect` / `B - Warm Prospect` / `C - Low Priority`), and a zero-hallucination `outreachHook` ready to map directly into `{{outreachHook}}` in Instantly, Smartlead, HubSpot, or Clay.

***

### Example Input

```json
{
  "domains": [
    "allbirds.com",
    "kyliecosmetics.com",
    "chubbiesshorts.com"
  ],
  "agencyPersona": "klaviyo_retention",
  "onlyShopifyStores": false,
  "minIcpScore": 0,
  "checkProductPage": true,
  "checkContactPage": true,
  "checkDnsEmailAuth": true,
  "checkAiReadiness": true
}
```

### Example Output (Flat, Clay & CSV Ready)

```json
{
  "domain": "examplebrand.com",
  "finalUrl": "https://examplebrand.com/",
  "status": "ok",
  "isShopify": true,
  "shopifyConfidence": "high",
  "agencyPersona": "klaviyo_retention",
  "icpScore": 86,
  "icpTier": "A - Hot Prospect",
  "leakFlagsCount": 4,
  "leakFlags": [
    "PAID_ADS_NO_EMAIL_RETENTION",
    "PAID_ADS_NO_SMS_RETENTION",
    "WEAK_OR_MISSING_DMARC_DELIVERABILITY",
    "HIGH_OUT_OF_STOCK_RATE"
  ],
  "recommendedPitchAngle": "Klaviyo lifecycle flows for paid traffic + SMS cart-abandonment recovery",
  "outreachHook": "Noticed Example Brand (142 products, median $68.00) is running Meta Pixel & TikTok Pixel without a dedicated email retention platform like Klaviyo detected; no SMS retention channel detected — usually a quick win for Klaviyo lifecycle flows for paid traffic + SMS cart-abandonment recovery without increasing ad spend.",
  "sampledProductCount": 142,
  "currency": "USD",
  "medianPrice": 68.0,
  "outOfStockRatioPct": 18.3,
  "adPixels": ["Meta Pixel", "TikTok Pixel"],
  "metaPixelIds": ["123456789012345"],
  "emailPlatforms": [],
  "smsPlatforms": [],
  "reviewApps": ["Judge.me"],
  "primaryEmail": "hello@examplebrand.com",
  "emailProvider": "Google Workspace",
  "emailDomainHasMx": true,
  "hasSpf": true,
  "hasDmarc": false,
  "instagramUrl": "https://instagram.com/examplebrand"
}
```

***

### Transparent Pay-Per-Event Pricing

- **`store-audited`** — Charged **only when a valid storefront audit record is delivered** to your dataset.
- Unreachable domains and filtered-out non-Shopify sites (when `onlyShopifyStores: true`) are **not charged**.
- Fully respects Apify's `maxTotalChargeUsd` budget limit and stops gracefully the moment your spending cap is reached.

***

### Native Integrations: Clay, n8n & MCP (AI Agents)

#### Clay

1. Add the **Apify** enrichment column in Clay.
2. Select this Actor and map your `Website Domain` column to `domains`.
3. Map `icpScore`, `icpTier`, `leakFlags`, `outreachHook`, and `primaryEmail` straight into columns — all fields are single-level flat JSON.

#### n8n

Import the ready-made workflow from [`templates/n8n-shopify-outreach-workflow.json`](./templates/n8n-shopify-outreach-workflow.json), add your `APIFY_API_TOKEN`, and connect the final node to Google Sheets, HubSpot, Instantly, or Smartlead.

#### Model Context Protocol (MCP)

Use this Actor directly inside Claude Desktop, Cursor, or autonomous AI agents via Apify's official MCP server (`https://mcp.apify.com`) to let agents qualify Shopify prospects on demand.

***

### Local Development & Testing

```bash
python -m unittest discover -s tests -v
```

To simulate Pay-Per-Event billing locally:

```bash
ACTOR_TEST_PAY_PER_EVENT=true python -m src
```

### Legal & Ethical Compliance

This Actor strictly inspects publicly accessible storefront HTML, standard public Shopify endpoints (`/products.json`, `/robots.txt`, `/llms.txt`), and public DNS records (MX/TXT/DMARC). It does not bypass authentication, paywalls, or private accounts. Always ensure outbound email campaigns comply with applicable regulations (CAN-SPAM, GDPR, PECR).

# Actor input Schema

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

List of store domains or URLs to audit (e.g. 'allbirds.com' or 'https://gymshark.com'). Duplicates are automatically removed.

## `startUrls` (type: `array`):

Optional standard Apify URL list (useful when chaining output from Google Maps or Search Actors).

## `agencyPersona` (type: `string`):

Tailors the 0–100 ICP score, priority tier, and cold-email outreach hook to the exact services your agency sells.

## `onlyShopifyStores` (type: `boolean`):

When enabled, non-Shopify websites are excluded from the output dataset and are not charged.

## `minIcpScore` (type: `integer`):

Only push leads scoring at or above this threshold (e.g. set 75 to only output 'A - Hot Prospect' stores).

## `checkProductPage` (type: `boolean`):

Fetches one high-value in-stock product page to detect Product/AggregateRating JSON-LD schema and review widgets.

## `checkContactPage` (type: `boolean`):

If no public business email is found on the homepage, automatically checks the store's contact page.

## `checkDnsEmailAuth` (type: `boolean`):

Performs fast DNS lookups to verify email MX validity, detect email providers (Google Workspace/M365), and flag missing/weak DMARC records.

## `checkAiReadiness` (type: `boolean`):

Checks robots.txt for blocked AI search crawlers (GPTBot, ClaudeBot, PerplexityBot) and verifies /llms.txt presence.

## `maxProductsSample` (type: `integer`):

Number of products sampled from Shopify's public /products.json endpoint to compute AOV, median price, and out-of-stock rate.

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

Number of stores audited in parallel. Higher values finish faster on large batches.

## `requestTimeoutSecs` (type: `integer`):

Maximum seconds to wait for each storefront HTTP response.

## `maxStores` (type: `integer`):

Safety cap on the maximum number of unique domains processed in a single run.

## Actor input object example

```json
{
  "domains": [
    "allbirds.com",
    "brooklinen.com",
    "colourpop.com"
  ],
  "agencyPersona": "klaviyo_retention",
  "onlyShopifyStores": false,
  "minIcpScore": 0,
  "checkProductPage": true,
  "checkContactPage": true,
  "checkDnsEmailAuth": true,
  "checkAiReadiness": true,
  "maxProductsSample": 250,
  "maxConcurrency": 12,
  "requestTimeoutSecs": 15,
  "maxStores": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (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 = {
    "domains": [
        "allbirds.com",
        "brooklinen.com",
        "colourpop.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bbird923/shopify-outreach-audit-engine").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",
        "brooklinen.com",
        "colourpop.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bbird923/shopify-outreach-audit-engine").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",
    "brooklinen.com",
    "colourpop.com"
  ]
}' |
apify call bbird923/shopify-outreach-audit-engine --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bbird923/shopify-outreach-audit-engine"
        }
    }
}
```

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/wGLKhQrVNsuoYzyc1/builds/Q52sWWBnByJdUWwNr/openapi.json
