# Gelbe Seiten Scraper — German Business Leads, Emails & Phones (`haketa/gelbeseiten-scraper`) Actor

Extract German local business leads from GelbeSeiten.de. Collect company names, categories, phone numbers, verified direct emails, decoded websites, street addresses, postal codes (PLZ), GPS coordinates, opening hours, ratings, and keywords across every city in Germany.

- **URL**: https://apify.com/haketa/gelbeseiten-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

<h1 align="center">🇩🇪 Gelbe Seiten Scraper — German Business Leads, Emails & Phones</h1>

<p align="center">
  <img src="https://img.shields.io/badge/Platform-GelbeSeiten.de-FFDC00?style=for-the-badge&labelColor=111827" alt="GelbeSeiten.de" />
  <img src="https://img.shields.io/badge/Market-Germany%20B2B%20%26%20SMB-111827?style=for-the-badge" alt="Germany B2B" />
  <img src="https://img.shields.io/badge/Output-25%2B%20Structured%20Fields-2563EB?style=for-the-badge" alt="25+ Fields" />
  <img src="https://img.shields.io/badge/No--Code-Ready-10B981?style=for-the-badge" alt="No-Code Ready" />
  <img src="https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel-7C3AED?style=for-the-badge" alt="Export Formats" />
</p>

<p align="center">
  Extract verified German local business leads from <strong>GelbeSeiten.de</strong> — Germany's #1 Yellow Pages & B2B directory. Collect business names, industries, phone numbers, <strong>direct email addresses</strong>, decoded official websites, street addresses, 5-digit PLZ postal codes, GPS coordinates, opening hours, customer ratings, and service keywords in clean JSON, CSV, or Excel.
</p>

***

### ⚡ At a Glance

| Feature | Details |
|---|---|
| 🎯 **Best For** | DACH B2B lead generation, German SMB sales outreach, agency prospecting, local market & territory analysis |
| 🌍 **Coverage** | All of Germany — 20 major city presets + any custom town, municipality, 5-digit PLZ, or nationwide (`bundesweit`) |
| 📇 **Direct Contact Data** | Formatted phone numbers, **direct business email addresses**, decoded official websites & social profiles |
| 📍 **German Address Precision** | Cleanly separated `streetAddress`, 5-digit `postalCode` (PLZ), `city`, `district`, plus exact `latitude` & `longitude` |
| ⚙️ **No-Code UX** | Pick German cities from the dropdown + enter keywords (`zahnarzt`, `steuerberater`, `elektriker`) — zero coding needed |
| 🧹 **Clean Datasets** | Automatic pagination and strict deduplication by unique Gelbe Seiten business ID |

***

### 🚀 Why Use Gelbe Seiten Scraper?

Germany's Mittelstand and local service economy — dental practices, tax advisors (*Steuerberater*), law firms (*Rechtsanwälte*), tradespeople (*Handwerker*), medical clinics, real estate agencies, and local retailers — maintain their most accurate phone, address, and email records on **GelbeSeiten.de**.

This Actor turns German directory searches into outreach-ready CRM spreadsheets:

- **Direct public emails unlocked automatically:** Visits business profile pages (`includeDetails: true`) to pull direct `mailto:` contact addresses alongside official websites.
- **Decoded official websites right out of the box:** Automatically decodes obfuscated website links into clean, clickable `https://...` URLs ready for enrichment or outreach.
- **Complete German geographic breakdown:** Every record splits street address, 5-digit German **PLZ**, city, district (e.g., *Neukölln*, *Mitte*, *Schwabing*), and GPS coordinates.
- **Smart lead-quality filters:** Filter runs to keep only businesses with a phone number (`onlyWithPhone`), email address (`onlyWithEmail`), or website (`onlyWithWebsite`).
- **Flexible sorting & empty-input preview:** Sort by relevance, highest rating, or alphabetical order — or run with empty input `{}` to immediately sample top German SMB categories.

***

### 💼 High-Value Use Cases

| Use Case | How Teams Use This Data |
|---|---|
| 📞 **DACH B2B Cold Calling & Outreach** | Build clean call and email lists segmented by German industry (*Branche*), city, and 5-digit PLZ postal code. |
| 📧 **Targeted Email Campaigns** | Combine `includeDetails: true` with `onlyWithEmail: true` to export verified German SMB email contacts ready for CRM import. |
| 💻 **Agency & SaaS Prospecting** | Identify established local businesses (clinics, law firms, trades) with strong ratings but no website (`website: null`) or outdated profiles. |
| 🗺️ **Territory & Franchise Planning** | Analyze competitor density across Berlin, Munich, Hamburg, Cologne, Frankfurt, and regional towns using exact PLZ and GPS coordinates. |
| 🏷️ **Service Keyword Intelligence** | Extract each business's published `keywords` list (e.g. *Bleaching*, *Implantologie*, *Steuerberatung*) for hyper-personalized outreach. |
| 🔄 **CRM Enrichment & Verification** | Refresh German phone numbers, street addresses, and opening hours for existing B2B accounts automatically on a schedule. |

