# German B2B Leads: Gelbe Seiten + Das Telefonbuch & Impressum (`b2b-datalabs/gelbeseiten-dastelefonbuch-b2b-leads-scraper`) Actor

2-in-1 German B2B directory scraper for GelbeSeiten.de & DasTelefonbuch.de with § 5 DDG Impressum KYB enrichment. Extracts phones, decoded websites, direct emails, CEO/Geschäftsführer, VAT ID (USt-IdNr.), HRB/HRA register, court & LinkedIn with field-level source URLs.

- **URL**: https://apify.com/b2b-datalabs/gelbeseiten-dastelefonbuch-b2b-leads-scraper.md
- **Developed by:** [Giovanni Cappello](https://apify.com/b2b-datalabs) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 company 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

## German B2B Leads: Gelbe Seiten + Das Telefonbuch, Email & Impressum KYB

**Find German companies in two directories, then turn their websites into source-backed business records.** Search GelbeSeiten.de and DasTelefonbuch.de together and collect phones, addresses, company websites, business emails, Geschäftsführer/CEO names, VAT IDs, register details and social profiles.

A **2-in-1 German B2B directory scraper + § 5 DDG Impressum KYB & CEO engine** for agency prospect research, CRM enrichment and AI workflows. Export JSON, CSV or Excel through Apify; keep source URLs alongside the data your team uses.

- **One company list across two sources:** cross-portal deduplication, balanced collection and unused quota transferred to the remaining directory.
- **German legal context:** representatives such as Geschäftsführer, Inhaber and Vorstand; USt-IdNr., HRB/HRA/VR/PR, Amtsgericht and German register references.
- **Evidence you can inspect:** legal name, field-level URLs, enrichment status and identity-matching status. Unsupported or missing values remain `null`.
- **All-inclusive Pay-Per-Event pricing:** $0.003 per saved company, plus $0.008 once when eligible website enrichment is found. No per-field fee and no separate platform usage pass-through.

**Start with 20 companies:** keep the defaults, run, then review the **Company contacts** and **Legal identity and provenance** views before scaling. The maximum price for 20 fully enriched companies is **$0.22** ($0.06–$0.22 depending on website coverage).

### Quick start

1. Select both directories (`ALL`), a German category and a city or postal code.
2. Keep website enrichment on to look for email, representatives, VAT/register details and company social profiles.
3. Run with 512 MB. Review `identityStatus`, `enrichmentStatus` and source links; download JSON/CSV/Excel or send records to your CRM.

````json
{
  "portal": "ALL",
  "searchQuery": "Software",
  "location": "München",
  "maxItems": 20,
  "extractEmailsAndSocials": true
}



# Actor input Schema

## `portal` (type: `string`):

ALL balances unique accepted records across both directories; unused quota transfers when one source ends.
## `searchQuery` (type: `string`):

German category or business keyword, such as Software, Steuerberater or Maschinenbau.
## `location` (type: `string`):

Location used by the source directories. Nearby towns may appear in directory results.
## `maxItems` (type: `integer`):

Maximum unique company records to save (1–5,000). Start with 20. Availability and your run budget may reduce the result count. Base event: $0.003 per saved company.
## `extractEmailsAndSocials` (type: `boolean`):

Find source-backed business email, legal representatives, VAT/register details and social profiles on company websites and Impressum pages. $0.008 once per eligible company, regardless of field count; $0.000 extra when no eligible data is found. Identity matching is heuristic, not an official registry or email-deliverability check.
## `deduplicationMode` (type: `string`):

company: normalized legal name plus host or postal code. PPE runs require company mode to avoid billing multiple locations of the same matched company. location: name plus full street/postal address; unmonetized tests only.
## `useApifyProxy` (type: `boolean`):

Uses the account default Apify proxy configuration only for directory search pages; company sites and robots.txt requests are direct. No residential proxy is selected by this code.
## `enrichmentConcurrency` (type: `integer`):

Maximum active website crawls and batch size. The cache shares concurrent downloads of the same site.
## `requestTimeoutSecs` (type: `integer`):

Timeout of an individual company-site request; the total site deadline also applies.
## `siteTimeoutSecs` (type: `integer`):

Includes robots, DNS, redirects, sitemaps and all page requests. Partial evidence is retained on timeout.
## `maxRequestsPerSite` (type: `integer`):

Includes robots, redirects, TLS retry and sitemaps, limiting failure-path cost.
## `maxPagesPerSite` (type: `integer`):

Successful distinct HTML pages. A complete legal page may stop exploration earlier.
## `maxPagesPerPortal` (type: `integer`):

Safety limit; repeated pages stop pagination. Explicit next links take precedence over the guarded legacy URL pattern.
## `maxResponseBytes` (type: `integer`):

Abort downloads above this bound before buffering the entire response. Large pages are reported as body_too_large.
## `requestDelayMillis` (type: `integer`):

Minimum interval between requests to one host; a larger robots crawl-delay takes precedence.
## `respectRobotsTxt` (type: `boolean`):

Check published robots.txt rules on company websites (directory searches are unaffected). Disable only where you have authorization to fetch restricted website paths.
## `allowInsecureTls` (type: `boolean`):

Only after a certificate validation error, retry that company host once without certificate verification. Explicitly flagged fields from this recovery cannot trigger the enrichment fee. Directory TLS remains verified.

## Actor input object example

```json
{
  "portal": "ALL",
  "searchQuery": "Software",
  "location": "München",
  "maxItems": 20,
  "extractEmailsAndSocials": true,
  "deduplicationMode": "company",
  "useApifyProxy": true,
  "enrichmentConcurrency": 10,
  "requestTimeoutSecs": 5,
  "siteTimeoutSecs": 25,
  "maxRequestsPerSite": 16,
  "maxPagesPerSite": 5,
  "maxPagesPerPortal": 250,
  "maxResponseBytes": 2097152,
  "requestDelayMillis": 150,
  "respectRobotsTxt": true,
  "allowInsecureTls": false
}
````

# Actor output Schema

## `results` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `diagnostics` (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 = {
    "searchQuery": "Software",
    "location": "München"
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b-datalabs/gelbeseiten-dastelefonbuch-b2b-leads-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 = {
    "searchQuery": "Software",
    "location": "München",
}

# Run the Actor and wait for it to finish
run = client.actor("b2b-datalabs/gelbeseiten-dastelefonbuch-b2b-leads-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 '{
  "searchQuery": "Software",
  "location": "München"
}' |
apify call b2b-datalabs/gelbeseiten-dastelefonbuch-b2b-leads-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b-datalabs/gelbeseiten-dastelefonbuch-b2b-leads-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/rAZafGq6bWWWLujRk/builds/f6h5AIvS8Ul1nzCaH/openapi.json
