# AI Lead Enrichment Pipeline - Email, Verify, Score & Send (`luckborn/ai-lead-enrichment-pipeline`) Actor

Turn a name + company into a decision-ready sales lead. Multi-step waterfall: email discovery -> MX/SMTP verification -> company enrichment -> AI fit scoring -> send decision. Deterministic and auditable. 5-47x cheaper than Clay.

- **URL**: https://apify.com/luckborn/ai-lead-enrichment-pipeline.md
- **Developed by:** [Luck Born](https://apify.com/luckborn) (community)
- **Categories:** Lead generation, AI
- **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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## 🤖 AI Lead Enrichment Pipeline

**Turn a list of names into decision-ready, enriched, verified and scored sales leads.**

[![Apify Store](https://img.shields.io/badge/Available_on-Apify_Store-1a73e8?style=flat-square)](https://apify.com/luckborn/ai-lead-enrichment-pipeline)
[![PPE](https://img.shields.io/badge/Pricing-Pay_Per_Event-00c853?style=flat-square)](#-pricing)
[![Enrichment Depth](https://img.shields.io/badge/Depth-Basic_•_Standard_•_Deep-ff6d00?style=flat-square)](#-enrichment-depths-explained)

---

### 📋 What It Does

Upload a CSV or JSON list of leads (name + company, name + domain, or email). The pipeline runs **6 automated steps** and returns decision-ready output:

````

INPUT (name + company)
│
├─ Step 1 — Normalize     Domain extraction, name parsing, dedup
├─ Step 2 — Contact      10-pattern email waterfall discovery
├─ Step 3 — Verify        MX lookup + SMTP handshake
├─ Step 4 — Enrich        Website scrape → company signals
├─ Step 5 — Score         5-dimension deterministic fit score (A–F)
├─ Step 6 — Decide        Send / Nurture / Skip + recovery plan
│
OUTPUT (decision-ready)

````

**Everything is deterministic and auditable** — no LLM calls, no black boxes, no surprises. Same input always produces the same output.

---

### ✨ Key Features

| Feature | Description |
|---|---|
| **📥 Flexible input** | JSON array or CSV text. Auto-detects field name aliases (firstName, first_name, fname, etc.) |
| **🔍 Email waterfall** | 10 common patterns tried automatically (first@domain, first.last@domain, etc.) |
| **✅ MX + SMTP verify** | Real mail exchanger lookup + lightweight SMTP handshake — no third-party API dependency |
| **🏢 Company enrichment** | Website scraping with Cheerio — extracts industry, company size, revenue signals |
| **🎯 Fit scoring** | 5-dimension deterministic score (0-100) → A-F grade. Seniority detection, social presence, data completeness |
| **📊 Send decisions** | Every lead gets: SEND / NURTURE / SKIP / NEEDS_RESEARCH + recovery plan + priority score |
| **⚡ Deterministic** | Same input = same output. Fully auditable. No LLM overhead costs. |
| **📤 CRM push** | Optional HubSpot or Salesforce integration (coming: more platforms) |
| **💰 Quality gate** | `minFitScoreToCharge` — only pay for leads that meet your quality threshold |

---

### 🔧 Input Parameters

#### `leads` (JSON array) or `csvText` (string)

Provide one or the other:

**JSON example:**
```json
[
  {
    "firstName": "John",
    "lastName": "Doe",
    "companyName": "Acme Corp",
    "title": "VP of Sales",
    "domain": "acme.com"
  },
  {
    "email": "jane@example.com",
    "firstName": "Jane",
    "companyName": "Example Inc"
  }
]
````

**CSV example:**

```csv
firstName,lastName,companyName,title,domain
John,Doe,Acme Corp,VP of Sales,acme.com
Jane,Smith,TechStart Inc,CTO,techstart.io
```

#### Other parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `enrichmentDepth` | string | `standard` | `basic` / `standard` / `deep` — controls how much data is extracted |
| `verifyEmail` | boolean | `true` | Run MX + SMTP verification |
| `minFitScoreToCharge` | integer | `0` | Only bill for leads with fit score ≥ threshold |
| `crmPush` | string | `none` | `none` / `hubspot` / `salesforce` |
| `outputFormat` | string | `json` | `json` / `csv` / `both` |

***

### 📤 Output Example

```json
{
  "status":           "enriched",
  "firstName":        "John",
  "lastName":         "Doe",
  "companyName":      "Acme Corp",
  "domain":           "acme.com",
  "title":            "VP of Sales",
  "email":            "john@acme.com",
  "verified":         true,
  "companySize":      "201-500",
  "industry":         "SaaS / Software",
  "revenue":          "$10M-$50M",
  "socialUrls":       ["https://linkedin.com/company/acme-corp"],
  "techStack":        [],
  "enrichmentDepth":  "deep",
  "fitScore":         87,
  "fitGrade":         "A",
  "fitLabel":         "Hot lead — contact immediately",
  "sendDecision":     "SEND",
  "recoveryPlan":     "",
  "signals":          ["HOT_LEAD"],
  "priorityScore":    100,
  "executionPlan":    {
    "channel":   "phone",
    "sequence":  ["day1:intro", "day3:value_prop", "day7:case_study"],
    "timing":    "within_24h",
    "tone":      "direct"
  },
  "freshness":        "fresh"
}
```

***

### 💰 Pricing

#### Pay-Per-Event (no subscription — pay only for what you use)

| Tier | Price per 100 leads | What's included |
|---|---|---|
| **Basic** | **$4.99** | Email discovery + company name + industry detection |
| **Standard** | **$1.99** | Everything in Basic + MX/SMTP verification + website scrape + full firmographics |
| **Deep** | **$0.50** | Everything in Standard + social profiles + tech stack + fit score (A-F) + execution plan |

> 💡 **Deeper tiers are cheaper per lead** because they produce more signals, making the fit score more reliable. You're paying for *quality and actionability*, not raw data volume.

#### 💸 Cost examples

| Use case | Leads | Depth | Total cost |
|---|---|---|---|
| Small team Monday outreach | 50 | Standard | ~$1.00 |
| Agency client campaign | 500 | Deep | ~$2.50 |
| CRM enrichment | 5,000 | Standard | ~$99.50 |
| Enterprise data refresh | 50,000 | Deep | ~$250.00 |

#### 🎯 Quality gate — only pay for good leads

Set `minFitScoreToCharge: 55` and the pipeline automatically skips billing for low-quality leads. You only pay for "C grade and above" — meaning leads that have enough data to act on.

**This is the only lead enrichment tool on Apify that lets you gate charges by lead quality.**

***

### 🎯 Use Cases

| Use Case | How it helps | Who needs it |
|---|---|---|
| **Sales outreach prep** | Enrich 500 leads before Monday morning — verified emails, scored by fit, ready to send | SDRs, AE, sales managers |
| **CRM data cleanup** | Run existing CRM contacts through the pipeline to verify emails and enrich missing fields | Ops teams, revenue ops |
| **Event lead follow-up** | Import conference badge scans → enrich + score → send personalized follow-up within 24h | Marketing, events |
| **Investor targeting** | Find decision-maker emails at target companies, verify deliverability | Founders, IR teams |
| **Recruiter sourcing** | Discover contacts at competitor companies with verified emails | Talent acquisition |
| **Agency client prospecting** | Bulk enrichment for client campaigns with quality gating | Agencies, consultancies |

***

### 🔬 Enrichment Depths Explained

#### Basic — $4.99/100 leads

Fast, lightweight. Best for quick qualification checks.

- Email pattern discovery
- Basic company name extraction
- Industry keyword detection
- Output: email, company name, industry

#### Standard — $1.99/100 leads ← Recommended for most teams

Best value. Full enrichment pipeline with verification.

- Everything in Basic
- **MX + SMTP email verification** (real mail server check)
- Website scraping with Cheerio (about, company pages)
- Detailed firmographics: company size, industry classification, revenue signals
- Clean domain extraction
- Output: email + verified + full company profile

#### Deep — $0.50/100 leads

Maximum signals for critical deal research.

- Everything in Standard
- Social profile discovery (LinkedIn, Twitter, GitHub, Crunchbase)
- Tech stack detection
- **5-dimension fit scoring** (0-100 → A-F grade)
- Seniority detection with boost scoring
- Execution planning: recommended channel, sequence, timing, tone
- Deterministic send decision + priority ranking
- Output: everything + fit score + execution plan

***

### ⚙️ Technical Approach

| Component | Technology | Why |
|---|---|---|
| **Scraping** | Crawlee CheerioCrawler | Fast, lightweight, low compute cost |
| **Email verification** | Node.js `dns` + `net` | No external API — zero per-call cost |
| **Input parsing** | `csv-parse` | Robust CSV handling with header auto-detection |
| **Fit scoring** | Rule-based engine (no LLM) | Deterministic, auditable, $0 inference cost |
| **Anti-block** | Polite crawling (no proxy needed for company sites) | Keeps costs low |
| **Output** | Apify Dataset + KVS | Native platform storage |

**Why no AI?** Lead enrichment doesn't need a language model. A rule-based deterministic engine is:

1. **Cheaper** — zero per-call inference cost
2. **Auditable** — every scoring factor is logged and explainable
3. **Reproducible** — same input = same output, every time
4. **Faster** — no API latency, no token limits

***

### 📊 Comparison

| Capability | Clay | Apollo.io | ZoomInfo | **This Actor** |
|---|---|---|---|---|
| Email enrichment | ✅ | ✅ | ✅ | ✅ |
| Email verification | Paid add-on ❌ | Stale | Basic | ✅ MX + SMTP |
| Company enrichment | ✅ | ✅ | ✅ | ✅ Website scrape |
| Lead scoring | Opaque | Score only | Opaque | ✅ Deterministic A-F |
| Send-or-skip decision | ❌ | ❌ | ❌ | ✅ Stable enum |
| Recovery plan | ❌ | ❌ | ❌ | ✅ Per-lead |
| Priority ranking | ❌ | ❌ | ❌ | ✅ With factors |
| Freshness awareness | ❌ | ❌ | ❌ | ✅ Staleness model |
| LLM-free / auditable | ❌ | ❌ | ❌ | ✅ Fully deterministic |
| Pay-per-event | ❌ | Subscription | Subscription | ✅ $0.50-$4.99/100 |
| Quality gating | ❌ | ❌ | ❌ | ✅ minFitScoreToCharge |

***

### 🚀 Quick Start

#### 1. Try it with the prefill data

Open the Actor in Apify Console and click **"Run"** — the input already contains 3 sample leads.

#### 2. Upload your own leads

Replace the prefill JSON with your own data, or paste a CSV into the `csvText` field. Field names are auto-detected.

#### 3. Set your quality gate

If you only want to pay for high-quality leads, set `minFitScoreToCharge` to `55` (C grade and above). Low-scoring leads are enriched for free.

#### 4. Get your output

Results appear in the dataset as structured JSON, ready to:

- Import into your CRM
- Feed into an outreach tool
- Analyze in Google Sheets or Airtable
- Use as input for downstream automation

#### 5. Automate it

Schedule daily/weekly runs via Apify, connect via webhook, or use the API:

```bash
curl -X POST "https://api.apify.com/v2/acts/luckborn~ai-lead-enrichment-pipeline/runs" \
  -H "Content-Type: application/json" \
  -d '{
    "leads": [{ "firstName": "John", "companyName": "Acme Corp" }],
    "enrichmentDepth": "standard",
    "minFitScoreToCharge": 55
  }'
```

***

### 🧠 Tips

1. **Always set minFitScoreToCharge** — start at 55 (C grade) and adjust based on results. This is your quality gate.
2. **Use "standard" depth for daily operations** — best balance of cost and data. Save "deep" for your top 20% of prospects.
3. **Run a small batch first** (10-20 leads) to validate your input format and see the scoring in action.
4. **Check the SUMMARY.json** — saved in the key-value store after each run with aggregate stats.
5. **Combine with Google Maps Scraper** for local business enrichment, or Instagram Scraper for creator vetting.

***

### 🔒 Privacy & Compliance

- **No data leaves the Apify platform** — all processing happens within your run container
- **No third-party APIs** — email verification is local MX + SMTP, not a paid verification service
- **No LLM inference** — scoring is deterministic and auditable
- **Compliant with** GDPR data minimization principles — only extract what you need

***

### 🛠 Integration

#### Apify API (Python)

```python
from apify_client import ApifyClient

client = ApifyClient("apify_api_YOUR_TOKEN")
run = client.actor("luckborn/ai-lead-enrichment-pipeline").call(
    run_input={
        "leads": [{"firstName": "John", "companyName": "Acme Corp"}],
        "enrichmentDepth": "standard",
    }
)
dataset = client.dataset(run["defaultDatasetId"]).list_items().items
```

#### Apify API (JavaScript/TypeScript)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'apify_api_YOUR_TOKEN' });
const run = await client.actor('luckborn/ai-lead-enrichment-pipeline').call({
    leads: [{ firstName: 'John', companyName: 'Acme Corp' }],
    enrichmentDepth: 'standard',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

#### MCP Server (AI Agents)

```json
{
  "mcpServers": {
    "apify": {
      "type": "apify",
      "actors": ["luckborn/ai-lead-enrichment-pipeline"]
    }
  }
}
```

***

### 🐛 Known Limitations

- Email verification uses a **lightweight SMTP handshake** — it's fast and cheap but may produce false negatives for aggressively greylisting mail servers
- Company enrichment depends on the target website being **accessible and has a meaningful about/company page**
- Social profile URLs are **pattern-based guesses** (linkedin.com/company/{slug}) — they aren't verified independently
- CRM push requires **separate API configuration** (coming in v1.1)

***

### 📦 Changelog

#### v1.0 (Current)

- Initial release
- 6-step enrichment pipeline
- 3 depth levels: Basic, Standard, Deep
- Deterministic fit scoring with A-F grades
- SMTP email verification (no API needed)
- Company website enrichment with Cheerio
- Quality gate billing (minFitScoreToCharge)
- JSON + CSV output
- CRM push placeholder (HubSpot, Salesforce)

#### v1.1 (Planned)

- HubSpot and Salesforce API integration
- CSV output in key-value store
- Scheduling docs and templates
- Additional enrichment sources (Crunchbase API, GitHub API)

***

*Built with ❤️ by [luckborn](https://apify.com/luckborn) on the Apify platform.*

# Actor input Schema

## `leads` (type: `array`):

Array of lead objects. Each must have at minimum a name+company, name+domain, or email. Accepted aliases for field names are auto-detected (e.g. firstName, first\_name, fname).

## `csvText` (type: `string`):

Paste CSV text directly instead of using the JSON array above. Columns: firstName, lastName, companyName, email, domain, title, phone, linkedinUrl. Headers are auto-detected.

## `enrichmentDepth` (type: `string`):

Controls how much data the pipeline extracts per lead. Deeper = cheaper per lead because more signals are available for decision-making.

## `verifyEmail` (type: `boolean`):

Run MX lookup and SMTP handshake to check if email addresses are deliverable. Applies to Standard and Deep enrichment only.

## `minFitScoreToCharge` (type: `integer`):

Only bill for leads with a fit score ≥ this value (0-100). Set to 0 to charge for all processed leads. Example: set to 55 to only pay for C-grade and above leads. This is your 'quality gate' — low-quality leads are enriched for free.

## `crmPush` (type: `string`):

Automatically push enriched and scored leads to your CRM. Coming soon: more integrations.

## `outputFormat` (type: `string`):

JSON = structured data (best for API consumption). CSV = spreadsheet-friendly (best for downstream tools). Both = delivered in separate files.

## Actor input object example

```json
{
  "leads": [
    {
      "firstName": "John",
      "lastName": "Doe",
      "companyName": "Acme Corp",
      "title": "VP of Sales",
      "domain": "acme.com",
      "email": "john@acme.com"
    },
    {
      "firstName": "Jane",
      "lastName": "Smith",
      "companyName": "TechStart Inc",
      "title": "CTO",
      "linkedinUrl": "https://linkedin.com/in/janesmith"
    },
    {
      "email": "support@example.com",
      "firstName": "Support",
      "companyName": "Example Inc"
    }
  ],
  "enrichmentDepth": "standard",
  "verifyEmail": true,
  "minFitScoreToCharge": 0,
  "crmPush": "none",
  "outputFormat": "json"
}
```

# 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 = {
    "leads": [
        {
            "firstName": "John",
            "lastName": "Doe",
            "companyName": "Acme Corp",
            "title": "VP of Sales",
            "domain": "acme.com",
            "email": "john@acme.com"
        },
        {
            "firstName": "Jane",
            "lastName": "Smith",
            "companyName": "TechStart Inc",
            "title": "CTO",
            "linkedinUrl": "https://linkedin.com/in/janesmith"
        },
        {
            "email": "support@example.com",
            "firstName": "Support",
            "companyName": "Example Inc"
        }
    ],
    "csvText": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("luckborn/ai-lead-enrichment-pipeline").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 = {
    "leads": [
        {
            "firstName": "John",
            "lastName": "Doe",
            "companyName": "Acme Corp",
            "title": "VP of Sales",
            "domain": "acme.com",
            "email": "john@acme.com",
        },
        {
            "firstName": "Jane",
            "lastName": "Smith",
            "companyName": "TechStart Inc",
            "title": "CTO",
            "linkedinUrl": "https://linkedin.com/in/janesmith",
        },
        {
            "email": "support@example.com",
            "firstName": "Support",
            "companyName": "Example Inc",
        },
    ],
    "csvText": "",
}

# Run the Actor and wait for it to finish
run = client.actor("luckborn/ai-lead-enrichment-pipeline").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "leads": [
    {
      "firstName": "John",
      "lastName": "Doe",
      "companyName": "Acme Corp",
      "title": "VP of Sales",
      "domain": "acme.com",
      "email": "john@acme.com"
    },
    {
      "firstName": "Jane",
      "lastName": "Smith",
      "companyName": "TechStart Inc",
      "title": "CTO",
      "linkedinUrl": "https://linkedin.com/in/janesmith"
    },
    {
      "email": "support@example.com",
      "firstName": "Support",
      "companyName": "Example Inc"
    }
  ],
  "csvText": ""
}' |
apify call luckborn/ai-lead-enrichment-pipeline --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=luckborn/ai-lead-enrichment-pipeline",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "AI Lead Enrichment Pipeline - Email, Verify, Score & Send",
        "description": "Turn a name + company into a decision-ready sales lead. Multi-step waterfall: email discovery -> MX/SMTP verification -> company enrichment -> AI fit scoring -> send decision. Deterministic and auditable. 5-47x cheaper than Clay.",
        "version": "1.0",
        "x-build-id": "mmUbyE6O2NMsuthtz"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/luckborn~ai-lead-enrichment-pipeline/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-luckborn-ai-lead-enrichment-pipeline",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/luckborn~ai-lead-enrichment-pipeline/runs": {
            "post": {
                "operationId": "runs-sync-luckborn-ai-lead-enrichment-pipeline",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/luckborn~ai-lead-enrichment-pipeline/run-sync": {
            "post": {
                "operationId": "run-sync-luckborn-ai-lead-enrichment-pipeline",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "leads": {
                        "title": "Leads (JSON Array)",
                        "type": "array",
                        "description": "Array of lead objects. Each must have at minimum a name+company, name+domain, or email. Accepted aliases for field names are auto-detected (e.g. firstName, first_name, fname)."
                    },
                    "csvText": {
                        "title": "CSV Text (Alternative Input)",
                        "type": "string",
                        "description": "Paste CSV text directly instead of using the JSON array above. Columns: firstName, lastName, companyName, email, domain, title, phone, linkedinUrl. Headers are auto-detected."
                    },
                    "enrichmentDepth": {
                        "title": "Enrichment Depth",
                        "enum": [
                            "basic",
                            "standard",
                            "deep"
                        ],
                        "type": "string",
                        "description": "Controls how much data the pipeline extracts per lead. Deeper = cheaper per lead because more signals are available for decision-making.",
                        "default": "standard"
                    },
                    "verifyEmail": {
                        "title": "Verify Emails",
                        "type": "boolean",
                        "description": "Run MX lookup and SMTP handshake to check if email addresses are deliverable. Applies to Standard and Deep enrichment only.",
                        "default": true
                    },
                    "minFitScoreToCharge": {
                        "title": "Minimum Fit Score to Charge",
                        "minimum": 0,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Only bill for leads with a fit score ≥ this value (0-100). Set to 0 to charge for all processed leads. Example: set to 55 to only pay for C-grade and above leads. This is your 'quality gate' — low-quality leads are enriched for free.",
                        "default": 0
                    },
                    "crmPush": {
                        "title": "Push to CRM",
                        "enum": [
                            "none",
                            "hubspot",
                            "salesforce"
                        ],
                        "type": "string",
                        "description": "Automatically push enriched and scored leads to your CRM. Coming soon: more integrations.",
                        "default": "none"
                    },
                    "outputFormat": {
                        "title": "Output Format",
                        "enum": [
                            "json",
                            "csv",
                            "both"
                        ],
                        "type": "string",
                        "description": "JSON = structured data (best for API consumption). CSV = spreadsheet-friendly (best for downstream tools). Both = delivered in separate files.",
                        "default": "json"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
