# Gelbe Seiten Scraper: German Business Leads & Emails (`firsthand/gelbe-seiten-scraper`) Actor

Gelbe Seiten scraper: export German business addresses by trade and city with phone, website, email, rating, opening hours and GPS. Search like on gelbeseiten.de or paste links. Excel and CSV export of Gelbe Seiten data from $0.0004 per business.

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

## Pricing

from $0.40 / 1,000 businesses

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

## Gelbe Seiten Scraper: German Business Leads & Emails

Export German businesses from [Gelbe Seiten](https://www.gelbeseiten.de) (gelbeseiten.de, the German Yellow Pages) by trade and city: name, category, address, phone, website, email, rating, opening hours and GPS. Search the same way as on the site or paste Gelbe Seiten links. Download the results as Excel, CSV or JSON, or call the Actor through the API.

### What you get

- **Business**: name, main category, street, postal code, city, district, phone, website, rating and number of reviews, short text, partner badge, logo, link to the Gelbe Seiten page.
- **Email** right from the results list when the business shows it there.
- **With "Add email, all phones, opening hours and GPS" on**, each company page adds: email, every phone number, opening hours by weekday, latitude and longitude, description, keywords, all categories, payment methods, social links and the date Gelbe Seiten last updated the entry.
- **With "Visit company website" on**, the Actor also opens the company's own website (home page plus up to 5 pages: Kontakt, Impressum, Über uns, Team) and adds: emails found there, managing directors and owners from the Impressum with their role, Handelsregister number and court, USt-IdNr., links to Facebook, Instagram, LinkedIn, XING, YouTube and TikTok, and whether the email domain has a mail server. When Gelbe Seiten shows no email, the main `email` column is filled from the website.

### How to use it

1. Type what you are looking for (`Zahnarzt`, `Restaurant`, `Klempner`, a company name) and one or more places (`München`, `10115`). Every query runs in every place; leave places empty to search all of Germany.
2. Or paste Gelbe Seiten links: search pages like `https://www.gelbeseiten.de/suche/klempner/berlin` or company pages `https://www.gelbeseiten.de/gsbiz/...`.
3. Optional: radius in km around the place, sort by best match, rating or distance, and limits per query and in total.
4. Run and download the dataset.

### Gelbe Seiten daten exportieren (Excel, CSV)

Every run saves a table you can download as Excel, CSV, JSON or HTML from the Storage tab, or fetch through the Apify API. One row is one Gelbe Seiten entry, in the same order as on the site.

### Example output

```json
{
  "id": "1100000800",
  "companyId": "1aea7ffa-a033-49f1-a642-45a8132ae29c",
  "name": "A + M Heizung-Sanitär GmbH",
  "category": "Klempnereien",
  "street": "Torstr. 105- 107",
  "postalCode": "10119",
  "city": "Berlin",
  "district": "Mitte",
  "phone": "0162 2 30 90 09",
  "website": "https://www.heizungsanitaer-berlin.de",
  "email": "pruessing@a-m-hsl.de",
  "hasEmail": true,
  "rating": null,
  "reviewsCount": 0,
  "url": "https://www.gelbeseiten.de/gsbiz/1aea7ffa-a033-49f1-a642-45a8132ae29c",
  "position": 1,
  "searchQuery": "klempner",
  "searchLocation": "berlin",
  "phones": ["0162 2 30 90 09", "030 24 62 83 50"],
  "openingHours": {"Montag": "Ruhetag", "Dienstag": "Ruhetag"},
  "openingHoursNote": "Montag, Dienstag, Mittwoch, Donnerstag, Freitag: Termin nach Vereinbarung",
  "latitude": 52.530052,
  "longitude": 13.403331,
  "categories": ["Klempnereien"],
  "paymentMethods": ["Bar", "Rechnung"],
  "updatedAt": "2026-09-04"
}
```

### Website fields

With "Visit company website" on, every row gets these fields (empty when there is no website or nothing was found):

```json
{
  "websiteStatus": "ok",
  "websiteEmails": ["info@muster-haustechnik.de", "anna@muster-haustechnik.de"],
  "emailSource": "directory",
  "websitePhones": ["+492211234567"],
  "websiteSocialLinks": {"facebook": "https://www.facebook.com/example", "instagram": "https://www.instagram.com/example"},
  "people": [{"name": "Anna Beispiel", "role": "Geschäftsführer"}],
  "registerNumber": "HRB 12345",
  "registerCourt": "Köln",
  "vatId": "DE123456789",
  "websiteEmailHasMx": true
}
```

`websiteStatus` says what happened: `ok`, `unreachable` (the site is down), `http_403` or another `http_<code>` (the site refused the visit or answered with an error), `not_html` (the link is a file, not a page), `platform` (the link points to Facebook, Doctolib or another platform, not to the company's own site), `skipped_cost_limit` (the run reached your maximum cost), `skipped_time_limit` (the run was too close to its timeout to visit the site) or `error`. Data protection and job mailboxes found on a site stay in `websiteEmails` at the end of the list, but never become the main `email` and are not charged. `emailSource` says whether the main `email` came from the directory or from the website.

### Pricing

Pay per result, no monthly fee:

| What | Price |
|---|---|
| Business row | $0.0004 |
| Email, all phones, opening hours and GPS from the company page | $0.0004 per business |
| Company website: emails, directors, register, VAT, social links | $0.002 per business, only when the website gave at least one of these |

1,000 businesses cost $0.40, or $0.80 with company page details (email when the company lists one, all phones, hours, GPS). You pay only for rows in your dataset; an entry already returned in the same run is not charged twice. Set "Maximum cost per run" in the run options to cap the spend. With "Visit company website" on, add up to $2.00 per 1,000 businesses: the $0.002 is charged only for a business whose website gave an email, a social link, a person or a register or VAT number; a site that is down, refuses the visit or shows nothing useful is free.

### Gelbe Seiten API for developers

Start the Actor through the Apify API or the Python and JavaScript clients and read the dataset when it finishes. Input example:

```json
{
  "searchQueries": ["Zahnarzt", "Kieferorthopäde"],
  "locations": ["München", "Augsburg"],
  "includeDetails": true,
  "enrichWebsite": true,
  "maxItems": 500
}
```

Inputs written for other Gelbe Seiten actors on Apify also work: `query`, `searchTerms`, `searchQuery`, `location`, `searchUrls`, `sort` (`relevanz`, `bewertung`, `entfernung`), `maxResults`, `maxPages` and `scrapeDetails` are read as the matching fields. For the website option `scrapeWebsite`, `enrichWebsites`, `scrapeContacts` and `websiteEnrichment` work too.

### Good to know

- One company can appear several times in the results with different branches or phone numbers. Each Gelbe Seiten entry is one row; `companyId` groups the rows of one company.
- Many small businesses do not publish an email on Gelbe Seiten; for them `email` stays empty and `hasEmail` is false.
- Without `maxItems` a run stops at 100 businesses; set 0 for no limit. Large cities return thousands of entries for common trades.
- Company websites are visited from Apify servers without a proxy. In our tests about 85% of German sites opened; the rest refused the visit or were down, and those businesses are not charged for the website.
- Emails of web agencies, hosting companies, consumer mediators and data protection authorities found on a site are dropped. When the site has an email on its own domain, emails on other domains are dropped too.
- The Actor reads public Gelbe Seiten pages only. Use the data in line with the GDPR and the rules for business contact in your country.

# Actor input Schema

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

What you would type in the Gelbe Seiten 'Was' box, for example 'Zahnarzt', 'Restaurant' or a company name.

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

Cities or postal codes, for example 'München' or '10115'. Every query runs in every place. Empty searches all of Germany.

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

Search pages (https://www.gelbeseiten.de/suche/klempner/berlin) or company pages (https://www.gelbeseiten.de/gsbiz/...).

## `radiusKm` (type: `integer`):

Search around the place within this radius. Empty or 0 means the whole city.

## `sortOrder` (type: `string`):

Order of results, as on the site. Best match if empty.

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

Opens each company page for its email, every phone number, opening hours, latitude and longitude, description, keywords, payment methods and social links. Charged once per business.

## `enrichWebsite` (type: `boolean`):

Opens the company's own website (home page plus up to 5 pages: contact, imprint, about, team) and adds the emails found there, social profile links, managing directors and owners, the commercial register number and court and the VAT ID from the Impressum. The main email column is filled from the website when the directory has none. Charged once per business, only when the website gave at least one of these. Websites are visited without a proxy.

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

Businesses in total across all queries, places and links. 100 if empty, 0 means no limit.

## `maxItemsPerQuery` (type: `integer`):

Limit for each query in each place and for each link. Empty or 0 means no limit.

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

The site works without a proxy. Turn Apify Proxy on only if runs get refused.

## Actor input object example

```json
{
  "searchQueries": [
    "Klempner"
  ],
  "locations": [
    "Berlin"
  ],
  "includeDetails": true,
  "enrichWebsite": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `results` (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 = {
    "searchQueries": [
        "Klempner"
    ],
    "locations": [
        "Berlin"
    ],
    "includeDetails": true,
    "enrichWebsite": false,
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("firsthand/gelbe-seiten-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": ["Klempner"],
    "locations": ["Berlin"],
    "includeDetails": True,
    "enrichWebsite": False,
    "maxItems": 100,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("firsthand/gelbe-seiten-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": [
    "Klempner"
  ],
  "locations": [
    "Berlin"
  ],
  "includeDetails": true,
  "enrichWebsite": false,
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call firsthand/gelbe-seiten-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,firsthand/gelbe-seiten-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/cwyTiaNJI8tHQXayX/builds/rR0IAA03hj6gpumZC/openapi.json
