# German Foreclosure & Real Estate Scraper (zvg-portal.de) (`nathan922/german-foreclosure-zvg-scraper`) Actor

Scrapes official German real estate foreclosures (zvg-portal.de). Extracts cleaned market values, 50%/70% statutory bidding limits (§ 74a/85a ZVG), property categories, living area (m²), build year, court details, and full PDF appraisal texts.

- **URL**: https://apify.com/nathan922/german-foreclosure-zvg-scraper.md
- **Developed by:** [Nathanael Araz](https://apify.com/nathan922) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 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

## 🏢 German Foreclosure & Real Estate Scraper (zvg-portal.de)

[![Fast HTTPX](https://img.shields.io/badge/Engine-Fast%20HTTPX-blue?style=flat-square\&logo=python)](https://apify.com)
[![No Browser Overhead](https://img.shields.io/badge/Compute-No%20Browser%20Overhead%20%28--90%25%20Cost%29-brightgreen?style=flat-square)](https://apify.com)
[![16 Bundesländer](https://img.shields.io/badge/Coverage-16%20Bundesl%C3%A4nder-orange?style=flat-square)](https://apify.com)
[![PDF Text Extraction](https://img.shields.io/badge/PDF%20Extraction-In--Memory%20%28pypdf%29-purple?style=flat-square)](https://apify.com)

Effortlessly extract official judicial foreclosure auctions (**Zwangsversteigerungen**) from Germany's central portal [zvg-portal.de](https://www.zvg-portal.de). Monitor distressed real estate, analyze market values, and parse court appraisals in seconds.

***

### ⚡ Key Features

- 🇩🇪 **Full German Coverage:** Scrape auctions across all 16 federal states (*Bundesländer*) and all local district courts (*Amtsgerichte*). Query specific states (e.g. `nw`, `by`, `be`) or all of Germany at once with `"all"`.
- 🚀 **Zero-Browser Architecture:** Powered by asynchronous HTTP requests (`httpx`). Runs **up to 20× faster** and **90% cheaper** than conventional browser scrapers (Playwright/Puppeteer), saving substantial Apify compute credits.
- 📄 **Native PDF Text Extraction:** Downloads official appraisal documents (*Gutachten*) and court decrees (*Amtliche Bekanntmachung*) in RAM and extracts the complete text directly into your JSON dataset using `pypdf`.
- 💶 **Clean Numbers & Statutory Bid Thresholds (50% / 70%):** Automatically converts currency strings (including multi-lot `Lfd. Nr.` auctions) into floats (`verkehrswert_eur: 270000.0`) and computes the statutory **50% minimum bid limit** (§ 85a ZVG: `grenze_50_prozent_eur`) and **70% creditor limit** (§ 74a ZVG: `grenze_70_prozent_eur`).
- 🏠 **Investor Property Metrics:** Automatically classifies `objekt_kategorie` (*Eigentumswohnung*, *Einfamilienhaus*, *Mehrfamilienhaus*, *Gewerbeimmobilie*, *Grundstück*) and extracts `wohnflaeche_qm` (living area in m²) and `baujahr` (construction year).
- 🛡️ **Automated Encoding Repair:** Resolves government portal legacy issues: transparent ISO-8859-1 decoding and auto-repair of mixed/double-encoded German umlauts (`ä`, `ö`, `ü`, `ß`).

***

### ⚙️ Input Parameters

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `bundeslaender` | `Array of Strings` | `["nw"]` | State codes to scrape (`bw`, `by`, `be`, `br`, `hb`, `hh`, `he`, `mv`, `ni`, `nw`, `rp`, `sl`, `sn`, `st`, `sh`, `th` or `all`). |
| `maxItems` | `Integer` | `20` | Maximum number of detail records to scrape per run. |
| `extractPdfText` | `Boolean` | `true` | Extract full-text from attached appraisal PDFs (*Gutachten*) directly in RAM. |
| `includeCancelled` | `Boolean` | `false` | Whether to include cancelled/postponed auctions (*aufgehobene Termine*). |

***

### 📦 Output Example

Each item pushed to the Apify dataset contains structured metadata, numerical values, and extracted document text:

```json
{
  "zvg_id": "168477",
  "aktenzeichen": "0420 K 0008/2025",
  "bundesland": "nw",
  "amtsgericht": "Amtsgericht Krefeld",
  "objekt_lage": "Einfamilienhaus: Wielandstr. 1, 47877 Willich, Willich",
  "objekt_kategorie": "Einfamilienhaus",
  "plz": "47877",
  "ort": "Willich",
  "wohnflaeche_qm": 104.76,
  "baujahr": 1977,
  "verkehrswert_raw": "270.000,00 €",
  "verkehrswert_eur": 270000.0,
  "grenze_50_prozent_eur": 135000.0,
  "grenze_70_prozent_eur": 189000.0,
  "termin_raw": "Mittwoch, 04. November 2026, 09:00 Uhr",
  "status": "aktiv",
  "art_der_versteigerung": "Versteigerung im Wege der Zwangsvollstreckung",
  "grundbuch": "Willich Blatt 1044",
  "beschreibung": "Laut Sachverständigengutachten handelt es sich um ein eingeschossiges, unterkellertes Einfamilienhaus mit ausgebautem Dachgeschoss sowie eine Garage, Baujahr: 1977, Wohnfläche: ca. 104,76 m²...",
  "ort_der_versteigerung": "Amtsgericht Krefeld, Nebenstelle Preußenring, Preußenring 49, 47798 Krefeld, Etage 1, Sitzungssaal P 130",
  "letzte_aktualisierung": "23-07-2026 11:14",
  "pdf_links": [
    {
      "title": "Bekanntmachung",
      "url": "https://www.zvg-portal.de/index.php?button=showAnhang&land_abk=nw&file_id=378663&zvg_id=168477"
    },
    {
      "title": "Dokument",
      "url": "https://www.zvg-portal.de/index.php?button=showAnhang&land_abk=nw&file_id=378664&zvg_id=168477"
    }
  ],
  "pdf_extracted_text": "=== Bekanntmachung ===\n420 K 8/25\nAmtsgericht Krefeld\nBeschluss\nIm Wege der Zwangsvollstreckung soll am Mittwoch, 04.11.2026, 09:00 Uhr...\n\n=== Dokument ===\nGUTACHTEN über den Verkehrswert\nEinfamilienhaus Wielandstraße 1, 47877 Willich...\nBaujahr: 1977, Wohnfläche: ca. 104,76 m²..."
}
```

***

### 🔄 Integrations & Workflows

Connect this Actor to your existing stack via Apify's API and Webhooks:

- **n8n & Make.com:** Schedule recurring runs (e.g., daily at 07:00) to check for newly published auctions. Filter by `verkehrswert_eur` or specific postal codes and send instant alerts to **Telegram, Slack, or Email**.
- **Zapier:** Automatically append newly discovered foreclosure auctions to **Google Sheets, Airtable, or your CRM**.
- **AI & LLM Enrichment:** Pass `pdf_extracted_text` directly to OpenAI GPT-4o or Claude to extract renovation costs, building conditions, or legal encumbrances.
- **Python API:**
  ```python
  from apify_client import ApifyClient

  client = ApifyClient("YOUR_APIFY_TOKEN")
  run = client.actor("Nathan922/german-foreclosure-zvg-scraper").call(run_input={
      "bundeslaender": ["nw", "by"],
      "maxItems": 50,
      "extractPdfText": True
  })

  for item in client.dataset(run["defaultDatasetId"]).iterate_items():
      print(f"Auction: {item['aktenzeichen']} | {item['ort']} | {item['verkehrswert_eur']} EUR")
  ```

***

### ⚖️ Disclaimer

This Actor retrieves public judicial foreclosure notifications published on zvg-portal.de by the state justice departments of Germany. Please configure respectful request rates.

# Actor input Schema

## `bundeslaender` (type: `array`):

Liste der zu scrapenden Bundesländer-Kürzel (z.B. \['nw', 'by'] oder \['all'] für alle Bundesländer: bw, by, be, br, hb, hh, he, mv, ni, nw, rp, sl, sn, st, sh, th).

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

Maximale Anzahl an Detail-Einträgen pro Run.

## `includeCancelled` (type: `boolean`):

Ob aufgehobene/abgesagte Versteigerungstermine mitgescraped werden sollen.

## `extractPdfText` (type: `boolean`):

Lädt die PDF-Bekanntmachung und Gutachten im Arbeitsspeicher herunter und extrahiert den Text via pypdf.

## Actor input object example

```json
{
  "bundeslaender": [
    "nw"
  ],
  "maxItems": 20,
  "includeCancelled": false,
  "extractPdfText": true
}
```

# 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 = {
    "bundeslaender": [
        "nw"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("nathan922/german-foreclosure-zvg-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 = {
    "bundeslaender": ["nw"],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("nathan922/german-foreclosure-zvg-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 '{
  "bundeslaender": [
    "nw"
  ],
  "maxItems": 20
}' |
apify call nathan922/german-foreclosure-zvg-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nathan922/german-foreclosure-zvg-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/i2aPIAv3zO5QBDoIb/builds/D5TWhHefak6vT3S2i/openapi.json
