# Shopify Catalog, Inventory & B2B Store Lead Enricher (`judicial_adventure/shopify-catalog-and-b2b-lead-enricher`) Actor

High-speed HTTP Shopify product catalog & variant inventory scraper plus B2B store lead & tech-stack enricher (emails, socials, installed apps, pixels, themes). MCP-ready for AI agents with Pay-Per-Event (PPE) pricing.

- **URL**: https://apify.com/judicial_adventure/shopify-catalog-and-b2b-lead-enricher.md
- **Developed by:** [nevil ingutu](https://apify.com/judicial_adventure) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 shopify product scrapeds

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

## Shopify Catalog, Real-Time Inventory & B2B Store Lead Enricher

Extract complete **Shopify product catalogs**, **real-time SKU variant inventory**, **pricing & discount data**, and **B2B merchant intelligence** (verified business emails, phone numbers, social media profiles, active Shopify theme, and 14+ installed app/pixel signatures) at lightning speed—**without headless browser overhead**.

Built on **Apify SDK v3** and `got-scraping` with **Pay-Per-Event (PPE)** billing and **Model Context Protocol (`mcp.apify.com`)** readiness for autonomous AI agents.

***

### Why Use This Shopify Scraper & B2B Enricher?

1. **Dual-Engine Architecture (`catalog_only`, `b2b_leads_only`, or `both`):**
   - **Mode A — Fast HTTP Catalog & Real-Time Inventory Engine:** Paginates `/products.json?limit=250&page=N` and `/collections.json` over HTTP/2 with TLS fingerprint spoofing and session rotation. Memory usage stays under **128–256 MB**, running up to **20x faster** than Playwright/Puppeteer scrapers.
   - **Mode B — B2B Store Lead & Tech-Stack Enricher:** Parses the store homepage and `/pages/contact` & `/pages/about-us` to extract verified business contact emails, phone numbers, social media links, active `Shopify.theme` metadata, `Shopify.currency` / `Shopify.country`, and 14+ tech-stack signatures.
2. **100% Transparent Pay-Per-Event (PPE) Pricing:**
   - **Zero Charge for Failed/Non-Shopify URLs:** If a target domain is not a valid Shopify store, returns `404`/`403`, or yields `0` products, **you pay $0** for data events.
   - **Instant Budget Guard (`eventChargeLimitReached`):** Respects your `maxTotalChargeUsd` budget down to the single item and exits gracefully the moment your spending cap is reached.
3. **MCP-Ready for AI Agents (`mcp.apify.com`):**
   - Self-documenting JSON Schema with pre-filled defaults allows LLM agents (Claude Desktop, Cursor, LangChain, CrewAI, OpenAI) to invoke this Actor zero-shot for e-commerce price intelligence, stock monitoring, and B2B lead generation.

***

### Detected Apps, Marketing Pixels & Tech Stack

The B2B Enricher automatically inspects storefront scripts and DOM signatures for:

| Category | Detected Technologies |
| :--- | :--- |
| **Email & SMS Marketing** | Klaviyo, Mailchimp, Privy, Attentive |
| **Ad Pixels & Attribution** | Meta Pixel (Facebook), TikTok Pixel, Google Tag Manager (GTM), TripleWhale |
| **Customer Support & CX** | Gorgias, Zendesk |
| **Reviews & UGC** | Yotpo, Judge.me, Loox |
| **Subscriptions & Retention** | Recharge |
| **Storefront Core** | Active `Shopify.theme` name & ID, ISO Currency (`Shopify.currency`), Country (`Shopify.country`) |

***

### Transparent Pay-Per-Event (PPE) Pricing Model

| Event Name | Trigger Condition | Zero-Charge Protection |
| :--- | :--- | :--- |
| `apify-actor-start` | Triggered once when the Actor container initializes. | One-time startup event. |
| `product-scraped` | Charged per normalized product record pushed to the default dataset. | **Never billed** for non-Shopify URLs, 404/403 responses, or filtered out-of-stock products when `inStockOnly: true`. |
| `store-lead-enriched` | Charged per B2B store profile pushed to the default dataset. | **Only billed** when at least **1 business email, social media link, or installed app/pixel signature** is extracted. |

***

### Input Configuration

Works out-of-the-box with **One-Click Run** defaults (`https://allbirds.com`, `https://gymshark.com`, `maxItems: 25`).

```json
{
  "startUrls": [
    { "url": "https://allbirds.com" },
    { "url": "https://gymshark.com" }
  ],
  "mode": "both",
  "maxItems": 25,
  "maxProductsPerStore": 250,
  "inStockOnly": false,
  "includeCollections": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

***

### Output Dataset Examples

#### 1. B2B Store Lead Record (`recordType: "b2b_store_lead"`)

```json
{
  "recordType": "b2b_store_lead",
  "storeDomain": "allbirds.com",
  "title": "Allbirds: Comfortable, Sustainable Shoes & Apparel",
  "productUrl": "https://www.allbirds.com",
  "themeName": "Allbirds Production Theme",
  "themeId": 142981234,
  "currency": "USD",
  "countryCode": "US",
  "installedAppsAndPixels": [
    "Klaviyo",
    "Meta Pixel",
    "TikTok Pixel",
    "Google Tag Manager",
    "Yotpo"
  ],
  "emails": [
    "help@allbirds.com"
  ],
  "phoneNumbers": [
    "1-888-963-8944"
  ],
  "socialLinks": {
    "instagram": "https://www.instagram.com/allbirds",
    "tiktok": "https://www.tiktok.com/@allbirds",
    "facebook": "https://www.facebook.com/weareallbirds",
    "twitter": "https://twitter.com/allbirds",
    "youtube": "https://www.youtube.com/c/allbirds",
    "pinterest": "https://www.pinterest.com/weareallbirds"
  },
  "collectionsCount": 42,
  "scrapedAt": "2026-11-15T14:20:00.000Z"
}
```

#### 2. Normalized Product & Variant Inventory Record (`recordType: "product"`)

```json
{
  "recordType": "product",
  "storeDomain": "allbirds.com",
  "productId": 7891234567890,
  "title": "Men's Tree Runners - Jet Black (Black Sole)",
  "handle": "mens-tree-runners-jet-black",
  "productUrl": "https://www.allbirds.com/products/mens-tree-runners-jet-black",
  "vendor": "Allbirds",
  "productType": "Shoes",
  "tags": ["mens", "running", "tree"],
  "publishedAt": "2025-02-10T09:00:00-08:00",
  "updatedAt": "2026-11-14T18:30:00-08:00",
  "priceMin": 98,
  "priceMax": 98,
  "compareAtPrice": 110,
  "currency": "USD",
  "availableInStock": true,
  "totalVariants": 8,
  "variants": [
    {
      "variantId": 43210987654321,
      "sku": "TR1MJBK080",
      "title": "8",
      "price": 98,
      "compareAtPrice": 110,
      "available": true,
      "option1": "8",
      "option2": null,
      "option3": null,
      "grams": 450,
      "requiresShipping": true,
      "taxable": true
    }
  ],
  "images": [
    "https://cdn.shopify.com/s/files/1/1104/4168/products/TR1MJBK_SHOE_ANGLE_GLOBAL_MENS_TREE_RUNNER_JET_BLACK_BLACK.png"
  ],
  "scrapedAt": "2026-11-15T14:20:01.000Z"
}
```

***

### Using with AI Agents via Apify MCP Server (`mcp.apify.com`)

Add this Actor to your AI agent's toolset via `https://mcp.apify.com` to answer real-time queries like:

- *"Check if Allbirds has Men's Tree Runners in stock and compare their current min/max prices."*
- *"Enrich these 50 Shopify brands with their Klaviyo/Meta Pixel tech stack, active theme name, and support emails."*

***

### Local Development & Pay-Per-Event Verification

```bash
npm install
npm run build
npm run test:ppe
```

# Actor input Schema

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

List of target Shopify store URLs or domains to process (e.g., https://allbirds.com, https://gymshark.com). Supports full URLs or bare domains. Non-Shopify stores or unreachable domains are safely skipped with zero PPE event charges.

## `mode` (type: `string`):

Select which data pipelines to run: 'both' runs the B2B store lead & tech-stack enricher and the product catalog scraper; 'catalog_only' extracts only product and variant inventory records; 'b2b_leads_only' extracts only store contact details, social links, theme info, and installed apps/pixels.

## `maxItems` (type: `integer`):

Maximum total number of product records to scrape across the run. Defaults to 25 so free-tier users and AI agents can test in under 10 seconds. Set to 0 to rely solely on maxProductsPerStore.

## `maxProductsPerStore` (type: `integer`):

Maximum number of products to paginate and extract per Shopify store via /products.json?limit=250\&page=N. Set to 0 for unlimited (scrapes the entire store catalog).

## `inStockOnly` (type: `boolean`):

When enabled, filters out out-of-stock products and only outputs (and charges for) products where at least one variant is currently available in stock.

## `includeCollections` (type: `boolean`):

When enabled, fetches /collections.json alongside product catalog pagination to enrich store collection counts and collection handles.

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

Apify Proxy configuration with automatic Datacenter/Residential fallback to prevent rate limiting (HTTP 429) or IP blocks on large Shopify catalogs.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://allbirds.com"
    },
    {
      "url": "https://gymshark.com"
    }
  ],
  "mode": "both",
  "maxItems": 25,
  "maxProductsPerStore": 250,
  "inStockOnly": false,
  "includeCollections": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `catalogAndLeadsDataset` (type: `string`):