***

### 🧭 How It Works (3 Simple Steps)

1. **Select industry & city:** Enter one or more German keywords (e.g., `zahnarzt`, `steuerberater`, `rechtsanwalt`, `handwerker`), pick major German cities from the dropdown (or type any town/PLZ in `customCities`), or paste direct GelbeSeiten.de URLs.
2. **Choose enrichment & filters:** Leave **Enrich from business profile page** (`includeDetails: true`) enabled to capture direct emails, opening hours, GPS coordinates, and keywords — or disable it for ultra-fast listing snapshots.
3. **Run & export:** Click **Start**, then export structured data as **Excel (`.xlsx`), CSV, JSON**, or connect directly via API and webhooks.

***

### ⚙️ Input Parameters

All parameters are optional — none are required.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | `string[]` | `["zahnarzt", "steuerberater"]` | Business types or industries (`WAS`) to search across Germany. |
| `cities` | `string[]` (Dropdown) | `["berlin"]` | Pick from 20 major German cities (`berlin`, `muenchen`, `hamburg`, `koeln`, `frankfurt-am-main`, `stuttgart`, etc.). |
| `customCities` | `string[]` | `[]` | Add any German town, district, or 5-digit PLZ (e.g., `augsburg`, `freiburg`, `10117`). |
| `startUrls` | `object[]` | `[]` | Optional direct GelbeSeiten.de search URLs or `/gsbiz/` business profile URLs. |
| `sortBy` | `string` (Dropdown) | `"relevanz"` | Sort order: `relevanz` (Relevance), `bewertung` (Highest Rating), or `name` (Alphabetical). |
| `maxItems` | `integer` | `100` (prefill `40`) | Maximum total unique businesses to collect across all targets (1–25,000). |
| `includeDetails` | `boolean` | `true` | Visits each business profile to extract direct email, opening hours, GPS coordinates, keywords, and full description. |
| `onlyWithPhone` | `boolean` | `false` | Keep only businesses that publish a phone number. |
| `onlyWithEmail` | `boolean` | `false` | Keep only businesses with a direct public email address (`includeDetails: true` recommended). |
| `onlyWithWebsite` | `boolean` | `false` | Keep only businesses that publish an official website URL. |
| `proxyConfiguration` | `object` | Apify Proxy (on) | Standard Apify datacenter proxies work cleanly for high-volume extraction. |

#### Example Input Configurations

<details>
<summary>🦷 Dentists & Tax Advisors in Berlin & Munich (Full Email + Hours Enrichment)</summary>

```json
{
  "searchQueries": ["zahnarzt", "steuerberater"],
  "cities": ["berlin", "muenchen"],
  "sortBy": "relevanz",
  "maxItems": 200,
  "includeDetails": true,
  "onlyWithPhone": true
}
```

</details>

<details>
<summary>⚖️ Law Firms in Smaller Regional Cities (Email-Only Outreach List)</summary>

```json
{
  "searchQueries": ["rechtsanwalt"],
  "customCities": ["freiburg", "heidelberg", "karlsruhe", "augsburg"],
  "sortBy": "bewertung",
  "maxItems": 150,
  "includeDetails": true,
  "onlyWithEmail": true
}
```

</details>

<details>
<summary>⚡ Fast Nationwide Snapshot (Listing Cards Only)</summary>

```json
{
  "searchQueries": ["immobilienmakler"],
  "cities": ["hamburg", "koeln", "frankfurt-am-main"],
  "maxItems": 500,
  "includeDetails": false
}
```

</details>

***

### 📦 Output Schema & Field Reference

#### 🏢 Business Identity & Classification

| Field | Type | Coverage | Description |
|---|---|---|---|
| `id` | `string` | 🟢 100% | Unique Gelbe Seiten business UUID |
| `name` | `string` | 🟢 100% | Business or practice name |
| `category` | `string` | 🟢 ~98% | Primary German industry category (*Branche*) |
| `keywords` | `string[]` | 🟡 ~60–85% (with details) | Listed specialties and service keywords |
| `description` | `string` | 🟡 ~55–80% (with details) | Full business overview and services text |
| `logoUrl` | `string` | 🟡 When published | Business logo URL |
| `url` | `string` | 🟢 100% | Direct GelbeSeiten.de `/gsbiz/` profile URL |

