# German B2B Leads, Crafts & Business Directory Scraper (`agrunert/german-b2b-leads-directory-scraper`) Actor

Extract verified German B2B company leads, crafts (Handwerker) & local businesses from 11880 & Gelbe Seiten including E.164 phone numbers, addresses & verified corporate domains.

- **URL**: https://apify.com/agrunert/german-b2b-leads-directory-scraper.md
- **Developed by:** [André Grunert](https://apify.com/agrunert) (community)
- **Categories:** Lead generation, Business, Marketing
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$8.00 / 1,000 b2b lead scrapeds

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

## 🏗️🏢 German B2B Leads, Crafts & Business Directory Scraper

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-blue.svg)](https://apify.com/AGrunert/german-b2b-leads-directory-scraper)
[![Pay-Per-Event](https://img.shields.io/badge/PPE-$0.008%20per%20lead-emerald.svg)](https://apify.com/AGrunert/german-b2b-leads-directory-scraper)
[![Zero-Playwright High Speed](https://img.shields.io/badge/Speed-Zero--Playwright%20Async-brightgreen.svg)](https://apify.com/AGrunert/german-b2b-leads-directory-scraper)
[![Multi-Source](https://img.shields.io/badge/Source-Gelbe%20Seiten%20%26%2011880-orange.svg)](https://apify.com/AGrunert/german-b2b-leads-directory-scraper)

The ultimate **top-of-funnel B2B lead generator** for Germany. Scrapes local businesses, craftsmen, corporate service providers, and trades across any industry or German city/postal code in seconds.

Extracts structured company records including **verified company name**, **trade category**, **full postal address**, **standardized telephone**, **direct email**, **customer ratings**, and the **cleaned target company website domain (`website` / `domain`)** — directly compatible as the primary feed for our [**German Impressum Enricher (Actor #5)**](https://apify.com/AGrunert/german-impressum-b2b-lead-enricher) and [**German KYB Handelsregister Scraper (Actor #2)**](https://apify.com/AGrunert/german-company-kyb-insolvency-scraper)!

***

### 🎥 48-Second Live Video Showcase (1080p HD)

[![Watch German B2B Data Suite Live Video Showcase](https://raw.githubusercontent.com/andregrunert-ctrl/german-b2b-data-suite/main/docs/b2b_showcase_banner.png)](https://youtu.be/ERydgz1hGk8)

*Part of the official German B2B Data Suite: Automate B2B lead generation, GDPR-compliant impressum enrichment (§ 5 DDG), real-time Handelsregister (XJustiz) & insolvency KYB audits, ZVG foreclosures, and public tenders via Apify, n8n, Make.com, or AI Agents (MCP).*

***

### ⚡ Key Highlights & Architecture

- **High-Speed Multi-Source Engine:** Queries Germany's leading commercial directories (*Gelbe Seiten* & *11880*) concurrently via high-speed `httpx` async HTTP clients and `lxml` DOM parsers — **Zero-Playwright / Zero-Puppeteer** for lightning-fast runs and minimal compute overhead.
- **Instant Website & Domain Decoding:** Extracts real corporate websites directly from directory payloads without following ad-trackers, redirects, or consent walls. Directory and aggregator domains are automatically blacklisted.
- **Smart German PLZ-to-State Mapping:** Maps 5-digit German postal codes (`PLZ`) deterministically to their federal state (*Bundesland*, e.g. Bayern, Sachsen, Nordrhein-Westfalen).
- **Strict Pay-Per-Event Pricing ($0.008 / lead):** You only pay for valid, successfully extracted leads that match your criteria. If an input query returns no results or fails validation, **$0.00** is charged.
- **Downstream Integration Filters:**
  - `require_website: true`: Filters strictly for companies with an owned website domain — perfect for feeding directly into Impressum enrichment pipelines.
  - `require_phone: true`: Filters strictly for leads with telephone numbers for immediate tele-sales.
  - `include_details: true`: Deep-crawls directory detail pages to uncover direct business emails and extended service descriptions.
- **Summary Key-Value Store Export:** Produces `LEADS_SUMMARY.json` containing a ready-to-copy `domains` array formatted specifically for Actor #5.

***

### 🎯 Ideal Use Cases

1. **B2B Cold Outreach & Account-Based Marketing (ABM):** Build targeted lists of German SMBs, craftsmen, solar installers, IT agencies, or tax advisors.
2. **Local Sales & Agency Lead Generation:** Find service businesses in specific cities (*München*, *Berlin*, *Hamburg*, *Leipzig*) or 5-digit postal code clusters.
3. **Automated Impressum & KYB Pipeline:** Automatically feed discovered domains into our **German Impressum Enricher** to extract CEOs, HRB numbers, and VAT IDs, followed by insolvency audits in our **KYB Actor**.
4. **Market & Industry Research:** Analyze local business density, trade specialties, and review ratings across Germany.

***

### 📥 Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `search_terms` | `array` | `["Elektroinstallation", "Solaranlagen"]` | List of trades, professions, products, or industry keywords (e.g. `["Steuerberater", "Dachdecker"]`). |
| `locations` | `array` | `["München", "Leipzig"]` | German cities, regions, or 5-digit postal codes (e.g. `["Berlin", "80331"]`). |
| `query` | `string` | `null` | Single search term alternative for simple integrations. |
| `location` | `string` | `null` | Single location alternative. |
| `require_website` | `boolean` | `false` | If `true`, only leads with a verified company domain are returned and charged. |
| `require_phone` | `boolean` | `false` | If `true`, only leads with a verified telephone number are returned and charged. |
| `include_details` | `boolean` | `true` | Visits directory detail pages to extract additional direct corporate emails, descriptions, and extended contact channels. |
| `max_items` | `integer` | `50` | Maximum total leads to extract and charge (strict budget limit, 1 to 5,000). |
| `proxyConfiguration` | `object` | `null` | Optional Apify proxy configuration for enterprise-scale runs. |

#### Example Input (`input.json`)

```json
{
  "search_terms": [
    "Elektroinstallation",
    "Solaranlagen"
  ],
  "locations": [
    "München"
  ],
  "require_website": true,
  "require_phone": true,
  "include_details": true,
  "max_items": 25
}
```

***

### 📤 Output Dataset Schema

Each lead is pushed directly to the default dataset:

```json
{
  "lead_id": "5c8c87af38ac8840",
  "company_name": "Bleumortier Elektro GmbH",
  "category": "Elektroinstallation",
  "industries": [
    "Elektroinstallation"
  ],
  "website": "https://www.elektro-bleumortier.de/",
  "domain": "elektro-bleumortier.de",
  "phone": "089 22 31 11",
  "street": "Ledererstr. 17",
  "postal_code": "80331",
  "city": "München",
  "state": "Bayern",
  "country": "DE",
  "rating_value": 5,
  "review_count": 1,
  "description": "Ihr zuverlässiger Elektriker Meisterbetrieb für München. Elektro Bleumortier GmbH ist seit 1933 ihr kompetenter und zuverlässiger Meisterbetrieb...",
  "search_term": "Elektroinstallation",
  "search_location": "München",
  "source": "gelbeseiten",
  "source_url": "https://www.gelbeseiten.de/gsbiz/97e88b26-8d5c-4230-b4e8-6eeb190f88ef",
  "scraped_at": "2026-10-29T07:23:42.361965+00:00"
}
```

#### Realistic Field Coverage & Enrichment Pipeline

| Field | Typical Coverage | Source & Availability |
|---|---|---|
| `company_name` | **100%** | Directory listing title with legal form protection |
| `street`, `postal_code`, `city` | **~98%** | German address with verified 5-digit PLZ |
| `state` | **~99%** | Deterministic German Bundesland mapping from PLZ |
| `phone` | **~90%** | Standardized German telephone number (auto-decoded Base64 `data-prg`) |
| `website` & `domain` | **~85%** | De-obfuscated clean company website (excluding directory tracking links) |
| `rating_value` & `review_count` | **~20%** | Genuine customer feedback scores from directory |
| `email` | **~5-15%** | Direct business email when published on 11880 JSON-LD. *(Note: Gelbe Seiten does not publicly expose raw email addresses to prevent spam. For 100% email & management contact coverage, pipe the extracted `domain` into our **German Impressum Enricher Actor #5**!)* |

***

### 🔒 Strict Pay-Per-Event (PPE) Guarantee ($0.008 / Lead)

- Charged strictly at **$0.008 USD per valid extracted lead** (`event_name: "lead-scraped"`).
- If `require_website: true` or `require_phone: true` is enabled, records missing those fields are **never charged ($0.00)**.
- Budget Cap: Scraping stops immediately once `max_items` is reached.
- Empty or invalid inputs trigger an immediate zero-cost error exit.

***

### 🤖 AI Agents (MCP), n8n & Make.com Integrations

#### 1. Model Context Protocol (MCP) for Claude Desktop & Cursor AI

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "apify-german-b2b-leads": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "AGrunert/german-b2b-leads-directory-scraper"
      ],
      "env": {
        "APIFY_TOKEN": "YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

#### 2. 1-Click Synchronous API (cURL, n8n, Make.com)

```bash
curl -X POST "https://api.apify.com/v2/acts/AGrunert~german-b2b-leads-directory-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"search_terms":["Elektroinstallation"],"locations":["München"],"require_website":true,"max_items":10}'
```

#### 3. Pre-Built Workflow Templates in Repository (`integrations/`)

- **`integrations/n8n_workflow.json`**: Automated 3-step pipeline chaining **Actor #6 (Lead Finder) $\rightarrow$ Actor #5 (Impressum Enricher) $\rightarrow$ Actor #2 (KYB Handelsregister)**.
- **`integrations/make_com_blueprint.json`**: Official Make.com blueprint to scrape leads and pipe domains into your CRM or Google Sheets.
- **`integrations/mcp_claude_cursor_config.json`**: Manifest for Claude Desktop and Cursor AI.

***

### 🔗 Complete German B2B, Compliance & PropTech Suite by AGrunert

Combine our specialized German business actors to build end-to-end automated pipelines for B2B lead generation, corporate due diligence, public procurement, real estate intelligence, and tax-compliant e-invoicing:

| Actor | Category & Pricing | Key Capabilities | Preconfigured Public Tasks |
| :--- | :--- | :--- | :--- |
| [**German B2B Leads, Crafts & Business Directory Scraper**](https://apify.com/AGrunert/german-b2b-leads-directory-scraper) *(Current Actor)* | **Lead Generation**<br>`$0.008 / lead` ($8.00 / 1k) | Multi-query round-robin extraction across German business directories (`11880`, `Gelbe Seiten`), verified E.164 phone numbers (97.5% coverage), and domain verification (`require_website: true`). | • [German Crafts, Solar & Construction Lead Finder](https://apify.com/AGrunert/german-crafts-trades-lead-finder)<br>• [German B2B Company & Domain Finder](https://apify.com/AGrunert/german-b2b-domains-for-impressum-enrichment) |
| [**German & DACH B2B Impressum, Contact & Legal Enricher (§ 5 DDG)**](https://apify.com/AGrunert/german-impressum-b2b-lead-enricher) | **Data Enrichment**<br>`$0.005 / domain` ($5.00 / 1k) | Automatic legal notice discovery (§ 5 DDG / § 25 MedienG), de-obfuscation of executive emails, management board/CEOs, court & registration number (`HRB`), VAT ID (`DE...`), and social profiles. | • [German B2B Impressum, CEO & Contact Extractor](https://apify.com/AGrunert/german-b2b-impressum-contact-extractor)<br>• [DACH Website to Handelsregister & VAT ID Enricher](https://apify.com/AGrunert/impressum-to-handelsregister-kyb-enricher) |
| [**German Company KYB, Handelsregister & Insolvency Scraper**](https://apify.com/AGrunert/german-company-kyb-insolvency-scraper) | **Risk & Compliance**<br>`$0.025 / check` ($25.00 / 1k) | Official XJustiz 3.5.1 extraction (directors, share capital, business purpose, court) + live insolvency check (`insolvenzbekanntmachungen.de`) with bulk company list support. | • [Complete German KYB Audit](https://apify.com/AGrunert/full-kyb-audit)<br>• [Fast German Insolvency Screener](https://apify.com/AGrunert/fast-insolvency-screener)<br>• [Bulk German Company KYB Batch Check](https://apify.com/AGrunert/bulk-kyb-batch-check) |
| [**German Public Tenders & Procurement Scraper (`service.bund.de`)**](https://apify.com/AGrunert/german-public-tenders-vergabe-scraper) | **B2B Tenders & Contracts**<br>`$0.010 / tender` ($10.00 / 1k) | Daily procurement monitoring across Bund, Länder & Kommunen; zero false positives (filters AI Bietercockpit boilerplates); direct `/unterlagen/` download URLs and submission deadlines (date + time). | • [German IT, Software & AI Public Tenders Monitor](https://apify.com/AGrunert/german-it-software-public-tenders)<br>• [German Construction & Facility Management Tenders](https://apify.com/AGrunert/german-construction-facility-tenders) |
| [**German Real Estate Foreclosure & ZVG-Portal Scraper**](https://apify.com/AGrunert/german-real-estate-foreclosure-zvg-scraper) | **PropTech & Real Estate**<br>`$0.010 / property` ($10.00 / 1k) | Bulk extraction of foreclosure auctions (`zvg-portal.de`) across all 16 states, multi-parcel market value parser (`float`), and direct PDF appraisal links (*Verkehrswertgutachten*). | • [German Foreclosure Real Estate Finder](https://apify.com/AGrunert/german-foreclosures-sample-search)<br>• [High-Value German Foreclosures (> 250k EUR)](https://apify.com/AGrunert/high-value-commercial-residential-foreclosures) |
| [**German E-Invoice (ZUGFeRD / Factur-X / XRechnung 3.0) Suite**](https://apify.com/AGrunert/german-e-invoice-zugferd-xrechnung-suite) | **Finance & Invoicing**<br>`$0.035 / invoice` ($35.00 / 1k) | Generate DIN-5008 compliant PDF/A-3 invoices from JSON, embed CII XML, and validate with official KoSIT Schematron & EN 16931 rules. | *Standalone API & Batch Suite* |

#### 💡 Multi-Actor Chain Workflows & Synergy Pipelines

- **Pipeline 1 (Top-of-Funnel Lead-to-Audit Engine):**\
  Discover companies & crafts via [**German B2B Directory Scraper**](https://apify.com/AGrunert/german-b2b-leads-directory-scraper) $\rightarrow$ Enrich managing directors, direct emails, and HRB numbers via [**German Impressum Enricher**](https://apify.com/AGrunert/german-impressum-b2b-lead-enricher) $\rightarrow$ Verify solvency, officers, and share capital via [**German KYB Scraper**](https://apify.com/AGrunert/german-company-kyb-insolvency-scraper).
- **Pipeline 2 (Public Tender Win to Compliant Billing):**\
  Monitor federal procurement opportunities via [**German Public Tenders Scraper**](https://apify.com/AGrunert/german-public-tenders-vergabe-scraper) $\rightarrow$ Win bid $\rightarrow$ Bill public authorities with compliant EN 16931 XRechnung 3.0 via [**German E-Invoice Suite**](https://apify.com/AGrunert/german-e-invoice-zugferd-xrechnung-suite).
- **Pipeline 3 (Real Estate Foreclosure Due Diligence):**\
  Scrape upcoming foreclosures via [**German Real Estate Foreclosure Scraper**](https://apify.com/AGrunert/german-real-estate-foreclosure-zvg-scraper) $\rightarrow$ Check creditor/owner companies via [**German KYB Scraper**](https://apify.com/AGrunert/german-company-kyb-insolvency-scraper).

***

#### 💡 Multi-Actor Synergy: Top-of-Funnel Lead Gen to Insolvency Audit

```mermaid
flowchart LR
    A["Actor #6: B2B Leads Scraper<br>Query 'Elektroinstallation München'<br>(require_website: true)"] --> B["Actor #5: German Impressum Enricher<br>Feed extracted domains<br>Extract CEO, HRB & Amtsgericht"]
    B --> C["Actor #2: German KYB Scraper<br>Verify official register &<br>live insolvency status"]
    C --> D["Qualified B2B Leads in CRM:<br>CEO, Direct Email, Phone,<br>Verified Capital & Active Solvency"]
```

# Actor input Schema

## `search_terms` (type: `array`):

List of trades, professions, products, or industry keywords (e.g. \['Elektroinstallation', 'Solaranlagen', 'Steuerberater', 'Dachdecker']).

## `locations` (type: `array`):

German cities, regions, or 5-digit postal codes (e.g. \['München', 'Leipzig', 'Berlin', '80331']).

## `query` (type: `string`):

Alternative single search term if search_terms array is not used.

## `location` (type: `string`):

Alternative single location if locations array is not used.

## `require_website` (type: `boolean`):

If true, only businesses with an existing company website / domain are extracted and charged. Perfect for downstream Impressum & KYB enrichment.

## `require_phone` (type: `boolean`):

If true, only businesses with a verified telephone number are extracted and charged.

## `include_details` (type: `boolean`):

Visits directory detail pages concurrently to extract additional direct corporate emails (from 11880 JSON-LD), company descriptions, and verified contact channels.

## `max_items` (type: `integer`):

Maximum total number of valid leads to scrape and charge. Acts as a strict budget cap.

## `proxyConfiguration` (type: `object`):

Optional Apify Proxy settings for high-volume or distributed scraping.

## Actor input object example

```json
{
  "search_terms": [
    "Elektroinstallation",
    "Solaranlagen"
  ],
  "locations": [
    "München",
    "Leipzig"
  ],
  "require_website": false,
  "require_phone": false,
  "include_details": true,
  "max_items": 50
}
```

# Actor output Schema

## `datasetResults` (type: `string`):

No description

## `keyValueStore` (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 = {
    "search_terms": [
        "Elektroinstallation",
        "Solaranlagen"
    ],
    "locations": [
        "München",
        "Leipzig"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("agrunert/german-b2b-leads-directory-scraper").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 = {
    "search_terms": [
        "Elektroinstallation",
        "Solaranlagen",
    ],
    "locations": [
        "München",
        "Leipzig",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("agrunert/german-b2b-leads-directory-scraper").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 '{
  "search_terms": [
    "Elektroinstallation",
    "Solaranlagen"
  ],
  "locations": [
    "München",
    "Leipzig"
  ]
}' |
apify call agrunert/german-b2b-leads-directory-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agrunert/german-b2b-leads-directory-scraper"
        }
    }
}
```

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/3ZRXlvWuwEbiiI2aM/builds/2mMP0CKWrlkmMrRVz/openapi.json
