# Lead Qualifier and Enrichment (`magicfingers/lead-qualifier`) Actor

Scrapes company websites, qualifies leads using AI, scores buying intent, and generates personalized outreach messages. Supports OpenAI and Anthropic.

- **URL**: https://apify.com/magicfingers/lead-qualifier.md
- **Developed by:** [abdulrahman alrashid](https://apify.com/magicfingers) (community)
- **Categories:** Other
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 1 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 Qualifier & Outreach Generator

Scrapes company websites, qualifies leads using AI (OpenAI or Anthropic), scores buying intent, identifies pain points, and generates personalized outreach messages.

### What it does

1. **Scrapes** each company website (homepage, about, pricing, team, blog, careers)
2. **Extracts** company name, industry, size signals, tech stack, products/services, recent activity
3. **Qualifies** each lead using your chosen LLM with your product context and ICP
4. **Generates** personalized outreach emails, icebreakers, and buying signal analysis

### Input

| Field | Type | Description |
|---|---|---|
| `companyUrls` | Array | Company website URLs to qualify |
| `yourProductDescription` | String | What you sell (used for AI qualification context) |
| `idealCustomerProfile` | String | Your ICP description |
| `llmProvider` | String | `openai` or `anthropic` |
| `llmApiKey` | String | Your LLM API key (optional — scrape-only mode without it) |
| `llmModel` | String | Model name (default: `gpt-4o-mini`) |
| `maxPagesPerCompany` | Number | Max pages to scrape per company (default: 5) |
| `generateOutreach` | Boolean | Generate outreach messages (default: true) |
| `outreachTone` | String | `Professional`, `Casual`, or `Consultative` |
| `proxyConfiguration` | Object | Proxy settings |

### Output

Each lead produces a JSON object with:

- `companyUrl` — the input URL
- `companyName` — detected company name
- `industry` — classified industry (e.g., "B2B SaaS", "FinTech")
- `estimatedSize` — employee count estimate
- `mainProducts` — list of detected products/services
- `techStack` — detected technologies (React, AWS, Stripe, etc.)
- `recentActivity` — blog posts, hiring activity, pricing changes
- `qualificationScore` — 0-100 AI score
- `qualificationReason` — why the score was given
- `buyingSignals` — detected buying intent signals
- `painPoints` — likely pain points
- `decisionMakerLikely` — who to contact
- `personalizedOutreach` — `{ subject, body }` email
- `icebreaker` — one-liner for cold outreach
- `competitorsMentioned` — competitors found on their site

### Scrape-only mode

If no LLM API key is provided, the actor still scrapes all company data and returns structured results — just without AI qualification scores or outreach messages.

### Pricing

$10.00 per 1,000 leads qualified ($0.01 per lead).

### Tech stack detection

Detects 60+ technologies across categories:
- Frontend: React, Vue, Angular, Svelte, Next.js, Nuxt, Gatsby, Tailwind, Bootstrap
- CMS: WordPress, Shopify, Webflow, Wix, Squarespace, HubSpot
- Cloud: AWS, Google Cloud, Azure, Vercel, Netlify, Cloudflare
- Payments: Stripe, PayPal
- Analytics: Google Analytics, Mixpanel, Amplitude, Segment, Hotjar, PostHog
- Chat: Intercom, Zendesk, Drift, Crisp, Freshworks
- Error tracking: Sentry, Datadog, Bugsnag, LogRocket
- Marketing: Mailchimp, Klaviyo, Marketo, Pardot, Salesforce
- Auth: Auth0, Okta, Firebase, Supabase

# Actor input Schema

## `companyUrls` (type: `array`):

List of company website URLs or LinkedIn company page URLs to qualify.
## `yourProductDescription` (type: `string`):

Describe what you sell. This context helps the AI qualify leads and write relevant outreach messages.
## `idealCustomerProfile` (type: `string`):

Describe your ideal customer. Include industry, company size, pain points, and any other qualifying criteria.
## `llmProvider` (type: `string`):

Choose the LLM provider for AI qualification and outreach generation.
## `llmApiKey` (type: `string`):

Your OpenAI or Anthropic API key. If not provided, the actor runs in scrape-only mode (returns raw company data without AI qualification).
## `llmModel` (type: `string`):

Which model to use for qualification. Defaults to gpt-4o-mini (OpenAI) or claude-3-haiku-20240307 (Anthropic).
## `maxPagesPerCompany` (type: `integer`):

Maximum number of pages to scrape per company website (homepage + subpages).
## `generateOutreach` (type: `boolean`):

Whether to generate personalized outreach messages for each qualified lead.
## `outreachTone` (type: `string`):

The tone to use for generated outreach messages.
## `maxResults` (type: `integer`):

Maximum number of companies to process. Useful for testing.
## `proxyConfiguration` (type: `object`):

Proxy settings for web scraping.

## Actor input object example

```json
{
  "companyUrls": [
    "https://www.notion.so",
    "https://www.lemlist.com"
  ],
  "yourProductDescription": "We offer an AI-powered sales engagement platform that helps B2B SaaS companies automate personalized outreach, track prospect engagement, and close deals faster.",
  "idealCustomerProfile": "B2B SaaS companies with 50-500 employees that are in a growth phase, have a sales team of 5+, and are actively hiring for sales/marketing roles.",
  "llmProvider": "openai",
  "llmModel": "gpt-4o-mini",
  "maxPagesPerCompany": 5,
  "generateOutreach": true,
  "outreachTone": "Professional",
  "maxResults": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
````

# 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 = {
    "companyUrls": [
        "https://www.notion.so",
        "https://www.lemlist.com"
    ],
    "yourProductDescription": "We offer an AI-powered sales engagement platform that helps B2B SaaS companies automate personalized outreach, track prospect engagement, and close deals faster.",
    "idealCustomerProfile": "B2B SaaS companies with 50-500 employees that are in a growth phase, have a sales team of 5+, and are actively hiring for sales/marketing roles.",
    "maxResults": 2,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("magicfingers/lead-qualifier").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 = {
    "companyUrls": [
        "https://www.notion.so",
        "https://www.lemlist.com",
    ],
    "yourProductDescription": "We offer an AI-powered sales engagement platform that helps B2B SaaS companies automate personalized outreach, track prospect engagement, and close deals faster.",
    "idealCustomerProfile": "B2B SaaS companies with 50-500 employees that are in a growth phase, have a sales team of 5+, and are actively hiring for sales/marketing roles.",
    "maxResults": 2,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("magicfingers/lead-qualifier").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 '{
  "companyUrls": [
    "https://www.notion.so",
    "https://www.lemlist.com"
  ],
  "yourProductDescription": "We offer an AI-powered sales engagement platform that helps B2B SaaS companies automate personalized outreach, track prospect engagement, and close deals faster.",
  "idealCustomerProfile": "B2B SaaS companies with 50-500 employees that are in a growth phase, have a sales team of 5+, and are actively hiring for sales/marketing roles.",
  "maxResults": 2,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call magicfingers/lead-qualifier --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Lead Qualifier and Enrichment",
        "description": "Scrapes company websites, qualifies leads using AI, scores buying intent, and generates personalized outreach messages. Supports OpenAI and Anthropic.",
        "version": "1.0",
        "x-build-id": "Y16TYqKBH6XVvpLnE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/magicfingers~lead-qualifier/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-magicfingers-lead-qualifier",
                "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/magicfingers~lead-qualifier/runs": {
            "post": {
                "operationId": "runs-sync-magicfingers-lead-qualifier",
                "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/magicfingers~lead-qualifier/run-sync": {
            "post": {
                "operationId": "run-sync-magicfingers-lead-qualifier",
                "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",
                "required": [
                    "companyUrls"
                ],
                "properties": {
                    "companyUrls": {
                        "title": "Company URLs",
                        "type": "array",
                        "description": "List of company website URLs or LinkedIn company page URLs to qualify.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "yourProductDescription": {
                        "title": "Your Product Description",
                        "type": "string",
                        "description": "Describe what you sell. This context helps the AI qualify leads and write relevant outreach messages."
                    },
                    "idealCustomerProfile": {
                        "title": "Ideal Customer Profile (ICP)",
                        "type": "string",
                        "description": "Describe your ideal customer. Include industry, company size, pain points, and any other qualifying criteria."
                    },
                    "llmProvider": {
                        "title": "LLM Provider",
                        "enum": [
                            "openai",
                            "anthropic"
                        ],
                        "type": "string",
                        "description": "Choose the LLM provider for AI qualification and outreach generation.",
                        "default": "openai"
                    },
                    "llmApiKey": {
                        "title": "LLM API Key",
                        "type": "string",
                        "description": "Your OpenAI or Anthropic API key. If not provided, the actor runs in scrape-only mode (returns raw company data without AI qualification)."
                    },
                    "llmModel": {
                        "title": "LLM Model",
                        "type": "string",
                        "description": "Which model to use for qualification. Defaults to gpt-4o-mini (OpenAI) or claude-3-haiku-20240307 (Anthropic).",
                        "default": "gpt-4o-mini"
                    },
                    "maxPagesPerCompany": {
                        "title": "Max Pages Per Company",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum number of pages to scrape per company website (homepage + subpages).",
                        "default": 5
                    },
                    "generateOutreach": {
                        "title": "Generate Outreach Messages",
                        "type": "boolean",
                        "description": "Whether to generate personalized outreach messages for each qualified lead.",
                        "default": true
                    },
                    "outreachTone": {
                        "title": "Outreach Tone",
                        "enum": [
                            "Professional",
                            "Casual",
                            "Consultative"
                        ],
                        "type": "string",
                        "description": "The tone to use for generated outreach messages.",
                        "default": "Professional"
                    },
                    "maxResults": {
                        "title": "Max Results",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of companies to process. Useful for testing.",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings for web scraping."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