#### 📇 Direct Contact Channels

| Field | Type | Coverage | Description |
|---|---|---|---|
| `phone` | `string` | 🟢 ~98–100% | Formatted German phone number |
| `email` | `string` | 🟡 ~55–85% (with details) | Direct public business email address |
| `website` | `string` | 🟢 ~70–90% | Decoded official business website URL |
| `facebookUrl` | `string` | ⚪ When published | Official Facebook page URL |
| `instagramUrl` | `string` | ⚪ When published | Official Instagram profile URL |
| `linkedinUrl` | `string` | ⚪ Rare | Official LinkedIn profile URL |

#### 📍 German Address & Geolocation

| Field | Type | Coverage | Description |
|---|---|---|---|
| `streetAddress` | `string` | 🟢 ~98% | Street name and house number |
| `postalCode` | `string` | 🟢 ~99% | 5-digit German PLZ postal code |
| `city` | `string` | 🟢 100% | City or municipality name |
| `district` | `string` | 🟡 ~50–80% | City district (*Stadtteil*, e.g. `Neukölln`, `Mitte`) |
| `country` | `string` | 🟢 100% | ISO country code (`DE`) |
| `fullAddress` | `string` | 🟢 ~99% | Complete formatted German address |
| `latitude` | `number` | 🟢 ~95% (with details) | GPS latitude coordinate |
| `longitude` | `number` | 🟢 ~95% (with details) | GPS longitude coordinate |

#### ⭐ Reputation & Operations

| Field | Type | Coverage | Description |
|---|---|---|---|
| `rating` | `number` | 🟡 When rated | Average customer star rating (1.0–5.0) |
| `reviewCount` | `number` | 🟡 When rated | Total number of published customer reviews |
| `openingHours` | `string[]` | 🟡 ~50–80% (with details) | Structured German opening hours (e.g. `Mo 08:00-18:00`) |

#### Sample JSON Output

```json
{
  "id": "5f06ccb6-068f-4b36-91a4-63113f066676",
  "name": "Zahnarztpraxis Petra Hartmann",
  "category": "Zahnärzte",
  "phone": "030 6 24 31 33",
  "email": "info@zahnaerztin-neukoelln.de",
  "website": "https://www.zahnaerztin-neukoelln.de",
  "streetAddress": "Friedelstr. 14",
  "postalCode": "12047",
  "city": "Berlin",
  "district": "Neukölln",
  "country": "DE",
  "fullAddress": "Friedelstr. 14, 12047 Berlin (Neukölln)",
  "latitude": 52.49412,
  "longitude": 13.42874,
  "rating": 4.9,
  "reviewCount": 35,
  "openingHours": [
    "Mo 12:00-18:00",
    "Di 08:00-15:00",
    "Mi 08:00-11:30",
    "Do 08:00-18:00"
  ],
  "keywords": [
    "Kieferorthopäde",
    "Zahnreinigung",
    "Bleaching",
    "Wurzelbehandlung"
  ],
  "description": "Ihr Zahnarzt in Berlin-Neukölln — moderne Zahnmedizin und persönliche Betreuung.",
  "facebookUrl": null,
  "instagramUrl": null,
  "linkedinUrl": null,
  "logoUrl": "https://ies.v4all.de/200/GS/0001/8/3338/70873338_maxhoehe_100.jpg",
  "url": "https://www.gelbeseiten.de/gsbiz/5f06ccb6-068f-4b36-91a4-63113f066676",
  "searchQuery": "zahnarzt",
  "searchCity": "berlin"
}
```

***

### 💻 Programmatic Usage (Node.js & Python)

<details>
<summary>Node.js (apify-client)</summary>

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('haketa/gelbeseiten-scraper').call({
    searchQueries: ['zahnarzt', 'steuerberater'],
    cities: ['berlin', 'muenchen'],
    maxItems: 150,
    includeDetails: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Collected ${items.length} German businesses`);
console.log('With email:', items.filter((b) => b.email).length);
console.log('With website:', items.filter((b) => b.website).length);
```

</details>

<details>
<summary>Python (apify-client)</summary>

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])

run = client.actor("haketa/gelbeseiten-scraper").call(run_input={
    "searchQueries": ["rechtsanwalt"],
    "cities": ["hamburg", "koeln"],
    "sortBy": "bewertung",
    "includeDetails": True,
    "onlyWithEmail": True,
    "maxItems": 200,
})

