# Lead Detective (`cottony_variation/lead-detective`) Actor

AI-Powered B2B Lead Research & Sales Intelligence

- **URL**: https://apify.com/cottony_variation/lead-detective.md
- **Developed by:** [Manuel Fonseca](https://apify.com/cottony_variation) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $100.00 / 1,000 lead research reports

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

## Lead Detective

#### AI-Powered B2B Lead Research & Sales Intelligence

Lead Detective helps sales professionals identify potential business opportunities, understand company needs and create personalized B2B outreach messages using public web research and AI.

Instead of generating generic sales messages, Lead Detective investigates a target company, identifies potential business challenges, evaluates commercial relevance and recommends whether a lead is worth pursuing.

### Key Features

- **Company Intelligence:** Researches company activities, services, business model and public developments.
- **Pain Point Detection:** Identifies potential business challenges using available public information.
- **Lead Qualification Score:** Evaluates each lead from 0–100 based on company fit, evidence of need, commercial relevance, buying signals and research quality.
- **Source Tracking:** Identifies research sources to help users verify important findings.
- **Sales Opportunity Analysis:** Connects potential business needs with the user's product or service.
- **Personalized LinkedIn Outreach:** Generates connection requests, initial messages and follow-ups.
- **Strategic Recommendations:** Suggests whether to contact, research further or deprioritize a lead.

### How It Works

1. Provide your OpenAI API key and Tavily API key.
2. Enter the target contact and company information.
3. Describe your product or service, ideal customer and value proposition.
4. Select your preferred outreach tone and provide your call to action.
5. Run the Actor.
6. Receive a structured business intelligence report, qualification score and personalized outreach messages.

### Input Parameters

| Parameter | Description |
|---|---|
| OpenAI API Key | Your OpenAI API key |
| Tavily API Key | Your Tavily API key |
| LinkedIn URL | Target contact's LinkedIn profile URL |
| Contact Name | Full name of the target contact |
| Company Name | Target company |
| Company Website | Company's website (optional) |
| Product / Service | Your product or service |
| Ideal Customer | Description of your ideal customer |
| Value Proposition | Main value proposition |
| Outreach Tone | Professional, Friendly, Direct or Consultative |
| Call to Action | Desired next step for the prospect |

### Output

Each run generates a structured dataset containing:

- Company name and contact information
- Lead Qualification Score (0–100)
- Qualification rating and confidence level
- Positive and negative commercial signals
- Recommended next action
- Complete business intelligence report
- Identified business pain points
- Sales opportunity analysis
- LinkedIn connection request
- Initial LinkedIn message
- Follow-up message
- Research sources and URLs

### Lead Qualification System

The qualification score evaluates five dimensions:

| Dimension | Maximum Points |
|---|---:|
| Offer and company fit | 25 |
| Evidence of relevant business needs | 25 |
| Commercial relevance | 20 |
| Public business signals and buying readiness | 15 |
| Research quality and source reliability | 15 |
| **Total** | **100** |

Qualification ratings:

- **HIGH (75–100):** Strong commercial fit supported by available evidence.
- **MEDIUM (45–74):** Potential opportunity requiring further research.
- **LOW (0–44):** Weak fit or insufficient commercial evidence.

The score is an AI-assisted qualification assessment, not a prediction of purchase probability.

### API Keys and Costs

Lead Detective requires:

- An OpenAI API key for AI-powered analysis and report generation.
- A Tavily API key for public web research.

Users provide their own API keys. Any charges from OpenAI and Tavily are separate from the Apify Actor usage price.

API keys are supplied through the Actor input as secret fields.

### Important Limitations

- Lead Detective researches publicly available web information.
- It does not access private LinkedIn profiles.
- Providing a LinkedIn URL does not mean the profile has been accessed.
- It does not automatically send LinkedIn messages or contact prospects.
- Research findings depend on the availability, relevance and reliability of public sources.
- Patient reviews and customer feedback are treated as anecdotal signals, not proof of company-wide operational problems.
- Qualification scores are estimates and should be reviewed before making commercial decisions.

### Ideal Users

- B2B sales professionals
- Business development representatives
- Lead generation agencies
- Marketing agencies
- Consultants and freelancers
- SaaS founders
- Entrepreneurs and small businesses

### Recommended Workflow

1. Identify a target company.
2. Run Lead Detective to investigate its business.
3. Review the qualification score and supporting sources.
4. Verify important findings.
5. Personalize and review the suggested outreach.
6. Decide whether to contact the prospect.

**Lead Detective — Research smarter. Qualify better. Reach out with purpose.**

# Actor input Schema

## `openaiApiKey` (type: `string`):

Your personal OpenAI API key. Used to generate the business intelligence report.

## `tavilyApiKey` (type: `string`):

Your personal Tavily API key. Used to research publicly available company information.

## `linkedinUrl` (type: `string`):

Public LinkedIn profile or company page URL.

## `contactName` (type: `string`):

Name or professional role of the potential contact.

## `companyName` (type: `string`):

Name of the target company.

## `companyWebsite` (type: `string`):

Official company website, if available.

## `productService` (type: `string`):

Describe the product or service you are offering.

## `idealCustomer` (type: `string`):

Describe the type of business or customer you want to reach.

## `valueProposition` (type: `string`):

Explain the main value and benefits your offer provides.

## `outreachTone` (type: `string`):

Choose the communication style for the outreach messages.

## `callToAction` (type: `string`):

The exact next step you want the prospect to take.

## Actor input object example

```json
{
  "outreachTone": "Professional"
}
```

# Actor output Schema

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

Open the dataset to view the complete company research, business pain points, sales opportunity and outreach messages.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("cottony_variation/lead-detective").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("cottony_variation/lead-detective").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 '{}' |
apify call cottony_variation/lead-detective --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,cottony_variation/lead-detective"
        }
    }
}
```

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/IrkdN8jEQfHKaz7wH/builds/kpoB3ke16AwCXObQs/openapi.json
