# German Imprint Contact Scraper (`dominic-quaiser/imprint-contact-scraper`)

An Actor that automatically locates and scrapes key contact details from German website imprint pages (Impressum). It extracts information such as company name, address, phone numbers, emails, and decision-maker details.

- **URL**: https://beta-securitybyobscurity.apify.com/dominic-quaiser/imprint-contact-scraper.md
- **Developed by:** [Dominic M. Quaiser](https://beta-securitybyobscurity.apify.com/dominic-quaiser) (community)
- **Categories:** Automation, Lead generation, Developer tools
- **Stats:** 191 total users, 54 monthly users, 100.0% runs succeeded, 9 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

# README

## German Imprint Scraper

A Python-based Apify Actor designed to find and extract contact and legal information from German imprint pages ("Impressum"). Simply provide a list of website homepages, and the actor will automatically locate the imprint page and scrape key details like company name, address, phone number, email, and commercial register number.

**Beta Version Notice**: This actor is currently in beta. While it's fully functional and returns results, you may encounter occasional quirks or incomplete features. I welcome your feedback! Please report any issues or suggestions you have.

### 💡 Features

- **Automatic Imprint Page Discovery**: Intelligently crawls websites to find the correct imprint page from your starting URLs.
- **Selective Data Extraction**: Choose exactly which data points you need, from basic contact info to advanced details like company decision-makers.
- **Dual Fetching Technology**:
  - **HTTP Mode**: A fast, lightweight method for scraping simple, server-rendered websites.
  - **Headless Browser Mode (Playwright)**: A powerful option for modern, JavaScript-heavy websites. The actor can be configured to use this mode for all sites or as an automatic fallback if the standard HTTP method fails, ensuring maximum success rates.
- **Proxy Support**: Integrates seamlessly with Apify's proxy service to handle IP rotation and avoid blocking.
- **Customizable Output**: Include optional metadata or error records for detailed analysis and troubleshooting.
- **Structured JSON Output**: Delivers clean, well-structured data ready for use in your applications, databases, or CRM systems.

### 📥 Input Parameters

Configure the actor's behavior using these fields in the Apify Console Input tab or via API:

|Field|Type|Description|Default|Required|
|---|---|---|---|---|
|`startUrls`|Array|Enter the homepage URLs of the websites to process.|`[{ "url": "https://www.vita-cola.de/" }]`|Yes|
|`fieldsToExtract`|Array|Choose the specific pieces of information you want to collect.|`["company_name", "business_address"]`|No|
|`usePlaywright`|Boolean|Use a headless browser for all websites. Slower but more reliable for JavaScript-heavy sites.|`false`|No|
|`metaData`|Boolean|Include technical details in the output.|`false`|No|
|`errorOutput`|Boolean|Include a row in the output for each website that failed to process.|`false`|No|
|`debugLog`|Boolean|Generate a verbose log for troubleshooting.|`false`|No|
|`proxyConfiguration`|Object|Proxy settings. Apify Proxy is recommended.|`{ "useApifyProxy": true }`|No|

### 📤 Output Data Structure

The exact fields depend on your `fieldsToExtract` selection.

#### Example Output

```json
{
  "start_url": "https://muster-firma.de/",
  "imprint_url": "https://muster-firma.de/impressum",
  "company_name": {
    "name": "Muster GmbH",
    "confidence": 1
  },
  "business_address": {
    "full_address": "Musterstraße 123, 12345 Berlin",
    "street": "Musterstraße",
    "house_number": "123",
    "postal_code": "12345",
    "city": "Berlin"
  },
  "phone_number": {
    "phone_1": "+493012345678"
  },
  "emails": {
    "email_1": "kontakt@muster-firma.de"
  },
  "register_number": {
    "number": "HRB 12345 B",
    "court": "Amtsgericht Charlottenburg"
  },
  "social_media": {
    "linkedin": "https://www.linkedin.com/company/muster-firma"
  },
  "decision_makers": [
      "Max Mustermann"
  ],
  "metadata": {
    "domain": "muster-firma.de",
    "fetch_method": "http",
    "fallback_attempted": false,
    "scraped_at": "2025-08-28T12:04:48.003780"
  }
}
```

**Note:** The numbered outputs like emails and phone numbers are sorted by confidence in how likely they are the main contact data for the company.

### 📊 Extractable Data in Detail

You can select any combination of the following fields for extraction:

|Field|Description|Data Structure|
|---|---|---|
|**`company_name`**|Extracts the official company name. The result includes a `confidence` score indicating the likelihood of a correct match. The higher the number, the lower is the confidence.|`Object`|
|**`business_address`**|Parses the full business address into structured components: `full_address`, `street`, `house_number`, `postal_code`, and `city`.|`Object`|
|**`phone_number`**|Finds and extracts one or more phone numbers from the page. Results are keyed as `phone_1`, `phone_2`, etc.|`Object`|
|**`emails`**|Finds and extracts one or more email addresses. The extractor prioritizes emails that match the website's domain.|`Object`|
|**`register_number`**|Extracts the commercial register number ("Handelsregisternummer") and the corresponding registration `court` (`Registergericht`).|`Object`|
|**`social_media`**|Scans for and extracts links to common social media platforms like LinkedIn, Xing, Facebook, Instagram, etc.|`Object`|
|**`decision_makers`**|**(Premium)** Identifies and extracts the names of key decision-makers ("Entscheidungsträger"). This feature uses an external NER (Named Entity Recognition) machine learning model to ensure accuracy.|`Array`|

\##💲 Pricing

This actor uses a pay-per-event pricing model. You are charged based on your usage, ensuring you only pay for what you need. The costs are as follows:

- **Actor Start**: `$0.10` per run
- **Per Website**:
  - **Website Processed**: $0.0004 for each URL from your input list
  - **Successful Result**: $0.0026 for each website where data is successfully extracted
  - **Decision Maker Extracted**: $0.0006 for decision-makers found per website (this is in addition to the successful result charge)
  - **Maximum Sum:** $0.0036 per Website
- **Per 1000 Websites**:
  - **Website Processed**: $0.40 for 1000 URL from your input list
  - **Successful Result**: $2.60 for 10000 websites where data is successfully extracted
  - **Decision Maker Extracted**: $0.60 for decision-makers found per 1000 websites (this is in addition to the successful result charge)
  - **Maximum Sum:** $3.60 per 1000 Websites

### ⚙️ Usage

1. **Input URLs**: Go to the **Input** tab and paste the homepage URLs of the websites you want to scrape.
2. **Select Data**: In the `fieldsToExtract` dropdown, select all the data points you wish to collect.
3. **Configure Settings**: Adjust settings like `usePlaywright` or `proxyConfiguration` as needed.
4. **Start the Actor**: Click the **Start** button.
5. **Get Data**: Once the run is finished, find your results in the **Storage** → **Dataset** tab.

### 🎯 Use Cases

- **Lead Generation**: Build targeted contact lists for sales and marketing.
- **Compliance & Verification**: Check for legally compliant imprint information.
- **Market Research**: Aggregate data on companies in a specific industry or region.
- **Data Enrichment**: Enhance existing company profiles with official contact and registration details.

### ⚖️ Legal Disclaimer

You are solely responsible for determining the legality of your use of this actor and the data it generates. The scraping and handling of data, particularly personal information, is subject to complex legal frameworks like the General Data Protection Regulation (GDPR/DSGVO), copyright laws, and the terms of service of the websites you scrape. It is your responsibility to ensure your use case is compliant with all applicable laws. This text does not constitute legal advice.

#### GDPR Notice: "Decision Makers" Feature

Please be aware that the **`decision_makers`** feature uses an external API hosted on a private server in **Germany** for data processing.

- **What is Processed**: The text of the imprint page is sent to this API to identify personal names.
- **Why**: This is necessary for the Named Entity Recognition (NER) model to accurately extract decision-makers.
- **Data Controller**: You, the user, are the data controller. The actor's developer acts as the data processor for this specific task.
- **Location & Compliance**: All processing for this feature occurs within the EU (Germany) and is subject to GDPR (DSGVO).
- **Data Storage**: The text is processed in-memory and is **not** stored or logged on the external server.
- **Important**: This processing is external to the Apify platform and is not covered by Apify's DPA. By using this feature, you acknowledge this separate data processing activity.

### 🛠️ Maintainer

- **Author**: Dominic M. Quaiser
- **Contact**: [mail@dominic-quaiser.io](mailto:mail@dominic-quaiser.io "null")
- **Website**: [dominic-quaiser.io](https://dominic-quaiser.io/ "null")

# Actor input Schema

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

Enter the homepage URLs of the websites you want to process. The actor will automatically navigate each site to find its specific imprint page.

## `fieldsToExtract` (type: `array`):

Choose the specific pieces of information you want to collect from the imprint pages.

## `usePlaywright` (type: `boolean`):

Enable this for modern, interactive websites. This mode uses a real browser to load pages, which is slower but more reliable for sites that depend heavily on JavaScript. Keep it disabled for faster results on simpler websites. The default will use the headless browser only for websites that don't yield results.

## `metaData` (type: `boolean`):

When enabled, the output will include extra technical details. This is useful for troubleshooting or detailed analysis.

## `errorOutput` (type: `boolean`):

Enable this to add a row in the output for each website that failed to process. Each error row will detail the problem, such as 'Imprint page not found' or 'Processing timed out'.

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

Specifies proxy servers that will be used by the scraper in order to hide its origin.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.vita-cola.de/"
    }
  ],
  "fieldsToExtract": [
    "company_name",
    "business_address",
    "phone_number",
    "emails",
    "register_number",
    "social_media"
  ],
  "usePlaywright": false,
  "metaData": false,
  "errorOutput": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://www.vita-cola.de/"
        }
    ],
    "fieldsToExtract": [
        "company_name",
        "business_address",
        "phone_number",
        "emails",
        "register_number",
        "social_media"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dominic-quaiser/imprint-contact-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 = {
    "startUrls": [{ "url": "https://www.vita-cola.de/" }],
    "fieldsToExtract": [
        "company_name",
        "business_address",
        "phone_number",
        "emails",
        "register_number",
        "social_media",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("dominic-quaiser/imprint-contact-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.vita-cola.de/"
    }
  ],
  "fieldsToExtract": [
    "company_name",
    "business_address",
    "phone_number",
    "emails",
    "register_number",
    "social_media"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call dominic-quaiser/imprint-contact-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dominic-quaiser/imprint-contact-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "German Imprint Contact Scraper",
        "description": "An Actor that automatically locates and scrapes key contact details from German website imprint pages (Impressum). It extracts information such as company name, address, phone numbers, emails, and decision-maker details.",
        "version": "0.5",
        "x-build-id": "G8iCSOQFDLgWGd7yd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dominic-quaiser~imprint-contact-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dominic-quaiser-imprint-contact-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dominic-quaiser~imprint-contact-scraper/runs": {
            "post": {
                "operationId": "runs-sync-dominic-quaiser-imprint-contact-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dominic-quaiser~imprint-contact-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-dominic-quaiser-imprint-contact-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Websites to Scrape",
                        "type": "array",
                        "description": "Enter the homepage URLs of the websites you want to process. The actor will automatically navigate each site to find its specific imprint page.",
                        "default": [
                            {
                                "url": "https://www.vita-cola.de/"
                            }
                        ],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "fieldsToExtract": {
                        "title": "Data to Extract",
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Choose the specific pieces of information you want to collect from the imprint pages.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "company_name",
                                "business_address",
                                "phone_number",
                                "emails",
                                "register_number",
                                "social_media",
                                "decision_makers"
                            ],
                            "enumTitles": [
                                "Company Name (Firmenname)",
                                "Business Address (Geschäftsadresse)",
                                "Phone Number (Telefonnummer)",
                                "Email Address (E-Mail-Adresse)",
                                "Register Number (Handelsregisternummer)",
                                "Social Media (Soziale Medien)",
                                "Decision Makers (Entscheidungsträger—Geschäftsführer, Vorstand)"
                            ]
                        },
                        "default": [
                            "company_name",
                            "business_address",
                            "phone_number",
                            "emails",
                            "register_number",
                            "social_media"
                        ]
                    },
                    "usePlaywright": {
                        "title": "Enable Headless Browser For All Websites",
                        "type": "boolean",
                        "description": "Enable this for modern, interactive websites. This mode uses a real browser to load pages, which is slower but more reliable for sites that depend heavily on JavaScript. Keep it disabled for faster results on simpler websites. The default will use the headless browser only for websites that don't yield results.",
                        "default": false
                    },
                    "metaData": {
                        "title": "Include Metadata",
                        "type": "boolean",
                        "description": "When enabled, the output will include extra technical details. This is useful for troubleshooting or detailed analysis.",
                        "default": false
                    },
                    "errorOutput": {
                        "title": "Include Errors In Output",
                        "type": "boolean",
                        "description": "Enable this to add a row in the output for each website that failed to process. Each error row will detail the problem, such as 'Imprint page not found' or 'Processing timed out'.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Specifies proxy servers that will be used by the scraper in order to hide its origin.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