items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
for biz in items[:5]:
    print(biz["name"], "|", biz.get("phone"), "|", biz.get("email"), "|", biz.get("website"))
```

</details>

***

### 📊 Verified Field Coverage (Live Benchmark)

Across live multi-city German SMB extraction runs (`zahnarzt`, `steuerberater` in Berlin and Munich), **Gelbe Seiten Scraper** delivers clean deduplicated records with the following field coverage:

| Field Group | Verified Fill Rate | Notes |
|---|---|---|
| `id`, `name`, `category`, `url`, `country` | **100%** | Every business has a unique Gelbe Seiten UUID, trading name, industry, and `/gsbiz/` link |
| `phone`, `postalCode` (PLZ), `city`, `fullAddress` | **98–100%** | Direct German phone numbers and parsed 5-digit PLZ addresses |
| `website` | **~70–90%** | Automatically decoded from directory cards and enriched from profile pages |
| `email`, `latitude`, `longitude` | **~55–95%** | Populated from public business profiles when `includeDetails: true` |
| `openingHours`, `keywords`, `description` | **~55–85%** | Structured daily hours, specialty tags, and business descriptions from profile pages |
| `rating`, `reviewCount`, `district` | **Variable** | Populated whenever customer reviews or city district labels are present |

***

### 🎯 Field-by-Field Lead Quality Checklist

Before importing into your CRM or cold-email sequence, you can rely on these built-in data hygiene guarantees:

- **Clean decoded URLs:** Obfuscated website attributes are automatically Base64-decoded into clickable `https://` URLs with aggregator noise filtered out.
- **Pure business emails:** Query parameters (such as `?subject=Anfrage über Gelbe Seiten`) and directory support addresses are stripped automatically so `email` is outreach-ready.
- **Distance-stripped German addresses:** Trailing proximity strings (e.g., `4,5 km`) are cleaned before parsing street, 5-digit PLZ, city, and *Stadtteil* (`district`).
- **Zero duplicate rows:** Every company is deduplicated by its unique Gelbe Seiten UUID across initial listings and paginated batches.

***

### 💡 Best Practices & Tips

> \[!TIP]
> **Use German industry names (*Branchen*) for highest coverage.** Searching `steuerberater` instead of `tax advisor`, `zahnarzt` instead of `dentist`, or `handwerker` instead of `contractor` unlocks thousands more listings per city.

- **Fast website + phone lists vs. full email enrichment:** Even with `includeDetails: false`, you get business name, category, phone number, decoded official website, full address, PLZ, and rating. Enable `includeDetails: true` whenever you also want **direct email addresses, opening hours, GPS coordinates, and service keywords**.
- **Split large nationwide campaigns by city or PLZ:** Instead of a single huge nationwide search, select multiple cities from the dropdown (or list regional towns in `customCities`) for deeper coverage and faster pagination.
- **Automatic deduplication:** Every business is deduplicated by its Gelbe Seiten UUID within a run, even when overlapping industries or adjacent cities return the same company.

***

### 🔌 Integrations & Automation

- **CRM & Cold-Email Stacks:** Export clean `.csv` / `.xlsx` sheets directly into HubSpot, Pipedrive, Salesforce, Clay, Lemlist, or Instantly.
- **Make, Zapier & n8n:** Run weekly or monthly schedules to discover newly registered German SMBs and send leads straight to Google Sheets or Slack.
- **Apify API & Webhooks:** Power internal DACH enrichment pipelines or territory analytics dashboards directly from the dataset API.

***

### ❓ Frequently Asked Questions

#### How does the Actor extract email addresses?

When `includeDetails` is enabled (on by default), the Actor visits each business's public Gelbe Seiten profile page and extracts the published direct contact email alongside structured opening hours, GPS coordinates, and keywords.

#### Are business websites extracted even when `includeDetails` is false?

Yes. Official websites are decoded directly from the search result cards as well as enriched from profile pages when `includeDetails: true`.

#### Can I target small German towns or specific PLZ postal codes?

Yes. Enter any town name or 5-digit German PLZ (e.g., `10117`, `80331`, `freiburg`, `potsdam`) into **Additional German cities, towns, or PLZ** (`customCities`).

#### What happens if I run the Actor with empty input?

When no keywords, cities, or URLs are supplied, the Actor automatically collects a curated sample of German businesses across Berlin, Munich, Hamburg, and Cologne (`zahnarzt`, `steuerberater`, `rechtsanwalt`, `elektriker`) up to 100 unique records.

