# Lead Intelligence Engine (`valle/lead-intelligence-engine`) Actor

An intelligent Google Maps & website scanner for agencies and B2B teams. Automatically finds companies, extracts emails, phones, and socials, audits sites for SEO, legal, and UX issues, scores leads (A+–D), and generates personalized CTAs targeting real pain points. Perfect for sales prospecting.

- **URL**: https://apify.com/valle/lead-intelligence-engine.md
- **Developed by:** [Valentin Oeder](https://apify.com/valle) (community)
- **Categories:** Developer tools, Automation, Lead generation
- **Security:** Full permissions
- **Stats:** 14 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 lead 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?

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 Intelligence Engine — Google Maps & Website Audit

**Automatischer Lead-Finder für Agenturen und B2B-Vertrieb.**

***

### 🇩🇪 DEUTSCH

#### Übersicht

Der **Lead Intelligence Engine Scraper** durchsucht Google Maps nach Unternehmen, extrahiert Websites, E-Mails, Telefonnummern, WhatsApp-Nummern und Social-Links.\
Er prüft automatisch technische und rechtliche Aspekte (SSL, Impressum, Datenschutz, Mobile, SEO) und bewertet jeden Lead mit einem 100-Punkte-Score (A+ bis D).\
Das System generiert für jeden Kontakt direkt ein passendes, personalisiertes **Verkaufsargument (CTA)** auf Basis der gefundenen Schwächen.

#### Funktionen

- 🔍 Google Maps Suche nach Branche + Stadt
- 🌐 Website-Analyse (E-Mail, Telefon, Socials, WhatsApp)
- ⚖️ Rechts- und Technik-Check (Impressum, SSL, Mobile)
- 📊 Lead-Scoring mit Opportunity-Ranking
- 🧠 Automatische CTA-Texte (Pain-Points + Lösungen)
- 📤 Export als CSV oder JSON

#### Anwendungsfälle

- Agenturen, Web-Studios, SEO-Dienstleister, SaaS
- Outbound-Sales & Prospecting
- Lead-Verkauf (z. B. Google-Maps-Datenfeeds)
- Marktanalyse & Wettbewerbs-Benchmark

#### Input-Beispiel

```json
{
  "queries": ["Webdesign Agentur München"],
  "maxResultsPerQuery": 100,
  "includeWebsiteScan": true,
  "includeWhatsApp": true,
  "generateCta": true,
  "ctaLanguage": "de",
  "proxyConfig": { "useApifyProxy": true, "apifyProxyGroups": ["DE"] }
}
```

#### Output

- Name, Kategorie, Stadt, Website, E-Mail, Telefonnummer, WhatsApp
- SSL-Status, CMS, Mobile-Check, SEO-Meta, Ladezeit
- Opportunity-Score, CTA-Text, Argument-Trigger

#### Bewertungssystem

| Faktor | Gewicht |
| --- | --- |
| Kontakt (E-Mail, Telefon) | 30 |
| Recht & Vertrauen | 25 |
| Technik (SSL, Mobile) | 25 |
| SEO & Struktur | 20 |
| Reputation | 20 |

#### CTA-Beispiel

„Ich habe mir {{domain}} angesehen — {{issue_1}} und {{issue_2}}. Wir beheben das inkl. {{quick_wins}}. Umsetzung < 5 Tage. Kurze Demo?“

***

### 🇬🇧 ENGLISH

#### Overview

The **Lead Intelligence Engine** scans Google Maps for businesses, extracting websites, emails, phone numbers, WhatsApp links, and social media profiles.\
It audits each website for SSL, legal compliance, mobile readiness, and SEO signals.\
Each result is scored (A+–D) and paired with a tailored sales message (CTA) that highlights the key weaknesses and actionable fixes.

#### Features

- 🔍 Google Maps business scraping (no API)
- 🌐 Website crawler for contact data, socials, WhatsApp
- ⚙️ Legal + technical audits (SSL, mobile, privacy, etc.)
- 📊 Smart lead scoring (0–100, A+–D)
- 🧠 AI-generated CTAs from detected pain points
- 📤 Export as CSV or JSON

#### Use Cases

- Web agencies, SEO firms, SaaS outbound teams
- Sales automation and cold outreach
- Data enrichment and lead resale
- Market research and benchmarking

#### Input Example

```json
{
  "queries": ["SEO Agency Berlin"],
  "maxResultsPerQuery": 100,
  "includeWebsiteScan": true,
  "includeWhatsApp": true,
  "generateCta": true,
  "ctaLanguage": "en",
  "proxyConfig": { "useApifyProxy": true, "apifyProxyGroups": ["DE"] }
}
```

#### Output

- Name, Category, Location, Website, Email, Phone, WhatsApp
- SSL status, CMS, Mobile readiness, Meta tags, Load time
- Opportunity score, CTA text, Argument trigger

#### Scoring Weights

| Factor | Weight |
| --- | --- |
| Contact signals | 30 |
| Legal & Trust | 25 |
| Technical health | 25 |
| SEO & Structure | 20 |
| Reputation | 20 |

#### Example CTA

“I reviewed {{domain}} — {{issue_1}} and {{issue_2}} are holding it back. We fix this and add {{quick_wins}}. Ready to see a preview?”

***

#### Developer

**Valerius Data Systems — Oper8Labs**\
Website: [www.oper8labs.com](https://www.oper8labs.com)\
Contact: <valentin@oper8labs.com>\
Instagram: [@vallenextdoor](https://www.instagram.com/vallenextdoor)

#### Tags

lead-scraper, google-maps, automation, b2b, whatsapp, seo, marketing, data, intelligence

## Lead Intelligence Engine 🚀

**Intelligenter Lead-Scanner für B2B-Sales Teams**

Findet Firmen über Google Places API, analysiert ihre Websites, extrahiert Kontaktdaten, bewertet die Lead-Qualität und generiert automatisch Verkaufsargumente. Perfekt für Digital‑Agenturen, Webentwickler und Sales‑Teams.

### 🎯 Features

#### ✅ Zwei Betriebsmodi

- **SEARCH**: Google Maps Scraping (API Key optional - ohne Key: Web Scraping, mit Key: API)
- **WEBSITES**: Crawlt eine vordefinierte Domainliste

#### 📊 Advanced Lead-Scoring (100 Punkte System)

- **A+**: 85–100 Punkte (Premium Leads - sofort kontaktieren!)
- **A**: 75–84 Punkte
- **B**: 65–74 Punkte
- **C**: 50–64 Punkte
- **D**: <50 Punkte

**Scoring-Kategorien:**

- **Basis-Technik** (25 Punkte): SSL, Mobile-Optimierung
- **Reputation** (20 Punkte): Google-Bewertung, Anzahl Reviews
- **Kontakt-Qualität** (30 Punkte): E-Mails, Social Media Kanäle
- **Performance & SEO** (25 Punkte): Ladezeit, Analytics, Schema.org, Canonical, Hreflang
- **Recht & Compliance** (25 Punkte): Impressum, Datenschutz
- **CMS-Qualität** (5 Punkte): Moderne vs. veraltete Systeme

#### 🎁 Extrahiert

- **Kontaktdaten**: E-Mails (inkl. versteckter Felder), Telefonnummern (DE + Intl.)
- **Social Media**: Instagram, Facebook, LinkedIn, TikTok, YouTube, Twitter/X, WhatsApp, Telegram, Snapchat, Threads, Pinterest
- **SEO‑Metriken**: Meta‑Title, Meta‑Description, Schema.org, Canonical, Hreflang
- **Technical Profiling**: 20+ CMS‑Systeme, SSL, Mobile‑Optimierung, Load‑Time, Analytics
- **Rechtliche Compliance**: Impressum, Datenschutz (DSGVO)
- **Google‑Bewertungen**: Rating, Anzahl Reviews

#### 💡 Automatische Verkaufsargumente

Intelligente Priorisierung nach Verkaufswahrscheinlichkeit:

- **Kritisch** (Sofort handeln): SSL‑Fehler, fehlendes Impressum, DSGVO‑Verstöße, Website offline
- **Wichtig** (Hoher Impact): Mobile‑Optimierung, Ladezeit, Kontaktmöglichkeiten, Analytics, Social Media
- **Optimierung** (Nice-to-have): Schema.org Markup, CMS‑Modernisierung, Multi-Language (Hreflang)

### 🚀 Schnellstart

#### 1. Auf Apify hochladen

```bash
## Git-Repository pushen
git add .
git commit -m "Lead Intelligence Engine v1.0"
git push origin main
```

Auf https://console.apify.com einen neuen Actor erstellen und das Repository verbinden.

#### 2. Actor konfigurieren

##### Input Schema öffnen

Im Apify‑Console → Dein Actor → `INPUT_SCHEMA.json` prüfen:

```json
{
  "mode": "SEARCH",  // oder "WEBSITES"
  "searchStringsArray": ["Plastische Chirurgie"],
  "locationQueries": ["Stuttgart, Deutschland"],
  "maxCrawledPlacesPerSearch": 20,
  "useApifyProxy": true,
  "apifyProxyGroups": ["DE"],
  "googlePlacesApiKey": "DEIN_API_KEY",
  "maxConcurrency": 5
}
```

#### 3. Ersten Run starten

**SEARCH‑Modus (Google Maps):**

**Option A: Mit API Key (empfohlen - zuverlässiger)**

1. Mode: `SEARCH`
2. Suchbegriffe: z.B. `["Restaurants", "Cafes"]`
3. Orte: z.B. `["Berlin, Deutschland"]`
4. Max Plätze: `20` (empfohlen für den Start)
5. Google Places API Key: Dein API Key (optional, aber empfohlen)
6. Proxy aktivieren: `true`
7. **Run starten!**

**Option B: Ohne API Key (Web Scraping)**

1. Mode: `SEARCH`
2. Suchbegriffe: z.B. `["Restaurants", "Cafes"]`
3. Orte: z.B. `["Berlin, Deutschland"]`
4. Max Plätze: `20`
5. Google Places API Key: **Leer lassen** → Nutzt automatisch Web Scraping
6. Proxy aktivieren: `true` (wichtig für Scraping!)
7. **Run starten!**

**WEBSITES‑Modus (Domain‑Liste):**

1. Mode: `WEBSITES`
2. Websites:

```json
[
  "https://beispiel-firma.de",
  "https://andere-firma.com"
]
```

3. **Run starten!**

### 📥 Ergebnisse exportieren

Nach erfolgreichem Run → Dataset → **Download als CSV**

#### CSV‑Spalten

| Spalte | Beschreibung | Beispiel |
|--------|--------------|----------|
| `title` | Firmenname | "Beispiel GmbH" |
| `city` | Stadt | "Stuttgart" |
| `website` | Website URL | "https://beispiel.de" |
| `email` | E‑Mail(s) | "info@beispiel.de, verkauf@beispiel.de" |
| `phone` | Telefonnummer | "+49 711 123456" |
| `rating` | Google‑Bewertung | 4.5 |
| `reviews` | Anzahl Reviews | 127 |
| `ssl` | HTTPS aktiv? | true/false |
| `cms` | CMS‑System | "WordPress", "Webflow", "Next.js", etc. |
| `mobile` | Mobile‑optimiert? | true/false |
| `socials` | Social‑Media‑Links | JSON‑String |
| `website_status` | Status | "online", "offline", "error" |
| `load_ms` | Ladezeit | 1850 |
| `lead_score` | Score 0–100 | 75 |
| `grade` | Bewertung A–D | "B" |
| `argument_trigger` | Verkaufsargument | "🚨 Kein SSL‑Zertifikat..." |
| `meta_title` | SEO‑Title | "Beispiel GmbH – Ihre Agentur" |
| `meta_description` | SEO‑Description | "Wir bieten..." |
| `has_impressum` | Impressum vorhanden? | true/false |
| `has_privacy` | Datenschutz vorhanden? | true/false |
| `has_schemas` | Schema.org Markup? | true/false |
| `has_analytics` | Analytics installiert? | true/false |
| `hreflang` | Multi-Language SEO? | true/false |
| `canonical` | Canonical URL? | true/false |

### ⚙️ Erweiterte Konfiguration

#### Proxy‑Einstellungen

Standard: `apifyProxyGroups: ["DE"]`

Weitere Optionen:

- `["US"]` für USA
- `["AUTO"]` für automatische Auswahl
- `["US", "DE", "FR"]` für Multi‑Region

#### Parallelität

`maxConcurrency`: 1–20 gleichzeitige Website‑Scans

Empfehlung:

- **Kleine Runs** (<50): 5
- **Mittel** (50–200): 10
- **Groß** (>200): 15–20

### 🔧 Technischer Stack

- **Apify SDK v3**: Actor‑Framework
- **Google Places API**: Offizielle Google‑API für Firmendaten
- **Cheerio**: HTML‑Parsing
- **Axios**: HTTP‑Requests
- **Node.js**: Runtime

### 💰 Kosten

#### SEARCH‑Modus

**Ohne API Key (Web Scraping):**

- ✅ **Kostenlos** - Keine API-Kosten
- ⚠️ Weniger zuverlässig (kann durch Google Bot-Detection beeinträchtigt werden)
- Nur Apify Compute Units

**Mit API Key (Google Places API):**

- **Kosten**: ~$0.03 pro Suchbegriff‑Ort‑Kombination
- **Details**: $0.017 pro Place Details abruf
- **Kostenloses Guthaben**: $200/Monat von Google
- ✅ **Zuverlässigste Methode**
- Apify Compute Units: Zusätzlich je nach Volumen
- **Empfehlung**: Start mit 20 Places

#### WEBSITES‑Modus

- Keine Extern‑Kosten
- Nur Apify Compute Units

### 🐛 Troubleshooting

#### "Keine Ergebnisse gefunden"

- Erhöhe Wartezeiten im Code
- Prüfe `searchStringsArray` und `locationQueries`
- Aktiviere Proxy

#### "Website offline/error"

- Normal bei defekten Domains
- Prüfe URLs im WEBSITES‑Modus

#### "Timeout Error"

- Reduziere `maxConcurrency`
- Erhöhe Timeouts im Code

### 📚 Beispiel‑Use Cases

#### 1. CRM‑Enrichment

Finde fehlende Kontaktdaten, Social Media Profiles und SEO-Scoring für bestehende Leads.

#### 2. Wettbewerbsanalyse

Scanne den Markt, analysiere CMS‑Auswahl, SEO‑Qualität und identifiziere Verbesserungsfelder.

#### 3. Outbound‑Sales

Generiere qualifizierte Lead‑Listen mit automatischen, priorisierten Verkaufsargumenten (Kritisch → Wichtig → Nice-to-have).

#### 4. Agency‑Prospecting

Suche z. B. "Webdesign Agentur München" und biete Services passend zum technischen Profil der Leads.

#### 5. Lead‑Qualifizierung

Automatisches Scoring (A-D) für Fokussierung auf hochwertige Leads.

**Warum besser als andere?**
✅ **Datenqualität**: Robuste Regex für E-Mails + Telefon (DE + Intl.), erkennt auch versteckte Felder\
✅ **Social Media**: 11 Plattformen (Instagram, FB, LinkedIn, TikTok, YouTube, X, WhatsApp, Telegram, Snapchat, Threads, Pinterest)\
✅ **CMS-Erkennung**: 20+ Systeme (WordPress, Shopify, Wix, Next.js, Nuxt, CraftCMS, Strapi, TYPO3, etc.)\
✅ **SEO**: Schema.org, Canonical URLs, Hreflang, Meta-Tags, Analytics-Detection\
✅ **Scoring**: 100-Punkte System mit 6 Kategorien + A+ Rating für Premium Leads\
✅ **Recht**: Automatische Impressum & Datenschutz-Checks\
✅ **Performance**: Load-Time Tracking mit granularer Bewertung\
✅ **Lead-Argumente**: Intelligente Priorisierung (Kritisch → Wichtig → Optimierung)\
✅ **Deutsch**: Bessere Heuristik für deutsche Firmennamen (GmbH, AG, etc.)

### 🤝 Contributing

Feedback und Pull Requests gerne über GitHub.

### 📄 Lizenz

MIT

### 🆘 Support

Issues: GitHub Repo\
Documentation: https://docs.apify.com/actors/development

***

**Happy Lead Hunting! 🎯**

# Actor input Schema

## `mode` (type: `string`):

SEARCH = Google Maps (mit API Key: zuverlässig, ohne: Web Scraping); WEBSITES = feste Domainliste crawlen.

## `searchStringsArray` (type: `array`):

Nur für SEARCH.

## `locationQueries` (type: `array`):

Nur für SEARCH.

## `maxCrawledPlacesPerSearch` (type: `integer`):

Maximale Anzahl an Google Maps Ergebnissen pro Suchbegriff-Ort-Kombination.

## `maxLocalSearchPages` (type: `integer`):

Anzahl der Google-Local-Search-Seiten (tbm=lcl) pro Suche. Jede Seite liefert ca. 20 Einträge.

## `websites` (type: `array`):

Nur für WEBSITES. Volle URLs inkl. https://

## `useApifyProxy` (type: `boolean`):

Aktiviert das Apify Proxy-Netzwerk für bessere Anonymität und Rate-Limiting.

## `apifyProxyGroups` (type: `array`):

Proxy-Gruppen für geografische Zielung (z.B. DE, US, AUTO).

## `googlePlacesApiKey` (type: `string`):

Optional für SEARCH-Modus. Ohne Key wird Web Scraping genutzt. Mit Key: Zuverlässiger (~$0.03/Suche, $200/Monat kostenlos).

## `maxConcurrency` (type: `integer`):

Anzahl gleichzeitiger Website-Crawls (1-20 empfohlen, Standard: 3 für stabilere Scans ohne Timeouts).

## `outputLanguage` (type: `string`):

Steuert, ob CTA-Texte auf Deutsch oder Englisch generiert werden.

## Actor input object example

```json
{
  "mode": "SEARCH",
  "searchStringsArray": [
    "Plastische Chirurgie"
  ],
  "locationQueries": [
    "Stuttgart, Deutschland"
  ],
  "maxCrawledPlacesPerSearch": 20,
  "maxLocalSearchPages": 3,
  "useApifyProxy": true,
  "apifyProxyGroups": [
    "DE"
  ],
  "maxConcurrency": 3,
  "outputLanguage": "de"
}
```

# 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("valle/lead-intelligence-engine").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("valle/lead-intelligence-engine").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 valle/lead-intelligence-engine --silent --output-dataset

```

## MCP server setup

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

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/kUmgvKJhdWDLzZfkf/builds/HB0qPbgnJ11al3oyv/openapi.json
