# Shopify AI Lead Generation Agent (`xiaoyu-ai/ai-shopify-lead-generation-orchestrator`) Actor

Find sales-ready Shopify leads with public contact details, lead scores, pain points, and personalized outreach drafts.

- **URL**: https://apify.com/xiaoyu-ai/ai-shopify-lead-generation-orchestrator.md
- **Developed by:** [rain win](https://apify.com/xiaoyu-ai) (community)
- **Categories:** AI, E-commerce, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Shopify AI Lead Generation Agent

Turn Shopify store URLs into scored, outreach-ready B2B leads.

This Actor is built for Shopify agencies, ecommerce growth teams, retention marketers, CRO consultants, and outbound sales teams that need more than raw store data. It scans Shopify stores, enriches them with public contact information, scores each merchant, identifies a likely sales angle, and generates a first cold email draft.

You can tune the Agent for a specific buyer profile using ICP presets such as Shopify web design agency, Klaviyo retention agency, CRO agency, Shopify app developer, or ecommerce ads agency.

### What You Get

Each Dataset item is a qualified lead with:

- Company name, website, domain, country, and niche
- Public business email, contact page, and phone when available
- Shopify theme, catalog size, app, tracking, and social signals
- Lead score from 0 to 100
- Lead priority, recommended channel, and next action
- Score breakdown for contactability, business fit, technology gap, and agency opportunity
- Plain-English score reason
- Suggested pain point
- Recommended offer angle
- Cold email subject and body

### Best Use Cases

- Shopify web design agencies looking for redesign prospects
- CRO agencies researching stores with conversion opportunities
- Klaviyo and retention agencies finding email marketing gaps
- Ecommerce growth teams building outbound lead lists
- Shopify app, migration, and implementation services

### Input Example

```json
{
  "country": "US",
  "niche": "fitness",
  "limit": 5,
  "icpPreset": "shopify_web_design_agency",
  "targetCustomer": "",
  "startUrls": [
    { "url": "https://www.gymshark.com/" },
    { "url": "https://www.allbirds.com/" },
    { "url": "https://www.brooklinen.com/" }
  ],
  "includeEmailDraft": true,
  "minLeadScore": 50
}
```

### Output Example

```json
{
  "company_name": "Example Fitness",
  "website": "https://example-fitness.com",
  "domain": "example-fitness.com",
  "country": "US",
  "category": "fitness",
  "contact_email": "hello@example-fitness.com",
  "contact_page": "https://example-fitness.com/contact",
  "phone": "+1 (555) 123-4567",
  "detected_tools": ["Shopify", "Klaviyo"],
  "icp_preset": "shopify_web_design_agency",
  "icp_label": "Shopify web design agency",
  "target_customer": "Shopify web design agency",
  "lead_score": 79,
  "lead_priority": "medium",
  "recommended_channel": "email",
  "next_action": "Review the email draft, personalize it, and send a first-touch email.",
  "contactability_score": 25,
  "business_fit_score": 20,
  "tech_gap_score": 18,
  "agency_opportunity_score": 16,
  "score_reason": "Example Fitness scored 25/25 contactability, 20/25 business fit, 18/25 technology gap, and 16/25 agency opportunity.",
  "pain_point": "The store may be missing subscription or repeat-purchase infrastructure.",
  "recommended_offer": "Shopify conversion and site improvement offer based on this signal.",
  "cold_email_subject": "Idea for Example Fitness's Shopify growth",
  "cold_email_body": "Hi Example Fitness team..."
}
```

### How It Works

The Actor orchestrates three layers:

1. Shopify store scanning for storefront and technology signals
2. Public contact extraction from the store website
3. Lead scoring and outreach generation

The `icpPreset` field changes how pain points and offer angles are framed:

```text
shopify_web_design_agency -> redesign, theme, site improvement, conversion
klaviyo_retention_agency -> lifecycle email, retention, repeat purchase
cro_agency -> conversion, navigation, merchandising, analytics
shopify_app_developer -> apps, integrations, subscriptions, automation
ecommerce_ads_agency -> paid acquisition, tracking, analytics, pixel readiness
```

If no OpenAI API key is provided, the Actor still works with deterministic rule-based scoring and email drafts. If you provide `openAiApiKey`, it can use AI-assisted scoring and copy generation.

### Important MVP Scope

This version works best when you provide Shopify store URLs in `startUrls`.

The connected Shopify child Actor is currently a scanner, not a full web-scale discovery engine. `country` and `niche` are used for scoring context and output labeling. A dedicated Shopify discovery Actor can be connected later as the first orchestration step.

### Output Format

Results are written to the default Apify Dataset, so you can export leads as CSV, JSON, JSONL, XLSX, XML, RSS, or HTML from Apify Console.

The Actor also stores a `RUN_REPORT` record in the default key-value store with orchestration metadata and output field notes.

### Compliance

This Actor is intended for public business contact discovery and sales research. Users are responsible for complying with applicable privacy, anti-spam, platform, and outreach laws.

### Verified Cloud Run

The current published Actor was verified on Apify Cloud with a five-store Shopify sample.

```text
Actor ID: N55pLPYapcIaZA2wL
Verified build: 0.1.9
Verified run ID: sSyEcElQTTgf02XfN
Verified dataset ID: 3fs7ugmBHPRTyl9rI
```

The verified run produced five Shopify leads with scoring, contact fields, offer recommendations, and cold email drafts.

### Public Child Actors

The default public child Actor IDs are:

```text
SHOPIFY_ACTOR_ID=3zzHmwKKTtDELCeXA
CONTACT_ACTOR_ID=drIYarUdw3tqWJvhW
TOOLS_ACTOR_ID=XmVuWRLMi2geX1yGp
```

# Actor input Schema

## `country` (type: `string`):

Target country or market.

## `niche` (type: `string`):

Target Shopify merchant category, such as fitness, beauty, apparel, supplements, or home goods.

## `limit` (type: `integer`):

Maximum number of final leads to return.

## `icpPreset` (type: `string`):

Choose the buyer profile that will use these leads. This tunes scoring, pain points, offer angles, and email drafts.

## `targetCustomer` (type: `string`):

Optional custom buyer profile. Leave blank to use the selected ICP preset.

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

Optional list of Shopify store URLs to scan. Use this when the Shopify child Actor is a scanner rather than a discovery Actor.

## `includeEmailDraft` (type: `boolean`):

Generate a first cold email draft for each qualified lead.

## `minLeadScore` (type: `integer`):

Only output leads with a score at or above this value.

## `shopifyActorId` (type: `string`):

Actor ID for Shopify store discovery/basic info. Defaults to SHOPIFY\_ACTOR\_ID env var.

## `contactActorId` (type: `string`):

Actor ID for contact extraction. Defaults to CONTACT\_ACTOR\_ID env var.

## `toolsActorId` (type: `string`):

Actor ID for AI tools directory context. Defaults to TOOLS\_ACTOR\_ID env var.

## `includeToolsDirectoryContext` (type: `boolean`):

Run the AI Tools Directory Actor once and include a small context summary in RUN\_REPORT. This is not per-store technology enrichment.

## `toolsDirectoryStartUrls` (type: `array`):

Directory URLs for the AI Tools Directory Actor.

## `maxToolsDirectoryItems` (type: `integer`):

Maximum AI tools directory records to fetch when context is enabled.

## `openAiApiKey` (type: `string`):

Optional. If omitted, the Actor uses deterministic rule-based scoring and email drafts.

## `maxDiscoveryMultiplier` (type: `integer`):

How many raw stores to request from discovery before filtering.

## Actor input object example

```json
{
  "country": "US",
  "niche": "fitness",
  "limit": 100,
  "icpPreset": "shopify_web_design_agency",
  "targetCustomer": "",
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "includeEmailDraft": true,
  "minLeadScore": 60,
  "includeToolsDirectoryContext": false,
  "toolsDirectoryStartUrls": [
    {
      "url": "https://aitools.fyi/"
    }
  ],
  "maxToolsDirectoryItems": 25,
  "maxDiscoveryMultiplier": 3
}
```

# Actor output Schema

## `leads` (type: `string`):

CSV/JSON-ready lead records with contact details, scores, pain points, offers, and email drafts.

## `runReport` (type: `string`):

Summary of child Actor calls, scoring mode, and output fields.

# 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://example.com"
        }
    ],
    "toolsDirectoryStartUrls": [
        {
            "url": "https://aitools.fyi/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("xiaoyu-ai/ai-shopify-lead-generation-orchestrator").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://example.com" }],
    "toolsDirectoryStartUrls": [{ "url": "https://aitools.fyi/" }],
}

# Run the Actor and wait for it to finish
run = client.actor("xiaoyu-ai/ai-shopify-lead-generation-orchestrator").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://example.com"
    }
  ],
  "toolsDirectoryStartUrls": [
    {
      "url": "https://aitools.fyi/"
    }
  ]
}' |
apify call xiaoyu-ai/ai-shopify-lead-generation-orchestrator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xiaoyu-ai/ai-shopify-lead-generation-orchestrator"
        }
    }
}

```

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/N55pLPYapcIaZA2wL/builds/DTa8g0QvGhZCI8PE3/openapi.json