#### How are duplicates handled across multiple cities or searches?

Every record is deduplicated by its unique Gelbe Seiten business ID (`id`) within each run, guaranteeing zero duplicate rows in your export.

***

### ⚠️ Limitations

- **Publicly listed businesses only:** Contact details (such as email or opening hours) are only returned when published on the business's Gelbe Seiten profile.
- **Pagination depth per query:** For very broad nationwide terms with tens of thousands of listings, splitting by major cities or PLZ ranges yields the most complete dataset.

***

### 📝 Changelog

#### v0.1.0 (2026-11-23)

- Initial release of **Gelbe Seiten Scraper**.
- Added industry keyword search (`WAS`), 20 German city presets (`WO`), custom town/PLZ support, sort options (`relevanz`, `bewertung`, `name`), and direct GelbeSeiten.de URL support.
- Added automatic website link decoding plus full profile enrichment for direct email addresses, GPS coordinates, opening hours, service keywords, and descriptions.
- Added `onlyWithPhone`, `onlyWithEmail`, and `onlyWithWebsite` filters plus automatic business ID deduplication.

# Actor input Schema

## `searchQueries` (type: `array`):

German or English business types or keywords to search (for example: 'zahnarzt', 'steuerberater', 'rechtsanwalt', 'elektriker', 'restaurant', 'immobilienmakler'). Leave empty for a curated German SMB mix.

## `cities` (type: `array`):

Select one or more major German cities. Combine with custom cities below to target any smaller town or 5-digit PLZ.

## `customCities` (type: `array`):

Enter any German city, town, or 5-digit postal code not in the dropdown (for example: 'augsburg', 'freiburg', 'karlsruhe', '10117').

## `startUrls` (type: `array`):

Paste direct GelbeSeiten.de search URLs (e.g. https://www.gelbeseiten.de/suche/zahnarzt/berlin) or individual /gsbiz/ profile URLs.

## `sortBy` (type: `string`):

Order in which Gelbe Seiten returns results.

## `maxItems` (type: `integer`):

Total maximum unique businesses to collect across all searches, cities, and URLs.

## `includeDetails` (type: `boolean`):

Visits each business's /gsbiz/ profile page to extract direct email address, structured opening hours, GPS coordinates, industry keywords, and full description.

## `onlyWithPhone` (type: `boolean`):

Keep only businesses that publish a phone number.

## `onlyWithEmail` (type: `boolean`):

Keep only businesses with a public email address (requires profile enrichment enabled).

## `onlyWithWebsite` (type: `boolean`):

Keep only businesses that publish an official website URL.

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

Proxy settings for fast, reliable extraction at scale. Standard Apify datacenter proxies work cleanly.

## Actor input object example

```json
{
  "searchQueries": [
    "zahnarzt",
    "steuerberater"
  ],
  "cities": [
    "berlin"
  ],
  "customCities": [],
  "startUrls": [],
  "sortBy": "relevanz",
  "maxItems": 40,
  "includeDetails": true,
  "onlyWithPhone": false,
  "onlyWithEmail": false,
  "onlyWithWebsite": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `businesses` (type: `string`):

All extracted GelbeSeiten.de business records with deduplicated IDs, contact details, addresses, and ratings.

# 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 = {
    "searchQueries": [
        "zahnarzt",
        "steuerberater"
    ],
    "cities": [
        "berlin"
    ],
    "customCities": [],
    "startUrls": [],
    "sortBy": "relevanz",
    "maxItems": 40,
    "includeDetails": true,
    "onlyWithPhone": false,
    "onlyWithEmail": false,
    "onlyWithWebsite": false,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/gelbeseiten-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 = {
    "searchQueries": [
        "zahnarzt",
        "steuerberater",
    ],
    "cities": ["berlin"],
    "customCities": [],
    "startUrls": [],
    "sortBy": "relevanz",
    "maxItems": 40,
    "includeDetails": True,
    "onlyWithPhone": False,
    "onlyWithEmail": False,
    "onlyWithWebsite": False,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/gelbeseiten-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 '{
  "searchQueries": [
    "zahnarzt",
    "steuerberater"
  ],
  "cities": [
    "berlin"
  ],
  "customCities": [],
  "startUrls": [],
  "sortBy": "relevanz",
  "maxItems": 40,
  "includeDetails": true,
  "onlyWithPhone": false,
  "onlyWithEmail": false,
  "onlyWithWebsite": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call haketa/gelbeseiten-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,haketa/gelbeseiten-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/tN7vMAHoT6Zpbekqf/builds/5nirVsIgvAYXXeApy/openapi.json
