# Tomato Cart AI Intelligence – B2B Lead & Competitor Analyze (`tomato_cart/ai-maps-intelligence`) Actor

AI-powered B2B lead generation and competitor intelligence from Google Maps. Two modes: Bulk Lead Finder (AI scoring + email drafts) or Single Business Analysis (deep competitor insights + PDF reports). 10 free/month.

- **URL**: https://apify.com/tomato\_cart/ai-maps-intelligence.md
- **Developed by:** [Richard](https://apify.com/tomato_cart) (community)
- **Categories:** Lead generation, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.00 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## 🍅 Tomato Cart AI Intelligence

### AI-Powered Google Maps Business Intelligence

Discover and analyze businesses on Google Maps with AI-driven insights. Generate lead scores, sales email drafts, competitor comparisons, market insights, and PDF/CSV reports — all in one run.

***

### 🎯 Two Modes

| Feature | Bulk Lead Generation | Single Business Analysis |
|---------|--------------------|------------------------|
| **Use case** | Find prospects by industry + location | Deep analysis of one specific business |
| **Input** | Keywords + Locations array | Maps URL or "Business Name, City" |
| **Output** | Lead list with AI scores + email drafts | Competitor comparison + recommendations + PDF |
| **Best for** | Sales teams, B2B prospecting | Business owners, marketers, consultants |

#### Bulk Lead Generation

Input industry keywords and city locations. The actor searches Google Maps, scores each business as a lead (0-100), generates a personalized sales email draft, and exports everything as CSV.

**Example**: Find plastic injection molding manufacturers in Chicago, Detroit, and Cleveland.

#### Single Business Analysis

Input a Google Maps URL or business name. The actor analyzes the target business, discovers competitors nearby, compares them with AI-generated strengths/weaknesses, and produces a professional PDF report with market insights and actionable recommendations.

**Example**: Analyze "Home Slice Pizza, Austin TX" — get competitors, market insights, and improvement suggestions.

***

### ⭐ Core Features

| Feature | Description | Availability |
|---------|-------------|-------------|
| **Lead Score (0-100)** | AI-powered scoring based on rating, reviews, distance, and sentiment | ✅ All modes |
| **Best Call Time** | Intelligent call timing suggestions per lead | ✅ All modes |
| **AI Email Draft** | Personalized 100-150 word sales outreach email per lead | ✅ All modes |
| **CSV Export** | All leads as CSV with full fields | ✅ All modes |
| **PDF Report** | Professional report with tables, insights, recommendations | ✅ Single Business |
| **Market Insights** | Average ratings, common pain points, differentiation advice | ✅ Single Business |
| **Competitor Analysis** | Strengths/weaknesses/opportunities per competitor via DeepSeek AI | ✅ Single Business |
| **Google Maps Reviews** | Extract up to N reviews per business (configurable) | ✅ All modes |
| **Free Tier** | 10 free results per user per month | ✅ All modes |
| **B2B Presets** | Pre-configured industry keyword sets | ✅ Bulk mode |

***

### 🚀 Quick Start

### 📋 Input Guide — Which Fields to Fill

#### If you selected "Bulk Lead Generation":

| Field | Required | What to fill |
|-------|----------|-------------|
| `taskType` | ✅ | `bulk_leads` |
| `bulkKeywords` | ✅ | Industry keywords like `["plastic injection molding", "mold maker"]` |
| `bulkLocations` | ✅ | Cities like `["Chicago, IL", "Detroit, MI"]` |
| `bulkMaxLeads` | Optional | Max leads per location (default 50) |

**Leave Single Business fields (singleTarget, singleLocation, etc.) EMPTY.**

#### If you selected "Single Business Analysis":

| Field | Required | What to fill |
|-------|----------|-------------|
| `taskType` | ✅ | `single_business` |
| `singleTarget` | ✅ | Maps URL or "Business Name, City" |
| `singleLocation` | Optional | City if Target is a name |
| `singleMaxCompetitors` | Optional | Max competitors (default 10) |
| `singleRadiusKm` | Optional | Search radius in km (default 2) |

**Leave Bulk fields (bulkKeywords, bulkLocations, etc.) EMPTY.**

> ⚠️ The Actor will auto-detect mixed parameters and clear conflicting ones with a warning.

#### Prerequisites

- A **DeepSeek API key** (set as `DEEPSEEK_API_KEY` env variable)
- (Optional) Configure `competitor_analysis` event at $0.015/unit in Apify Console → Monetization

#### Bulk Lead Generation — Input Example

```json
{
  "taskType": "bulk_leads",
  "bulkKeywords": [
    "plastic injection molding",
    "mold maker",
    "CNC machining"
  ],
  "bulkLocations": [
    "Chicago, IL",
    "Detroit, MI",
    "Cleveland, OH"
  ],
  "bulkMaxLeads": 100,
  "maxReviewsPerPlace": 3
}
```

#### Single Business Analysis — Input Example

```json
{
  "taskType": "single_business",
  "singleTarget": "https://www.google.com/maps/place/Home+Slice+Pizza/@30.2492286,-97.7495328,17z",
  "singleMaxCompetitors": 10,
  "singleRadiusKm": 2,
  "maxReviewsPerPlace": 5
}
```

Or by business name:

```json
{
  "taskType": "single_business",
  "singleTarget": "Home Slice Pizza",
  "singleLocation": "Austin, TX",
  "singleMaxCompetitors": 10,
  "singleRadiusKm": 2
}
```

***

### 📦 Output Structure

#### Top-level fields

```json
{
  "target": { "name": "...", "rating": 4.7, "address": "...", ... },
  "competitors": [
    {
      "name": "DeSano Pizzeria",
      "rating": 4.7,
      "address": "...",
      "phone": "...",
      "website": "...",
      "place_id": "...",
      "lat": 30.25,
      "lng": -97.74,
      "reviews": [{ "text": "...", "rating": 5, "publishedAt": "..." }],
      "leadScore": 85,
      "bestCallTime": "Tuesday-Thursday 2-4 PM",
      "emailDraft": "Subject: Partnership opportunity for DeSano Pizzeria...",
      "ai_strengths": ["High rating indicates strong...", "Over 1,300 reviews..."],
      "ai_weaknesses": ["Limited menu variety...", "No online ordering..."],
      "ai_opportunities": ["Could expand to catering..."]
    }
  ],
  "market_insights": {
    "average_rating": 4.65,
    "common_pain_points": ["Slow service during peak hours", "Limited parking"],
    "differentiation_advice": "Focus on unique toppings and faster delivery."
  },
  "recommendations": [
    "Implement online ordering system",
    "Offer loyalty program",
    "Extend operating hours on weekends"
  ],
  "reportPdfUrl": "https://api.apify.com/.../report_xxx.pdf",
  "csvExportUrl": "https://api.apify.com/.../leads_export_xxx.csv"
}
```

***

### 💰 Pricing

| Item | Price | Notes |
|------|-------|-------|
| **Free tier** | **10 results/month** | No charge for first 10 per user/month |
| **competitor\_analysis** | **$0.015/each** | Charged per competitor analyzed |
| **AI analysis** | Included | DeepSeek API calls included |
| **PDF/CSV reports** | Included | No additional charge |

#### Example costs

| Scenario | Results | Free | Charged | Total Cost |
|----------|---------|------|---------|-----------|
| First run, 14 leads | 14 | 10 | 4 | **$0.06** |
| Second run, 14 leads | 14 | 0 | 14 | **$0.21** |
| Monthly batch (2 runs) | 28 | 10 | 18 | **$0.27** |

***

### 🧠 Technology Stack

| Component | Technology |
|-----------|-----------|
| Web scraping | Playwright (headless Chromium) |
| AI analysis | DeepSeek (deepseek-chat) via OpenAI SDK |
| Data export | CSV + Playwright PDF generation |
| Platform | Apify (serverless, pay-per-event) |
| Anti-detection | Custom stealth script + user agent rotation |

***

### 🔧 Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `DEEPSEEK_API_KEY` | ✅ Yes | DeepSeek API key for AI analysis |

***

### 📋 Tags

- `B2B Leads`
- `Competitor Analysis`
- `AI Scoring`
- `Email Drafts`
- `Google Maps`
- `Lead Generation`
- `Market Research`

***

### 🤝 Support

- **Issues**: Create a ticket on the Apify Store page
- **Developer**: Tomato Cart
- **Built with**: Apify SDK + Playwright + DeepSeek AI

***

### 📝 Changelog

| Version | Date | Changes |
|---------|------|---------|
| v0.9 | 2026-05 | Task type selector (bulk/single), backward compat |
| v0.8 | 2026-05 | Free tier (10/mo), leadScore improvements |
| v0.7 | 2026-05 | Email drafts, CSV export |
| v0.6 | 2026-05 | Lead scoring, best call time |
| v0.5 | 2026-05 | PDF report, charging |
| v0.4 | 2026-05 | Market insights, recommendations |
| v0.3 | 2026-05 | DeepSeek AI integration |
| v0.2 | 2026-05 | Review extraction |
| v0.1 | 2026-05 | Initial release |

# Actor input Schema

## `taskType` (type: `string`):

Required. Choose Bulk Lead Generation or Single Business Analysis.

## `bulkKeywords` (type: `array`):

Keywords for your target industry. Example: plastic injection molding, mold maker, CNC machining

## `bulkLocations` (type: `array`):

Cities to search. Example: Chicago, IL; Detroit, MI; Cleveland, OH

## `bulkMaxLeads` (type: `integer`):

Maximum number of leads to collect per location.

## `singleTarget` (type: `string`):

Google Maps URL, or business name + city (e.g. Home Slice Pizza, Austin TX)

## `singleLocation` (type: `string`):

City or area for the business. Only needed if Target is a name, not a URL.

## `singleMaxCompetitors` (type: `integer`):

Maximum competitors to analyze.

## `singleRadiusKm` (type: `integer`):

Radius in km to search for competitors.

## `maxReviewsPerPlace` (type: `integer`):

Reviews to collect per competitor (0 = skip). Applies to both modes.

## Actor input object example

```json
{
  "taskType": "bulk_leads",
  "bulkKeywords": [
    "plastic injection molding",
    "mold maker"
  ],
  "bulkLocations": [
    "Chicago, IL",
    "Detroit, MI"
  ],
  "bulkMaxLeads": 50,
  "singleTarget": "Home Slice Pizza, Austin TX",
  "singleLocation": "",
  "singleMaxCompetitors": 10,
  "singleRadiusKm": 2,
  "maxReviewsPerPlace": 5
}
```

# 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 = {
    "bulkKeywords": [
        "plastic injection molding",
        "mold maker"
    ],
    "bulkLocations": [
        "Chicago, IL",
        "Detroit, MI"
    ],
    "singleTarget": "Home Slice Pizza, Austin TX"
};

// Run the Actor and wait for it to finish
const run = await client.actor("tomato_cart/ai-maps-intelligence").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 = {
    "bulkKeywords": [
        "plastic injection molding",
        "mold maker",
    ],
    "bulkLocations": [
        "Chicago, IL",
        "Detroit, MI",
    ],
    "singleTarget": "Home Slice Pizza, Austin TX",
}

# Run the Actor and wait for it to finish
run = client.actor("tomato_cart/ai-maps-intelligence").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 '{
  "bulkKeywords": [
    "plastic injection molding",
    "mold maker"
  ],
  "bulkLocations": [
    "Chicago, IL",
    "Detroit, MI"
  ],
  "singleTarget": "Home Slice Pizza, Austin TX"
}' |
apify call tomato_cart/ai-maps-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tomato_cart/ai-maps-intelligence"
        }
    }
}

```

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/V3LdO37C41aeSma2a/builds/cMSviRegZGzjcbN42/openapi.json
