# B2B Sales Intelligence Agent (`joseph99/my-actor`) Actor

AI-powered B2B lead research agent. Scrapes company websites, scores ICP fit (0–100), surfaces buying signals from news, and generates personalised cold email + LinkedIn outreach copy. Powered by LangGraph + OpenRouter.

- **URL**: https://apify.com/joseph99/my-actor.md
- **Developed by:** [JOSEPH](https://apify.com/joseph99) (community)
- **Categories:** AI, Automation, Lead generation
- **Stats:** 2 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $200.00 / 1,000 lead enricheds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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

## B2B Sales Intelligence & Lead Qualification Agent

Turn a list of company domains into a full sales intelligence dossier — complete with ICP scores, buying signals, and personalised outreach copy — in seconds.

Powered by **LangGraph** + **OpenRouter** (supports GPT-4o, GPT-4o-mini, and more).

---

### What it does

For each company you provide, the agent runs a 5-step research pipeline:

1. **Website scrape** — Fetches the homepage and About page to understand what the company actually does
2. **Firmographic enrichment** — Pulls tech stack data (via BuiltWith) and company details
3. **News signals** — Fetches recent headlines from Google News to surface buying triggers (fundraising, hiring, product launches, leadership changes)
4. **ICP scoring** — Scores the company 0–100 on how well it fits your Ideal Customer Profile, with detailed reasoning
5. **Outreach generation** — Writes a personalised cold email (150–200 words) and LinkedIn message (60–80 words) referencing real news signals

All results are pushed to a structured dataset you can export as JSON, CSV, or Excel.

---

### Who is this for

- **SDRs and AEs** who want to walk into a call knowing the company inside-out
- **Sales ops teams** automating prospect research at scale
- **Lead generation agencies** delivering enriched lists to clients
- **Founders** doing outbound without a sales team

---

### Input

| Field | Type | Required | Description |
|---|---|---|---|
| `leads` | Array | Yes | List of `{ domain, companyName }` objects |
| `icpCriteria` | Object | No | Your ICP definition (industries, sizes, regions, pain points) |
| `modelName` | String | No | LLM model: `gpt-4o-mini` (default), `gpt-4o`, `o1`, `o3-mini` |
| `openaiApiKey` | String | Yes | Your **OpenRouter** API key (get one free at openrouter.ai) |

#### Example input

```json
{
  "leads": [
    { "domain": "stripe.com", "companyName": "Stripe" },
    { "domain": "notion.so", "companyName": "Notion" },
    { "domain": "linear.app", "companyName": "Linear" }
  ],
  "icpCriteria": {
    "target_industries": ["SaaS", "FinTech", "Developer Tools"],
    "target_company_sizes": ["51-200", "201-500"],
    "target_regions": ["North America", "Europe"],
    "pain_points": ["manual workflows", "team collaboration", "scaling engineering"]
  },
  "modelName": "gpt-4o-mini",
  "openaiApiKey": "YOUR_OPENROUTER_API_KEY"
}
````

***

### Output

Each lead produces one row in the dataset:

| Field | Type | Description |
|---|---|---|
| `domain` | string | Company domain |
| `companyName` | string | Company name |
| `icpScore` | number | ICP fit score 0–100 |
| `icpReasoning` | string | Why this score was given |
| `firmographics` | object | About page text + tech stack snippet |
| `newsSignals` | array | Recent news headlines |
| `outreachEmail` | string | Ready-to-send cold email |
| `outreachLinkedIn` | string | Ready-to-send LinkedIn message |
| `error` | string | Error message if a lead failed, null otherwise |

***

### Pricing

This actor uses **Pay-Per-Event** (PPE) pricing:

| Event | Cost |
|---|---|
| Actor start | $0.10 per run |
| Lead enriched | $1.00 per successfully processed lead |

A run with 10 leads costs roughly **$10.10** — far cheaper than Apollo, ZoomInfo, or Clay for equivalent personalised research.

***

### How to get your OpenRouter API key

1. Go to [openrouter.ai](https://openrouter.ai)
2. Sign up for a free account
3. Navigate to **Keys** → **Create Key**
4. Paste the key into the `openaiApiKey` field

OpenRouter supports GPT-4o, Claude 3.5, Gemini, and many more models on a pay-as-you-go basis.

***

### Notes

- The agent uses Google News RSS and public web pages only — no paid data providers required
- Results quality improves with a more detailed `icpCriteria` object
- For best results use `gpt-4o`; for fastest/cheapest use `gpt-4o-mini`
- Each lead takes approximately 15–40 seconds depending on the model and website speed

# Actor input Schema

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

List of companies to research. Each item must have a 'domain' field (e.g. 'stripe.com') and optionally a 'companyName' field.

## `icpCriteria` (type: `object`):

Your Ideal Customer Profile definition. Used to score each lead 0-100.

## `modelName` (type: `string`):

The OpenRouter model to use. gpt-4o gives best results; gpt-4o-mini is faster and cheaper.

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

Your OpenRouter API key. It is stored as a secret input and decrypted only for the Actor run.

## Actor input object example

```json
{
  "leads": [
    {
      "domain": "stripe.com",
      "companyName": "Stripe"
    },
    {
      "domain": "notion.so",
      "companyName": "Notion"
    }
  ],
  "icpCriteria": {
    "target_industries": [
      "SaaS",
      "FinTech",
      "E-commerce",
      "MarTech"
    ],
    "employee_range": "50-5000",
    "revenue_range": "$5M-$500M",
    "target_titles": [
      "VP Sales",
      "Head of Revenue",
      "CRO",
      "CEO"
    ],
    "pain_points": [
      "scaling sales team",
      "lead quality",
      "CRM hygiene",
      "pipeline visibility"
    ],
    "tech_stack_must_have": [],
    "tech_stack_nice_to_have": [
      "Salesforce",
      "HubSpot",
      "Outreach"
    ]
  },
  "modelName": "openai/gpt-4o-mini"
}
```

# Actor output Schema

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

Name of the researched company

## `icpScore` (type: `string`):

Ideal Customer Profile fit score 0-100

## `outreachEmail` (type: `string`):

Ready-to-send personalised cold email

# 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": [
        {
            "domain": "stripe.com",
            "companyName": "Stripe"
        },
        {
            "domain": "notion.so",
            "companyName": "Notion"
        }
    ],
    "icpCriteria": {
        "target_industries": [
            "SaaS",
            "FinTech",
            "E-commerce",
            "MarTech"
        ],
        "employee_range": "50-5000",
        "revenue_range": "$5M-$500M",
        "target_titles": [
            "VP Sales",
            "Head of Revenue",
            "CRO",
            "CEO"
        ],
        "pain_points": [
            "scaling sales team",
            "lead quality",
            "CRM hygiene",
            "pipeline visibility"
        ],
        "tech_stack_must_have": [],
        "tech_stack_nice_to_have": [
            "Salesforce",
            "HubSpot",
            "Outreach"
        ]
    },
    "modelName": "openai/gpt-4o-mini"
};

// Run the Actor and wait for it to finish
const run = await client.actor("joseph99/my-actor").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": [
        {
            "domain": "stripe.com",
            "companyName": "Stripe",
        },
        {
            "domain": "notion.so",
            "companyName": "Notion",
        },
    ],
    "icpCriteria": {
        "target_industries": [
            "SaaS",
            "FinTech",
            "E-commerce",
            "MarTech",
        ],
        "employee_range": "50-5000",
        "revenue_range": "$5M-$500M",
        "target_titles": [
            "VP Sales",
            "Head of Revenue",
            "CRO",
            "CEO",
        ],
        "pain_points": [
            "scaling sales team",
            "lead quality",
            "CRM hygiene",
            "pipeline visibility",
        ],
        "tech_stack_must_have": [],
        "tech_stack_nice_to_have": [
            "Salesforce",
            "HubSpot",
            "Outreach",
        ],
    },
    "modelName": "openai/gpt-4o-mini",
}

# Run the Actor and wait for it to finish
run = client.actor("joseph99/my-actor").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": [
    {
      "domain": "stripe.com",
      "companyName": "Stripe"
    },
    {
      "domain": "notion.so",
      "companyName": "Notion"
    }
  ],
  "icpCriteria": {
    "target_industries": [
      "SaaS",
      "FinTech",
      "E-commerce",
      "MarTech"
    ],
    "employee_range": "50-5000",
    "revenue_range": "$5M-$500M",
    "target_titles": [
      "VP Sales",
      "Head of Revenue",
      "CRO",
      "CEO"
    ],
    "pain_points": [
      "scaling sales team",
      "lead quality",
      "CRM hygiene",
      "pipeline visibility"
    ],
    "tech_stack_must_have": [],
    "tech_stack_nice_to_have": [
      "Salesforce",
      "HubSpot",
      "Outreach"
    ]
  },
  "modelName": "openai/gpt-4o-mini"
}' |
apify call joseph99/my-actor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "B2B Sales Intelligence Agent",
        "description": "AI-powered B2B lead research agent. Scrapes company websites, scores ICP fit (0–100), surfaces buying signals from news, and generates personalised cold email + LinkedIn outreach copy. Powered by LangGraph + OpenRouter.",
        "version": "0.0",
        "x-build-id": "XmG4q1fhPWpwqeJIR"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/joseph99~my-actor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-joseph99-my-actor",
                "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/joseph99~my-actor/runs": {
            "post": {
                "operationId": "runs-sync-joseph99-my-actor",
                "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/joseph99~my-actor/run-sync": {
            "post": {
                "operationId": "run-sync-joseph99-my-actor",
                "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": [
                    "leads",
                    "openaiApiKey"
                ],
                "properties": {
                    "leads": {
                        "title": "Leads to enrich",
                        "type": "array",
                        "description": "List of companies to research. Each item must have a 'domain' field (e.g. 'stripe.com') and optionally a 'companyName' field.",
                        "default": []
                    },
                    "icpCriteria": {
                        "title": "ICP Criteria",
                        "type": "object",
                        "description": "Your Ideal Customer Profile definition. Used to score each lead 0-100."
                    },
                    "modelName": {
                        "title": "OpenRouter model",
                        "enum": [
                            "openai/gpt-4o",
                            "openai/gpt-4o-mini",
                            "openai/o1",
                            "openai/o3-mini"
                        ],
                        "type": "string",
                        "description": "The OpenRouter model to use. gpt-4o gives best results; gpt-4o-mini is faster and cheaper.",
                        "default": "openai/gpt-4o-mini"
                    },
                    "openaiApiKey": {
                        "title": "OpenRouter API Key",
                        "type": "string",
                        "description": "Your OpenRouter API key. It is stored as a secret input and decrypted only for the Actor run."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
