# Gelbe Seiten Scraper - German Business Directory (`datascraperes/gelbe-seiten-business-directory`) Actor

Search Gelbe Seiten by business type, German city, postal code or district. Export one row per unique listing with addresses, phones, websites and optional weekly opening hours.

- **URL**: https://apify.com/datascraperes/gelbe-seiten-business-directory.md
- **Developed by:** [DataScraperES](https://apify.com/datascraperes) (community)
- **Categories:** Lead generation, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.75 / 1,000 business listings

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

Find public business listings in Germany on Gelbe Seiten. Search by trade and location, narrow a city search to selected districts, or both, and export **one row per unique listing**.

### What this Actor does

The Actor searches the Gelbe Seiten directory and adds matching businesses to your Dataset. Each row includes the business name and profile link along with the address, category, phone, fax, website and map coordinates when published. Enable weekly opening hours to fetch the full schedule for every listing.

### Use cases

- Compare businesses of the same trade across German cities using separate searches.
- Build a list of suppliers with public business phone numbers, fax numbers and websites.
- Collect published opening hours and coordinates for businesses in a selected area.

### How to use

1. Open the Actor in Apify Console.
2. Enter a business type or name and a German city or postal code.
3. Optionally add city districts to run one search per district.
4. Click **Start** and open the Dataset when the run finishes.

### Input

| Field | Required | Description |
|---|---|---|
| `keyword` | Yes | Business type or name, such as `Zahnarzt`. |
| `location` | Yes | German city or postal code, such as `Berlin` or `10115`. Enter a city for district searches. |
| `maxResults` | No | Save up to 500 listings. Default 100 listings, minimum one. |
| `includeDetails` | No | Fetch the complete weekly opening hours for every listing. Adds one extra lookup per listing, so runs with details take longer. Defaults to false. |
| `districts` | No | Up to 10 district names. For example, enter `Berlin` as the city and add `Neukölln` and `Kreuzberg`. |

```json
{
  "keyword": "Zahnarzt",
  "location": "Berlin",
  "maxResults": 5,
  "includeDetails": false,
  "districts": []
}
```

### Output

Each Dataset row represents one listing identified by `realId`. Export the Dataset as JSON, CSV or Excel. The run summary reports how many listings were saved and why collection stopped. If a request interrupts the run, previously saved rows remain available.

```json
{
  "realId": "5f06ccb6-068f-4b36-91a4-63113f066676",
  "name": "Zahnarztpraxis Petra Hartmann",
  "category": "Zahnärzte",
  "street": "Friedelstr. 14",
  "postalCode": "12047",
  "city": "Berlin",
  "phone": "030 6 24 31 33",
  "website": "https://www.zahnaerztin-neukoelln.de",
  "profileUrl": "https://www.gelbeseiten.de/gsbiz/5f06ccb6-068f-4b36-91a4-63113f066676",
  "fax": null,
  "latitude": 52.489548,
  "longitude": 13.42804,
  "openingHours": []
}
```

With `includeDetails` enabled, `openingHours` contains the weekly schedule, for example `["Montag 12:00-18:00", "Freitag Ruhetag"]`.

### Pricing

The pay-per-event unit is one unique listing saved to the Dataset. Duplicate listings, listings beyond `maxResults` and runs that end without results do not create a charge.

| Plan | Price per listing | Equivalent per 1,000 listings |
|---|---:|---:|
| Free | $0.001 | $1.00 |
| Bronze | $0.0009 | $0.90 |
| Silver | $0.0008 | $0.80 |
| Gold | $0.00075 | $0.75 |
| Platinum | $0.00075 | $0.75 |
| Diamond | $0.00075 | $0.75 |

The actual charge is per saved listing. The 1,000-listing column is a comparison equivalent, not a separate billing unit.

### Related Actors

| Actor | Best for |
|---|---|
| [YellowPages.ca Scraper - Canadian Business Leads](https://apify.com/datascraperes/yellowpages-ca-business-scraper) | Search the Canadian Yellow Pages in English or French. |
| [Yellow Pages US Scraper — Business Details & Reviews](https://apify.com/datascraperes/yellowpages-mobile-api-scraper) | Find US Yellow Pages listings with optional reviews and photos. |

### Limits and data quality

Coverage depends on Gelbe Seiten and the search you enter. Missing directory fields are null and opening hours are an empty list when the business has not published them. The results are a snapshot of the source at run time. The result cap is a maximum and the directory may return fewer matches. If the source temporarily restricts access, the run stops early and reports the cause; rows already saved remain available.

Districts are processed in order, and duplicate listings count only once toward the run limit. An early district can fill the entire limit. District searches follow Gelbe Seiten's location matching.

### Frequently asked questions

#### Can I search by postal code?

Yes. Enter a German postal code in the location field.

#### How do I get the full weekly opening hours?

Enable `includeDetails`. Without it, rows still include the address, phone, fax, website and coordinates, but `openingHours` stays empty.

#### What happens when the directory has no matches?

The run finishes with zero listings and reports `no_results` in the summary.

### Responsible use

Use the data in accordance with applicable terms, privacy requirements and laws.

### Support

Open an issue in the Actor's **Issues** tab with the input and run ID so the problem can be reproduced.

[Gelbe Seiten API integration examples on GitHub](https://github.com/datacrawler-edu/gelbe-seiten-directory-api)

# Actor input Schema

## `keyword` (type: `string`):

For example, Zahnarzt or Autowerkstatt.

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

For example, Berlin or 10115.

## `maxResults` (type: `integer`):

Maximum number of unique listings saved.

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

Fetch the complete weekly opening hours for every listing. Adds one extra request per listing.

## `districts` (type: `array`):

Optional district names within the city entered above.

## Actor input object example

```json
{
  "keyword": "Zahnarzt",
  "location": "Berlin",
  "maxResults": 5,
  "includeDetails": false,
  "districts": []
}
```

# Actor output Schema

## `listings` (type: `string`):

No description

## `summary` (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 = {
    "keyword": "Zahnarzt",
    "location": "Berlin",
    "maxResults": 5,
    "includeDetails": false,
    "districts": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascraperes/gelbe-seiten-business-directory").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 = {
    "keyword": "Zahnarzt",
    "location": "Berlin",
    "maxResults": 5,
    "includeDetails": False,
    "districts": [],
}

# Run the Actor and wait for it to finish
run = client.actor("datascraperes/gelbe-seiten-business-directory").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 '{
  "keyword": "Zahnarzt",
  "location": "Berlin",
  "maxResults": 5,
  "includeDetails": false,
  "districts": []
}' |
apify call datascraperes/gelbe-seiten-business-directory --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datascraperes/gelbe-seiten-business-directory"
        }
    }
}
```

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/9NcbhMB1oDDmBZgCC/builds/IHC1Ibo9fWoQgFpe3/openapi.json
