# AI Company & Lead Researcher (`aarya_2/ai-company-lead-researcher`) Actor

Crawls a list of company websites and uses an LLM to produce an ICP-fit score, business summary, buying signals, and a personalized outreach icebreaker for each one.

- **URL**: https://apify.com/aarya\_2/ai-company-lead-researcher.md
- **Developed by:** [Aarya Bhansali](https://apify.com/aarya_2) (community)
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 company researcheds

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

## AI Company & Lead Researcher (Apify Actor)

Give it a list of company domains and your ICP description. For each domain it
reads the homepage plus a few relevant pages (About / Pricing / Product), then
uses an LLM (Gemini by default, Claude optional) to produce:

- a 2-3 sentence company summary
- an industry label
- an ICP fit score (1-10) with a specific reason
- buying signals found on the site (hiring, funding, launches, expansion)
- a personalized, non-generic outreach icebreaker

Typically chained after a discovery Actor (Google Maps Scraper, LinkedIn
Company Scraper, Apollo-style leads finder) that produces the domain list.

### Input

| Field              | Required | Description                                          |
|--------------------|----------|-------------------------------------------------------|
| `domains`          | yes      | List of company websites/domains                     |
| `icpDescription`   | yes      | Who you sell to - drives the fit score                |
| `senderContext`    | no       | What you're selling - makes icebreakers more specific  |
| `llmProvider`      | no       | `gemini` (default, free tier) or `anthropic` (paid)     |
| `modelName`        | no       | Override the default model for the chosen provider     |
| `maxPagesPerDomain`| no       | Pages read per domain, default 3                       |

### Getting an API key for $0

Default provider is **Google Gemini**, because its free tier is a standing
allowance, not a trial: no credit card, no expiration, roughly 1,500
requests/day on `gemini-2.5-flash`.

1. Go to https://aistudio.google.com/apikey
2. Sign in with any Google account
3. Click "Create API key" - copy it

That's it - no billing setup. Set it as `GEMINI_API_KEY` (see below). One
trade-off: Google may use free-tier prompts to improve its models, which is a
non-issue here since you're only feeding it public company website text.

If you later want higher-quality analysis or hit Gemini's daily cap with real
paying volume, switch `llmProvider` to `anthropic` and add a paid
`ANTHROPIC_API_KEY` - the code already supports both, no rewrite needed.

### Output (one dataset row per domain)

`domain, companyName, companySummary, industry, icpFitScore, icpFitReason,
buyingSignals, icebreaker, pagesCrawled, error`

### Monetization (Pay Per Event)

Two custom events, defined in `.actor/pay_per_event.json`:

- `company-researched` - charged once per domain successfully analyzed (primary event)
- `company-failed` - charged at a reduced rate for domains that couldn't be crawled (covers compute spent trying)

Starting price suggestion: **$0.02 per company researched** (~$20 per 1,000).
On Gemini's free tier your per-call LLM cost is $0 (within the daily quota);
if you switch to Claude Haiku it's roughly $0.001-0.003 per company at this
text volume. Either way margin is wide even after Apify's 20% cut - raise the
price once you have reviews, this is a floor, not a target.

### Local development

```bash
npm install -g apify-cli
cd ai-lead-researcher
export GEMINI_API_KEY=AIza...     # free - see "Getting an API key for $0" above
apify run
```

Check `storage/datasets/default/` for output after a local run.

### Deploy to Apify

```bash
apify login          # opens browser, paste your Apify API token
apify push            # builds and uploads this Actor to your Apify account
```

Then in the Apify Console, on this Actor's page:

1. **Settings -> Environment variables**: add `GEMINI_API_KEY` (or
   `ANTHROPIC_API_KEY` if you switched providers) as a **secret** env var.
2. **Publication -> Monetization**: enable Pay Per Event, keep the synthetic
   `apify-actor-start` event on (free first 5s of compute), and import/confirm
   the `company-researched` / `company-failed` events and prices.
3. Turn **off** the `apify-default-dataset-item` synthetic event in Console -
   this Actor already charges per item explicitly via `Actor.push_data(item,
   "company-researched")`, so leaving both on double-charges users.
4. Write the Store listing (title, description, example input/output,
   screenshots) and set visibility to **Public**.

### Zapier integration (for buyers)

No extra code needed - Apify's Zapier app already exposes:

- **Trigger**: "Finished Actor Run" -> fires when a run of this Actor completes
- **Action**: "Run Actor" -> lets a Zap kick off a run (e.g. from a new row in
  a Google Sheet of leads)
- **Search**: "Fetch Dataset Items" -> pulls the enriched rows into the next
  Zap step (CRM, Slack, Sheet, Notion...)

Buyers connect Apify to Zapier from their own Zapier account - once this
Actor is public, it's usable in the Zap builder like any other Apify Actor.

# Actor input Schema

## `domains` (type: `array`):

One company website per line, e.g. stripe.com or https://stripe.com. Usually chained from a Google Maps / LinkedIn / Apollo scraper's output.

## `icpDescription` (type: `string`):

Who you sell to. Example: 'B2B SaaS companies, 20-200 employees, selling to marketing or growth teams, Series A-C.' This drives the fit score.

## `senderContext` (type: `string`):

One or two lines about your product or offer. Used to write a relevant, specific icebreaker line instead of a generic one.

## `llmProvider` (type: `string`):

Gemini's free tier needs only a Google account - good default while you're testing or just starting out. Switch to Claude later if you want higher-quality analysis and are ready to pay per use.

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

Leave blank to use the default for the chosen provider (gemini-2.5-flash, or claude-haiku-4-5-20251001).

## `maxPagesPerDomain` (type: `integer`):

Home page plus up to this many linked pages (About/Pricing/Product) are read before analysis.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "stripe.com"
  ],
  "icpDescription": "B2B SaaS companies, 20-200 employees, has a marketing or growth team",
  "llmProvider": "gemini",
  "maxPagesPerDomain": 3
}
```

# Actor output Schema

## `datasetId` (type: `string`):

No description

# 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 = {
    "domains": [
        "apify.com",
        "stripe.com"
    ],
    "icpDescription": "B2B SaaS companies, 20-200 employees, has a marketing or growth team",
    "senderContext": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("aarya_2/ai-company-lead-researcher").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 = {
    "domains": [
        "apify.com",
        "stripe.com",
    ],
    "icpDescription": "B2B SaaS companies, 20-200 employees, has a marketing or growth team",
    "senderContext": "",
}

# Run the Actor and wait for it to finish
run = client.actor("aarya_2/ai-company-lead-researcher").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 '{
  "domains": [
    "apify.com",
    "stripe.com"
  ],
  "icpDescription": "B2B SaaS companies, 20-200 employees, has a marketing or growth team",
  "senderContext": ""
}' |
apify call aarya_2/ai-company-lead-researcher --silent --output-dataset

```

## MCP server setup

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

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/a0uMPLwGjTrgVJkI3/builds/pLfaacAx9e9ng8I3h/openapi.json