Unified dataset of scraped Shopify products, variants, and B2B store lead profiles.

# 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 = {
    "startUrls": [
        {
            "url": "https://allbirds.com"
        },
        {
            "url": "https://gymshark.com"
        }
    ],
    "mode": "both",
    "maxItems": 25,
    "maxProductsPerStore": 250,
    "inStockOnly": false,
    "includeCollections": true,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("judicial_adventure/shopify-catalog-and-b2b-lead-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 = {
    "startUrls": [
        { "url": "https://allbirds.com" },
        { "url": "https://gymshark.com" },
    ],
    "mode": "both",
    "maxItems": 25,
    "maxProductsPerStore": 250,
    "inStockOnly": False,
    "includeCollections": True,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("judicial_adventure/shopify-catalog-and-b2b-lead-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 '{
  "startUrls": [
    {
      "url": "https://allbirds.com"
    },
    {
      "url": "https://gymshark.com"
    }
  ],
  "mode": "both",
  "maxItems": 25,
  "maxProductsPerStore": 250,
  "inStockOnly": false,
  "includeCollections": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call judicial_adventure/shopify-catalog-and-b2b-lead-enricher --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,judicial_adventure/shopify-catalog-and-b2b-lead-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/fdNtwmaxQiW8SpaPN/builds/9SIcN8rtUr3DkwLit/openapi.json
