# Germany Neighborhood Profile – Census 2022 Rent & Vacancy (`stevenkramp/germany-neighborhood-profile`) Actor

Official German Census 2022 (Zensus) data for any address or coordinate: average net cold rent per m², vacancy rate, population, owner-occupancy, average age, building age and heating type – on a 100 m grid with automatic fallback to 1 km.

- **URL**: https://apify.com/stevenkramp/germany-neighborhood-profile.md
- **Developed by:** [Steven Kramp](https://apify.com/stevenkramp) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 location profiles

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

## Germany Neighborhood Profile – Census 2022 Rent, Vacancy & Demographics

Get **official German Census 2022 (Zensus 2022) statistics for any address or coordinate in Germany** – on a **100 m grid**, with automatic fallback to 1 km where values are suppressed for privacy.

For every location you get:

| Field | What it is | Unit |
|---|---|---|
| `rent` | Average **net cold rent** (Durchschnittliche Nettokaltmiete) of rented dwellings | €/m² per month |
| `vacancy` | **Vacancy rate** (Leerstandsquote) | % of dwellings |
| `population` | Residents (Einwohnerzahl) | persons |
| `ownership` | **Owner-occupancy rate** (Eigentümerquote) | % |
| `age` | Average age of residents (Durchschnittsalter) | years |
| `construction` | Buildings by **construction decade** (Gebäude nach Baujahr) | number of buildings |
| `heating` | Dwellings by **main heating type** (Heizungsart) | number of dwellings |

Each value states the grid **resolution** it comes from (`100m`, `1km` or `10km`) and the official **cell id** (e.g. `CRS3035RES100mN3273500E4552500`).

### Why use it

- **Real estate investors & analysts:** compare rent levels and vacancy around a property before you buy – the same check professional investors do, in one API call.
- **PropTech, valuation and lead tools:** enrich addresses with neutral, official neighbourhood data.
- **AI agents:** works as a tool via the Apify MCP server – ask your agent “What is the average rent and vacancy around Hauptstraße 5, Leipzig?”.
- **Energy & heating businesses:** see which heating types and building ages dominate a neighbourhood.

All data comes from the **official Census 2022 grid tables of the German Federal Statistical Office (Destatis)**. The tables are packed into the actor at build time, so runs are fast, cheap and do not depend on scraping any website.

### Input

```json
{
  "locations": [
    { "label": "Berlin Alexanderplatz", "address": "Alexanderplatz 1, 10178 Berlin" },
    { "label": "Leipzig centre", "lat": 51.3397, "lon": 12.3731 },
    "Marienplatz 1, 80331 München"
  ],
  "minResolution": "100m"
}
```

- `lat`/`lon` (WGS84) are fastest. Addresses are geocoded with OpenStreetMap Nominatim at max. 1 request per second (usage policy) – for large batches please pass coordinates.
- `minResolution`: start at `100m` (most local) or choose `1km` for smoother neighbourhood averages.

### Output (example, shortened)

```json
{
  "label": "Leipzig centre",
  "status": "ok",
  "lat": 51.3397, "lon": 12.3731,
  "cell100m": "CRS3035RES100mN3139200E4486300",
  "rent": { "value": 6.84, "resolution": "100m", "cell": "CRS3035RES100mN3139200E4486300" },
  "vacancy": { "value": 3.9, "resolution": "1km", "cell": "CRS3035RES1kmN3139000E4486000" },
  "attribution": {
    "source": "Zensus 2022, © Statistisches Bundesamt (Destatis) und Statistische Ämter der Länder",
    "license": "Datenlizenz Deutschland – Namensnennung – Version 2.0 (dl-de/by-2-0)",
    "referenceDate": "2022-05-15"
  }
}
```

(The numbers above only illustrate the format.)

### Pricing

Pay per result: you are only charged for successfully profiled locations. Failed lookups (address not found, outside Germany) are free.

### Good to know

- **Reference date 15 May 2022.** Census values describe that day; rents have risen since. Use them for comparing places, not as today's market rent.
- **Privacy suppression:** the statistical offices suppress values for cells with very few dwellings or residents. The actor then falls back to the 1 km (or 10 km) cell and tells you which resolution was used.
- **Small counts are statistically blurred:** for privacy the census adds small random deviations to counts (cell key method). In cells with only a few buildings, the decades may therefore not add up exactly to the total. Averages and rates (rent, vacancy, age) are the most robust values.
- **No valuation, no advice.** The output is official statistics, not a property valuation.

### Use with AI agents (MCP)

This Actor works as a tool for AI assistants and agents – Claude, ChatGPT, Cursor, VS Code, n8n and other MCP clients – through Apify's hosted MCP server. Add this server URL to your client:

```
https://mcp.apify.com?tools=stevenkramp/germany-neighborhood-profile
```

Sign in with your Apify account when asked. Your agent can then call the Actor in plain language, for example: *"Give me a neighborhood profile for Leipziger Straße 1, 10117 Berlin – population, age structure and rents."* – and gets clean, structured JSON back. Runs started by your agent are normal Actor runs on your Apify account at the same pay-per-event price.

### Sources and licences

- Census 2022 grid data: © Statistisches Bundesamt (Destatis) and the statistical offices of the Länder, [Datenlizenz Deutschland – Namensnennung – Version 2.0](https://www.govdata.de/dl-de/by-2-0). Every result contains the required attribution.
- Geocoding: © OpenStreetMap contributors, [ODbL](https://www.openstreetmap.org/copyright), via Nominatim.

This actor is not affiliated with Destatis or OpenStreetMap.

***

#### Deutsch (kurz)

**Zensus 2022 für jede Adresse in Deutschland:** durchschnittliche Nettokaltmiete pro m², Leerstandsquote, Einwohner, Eigentümerquote, Durchschnittsalter, Gebäude nach Baujahr und Heizungsart – im 100-m-Gitter mit automatischem Rückfall auf 1 km. Ideal für Immobilien-Investoren (Ankaufsprüfung, Standortvergleich), PropTech und KI-Agenten. Amtliche Daten von Destatis (dl-de/by-2-0), Stichtag 15.05.2022.

# Actor input Schema

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

List of locations in Germany. Each item is either an object with "lat" and "lon" (WGS84), an object with "address", or a plain address string. Optional "label" is copied to the output.

## `minResolution` (type: `string`):

Start at 100 m cells (most local) and fall back to 1 km / 10 km where values are suppressed for privacy. Choose 1km for smoother neighbourhood averages.

## `maxAddressLookups` (type: `integer`):

Addresses are geocoded via OpenStreetMap Nominatim at max. 1 request per second (usage policy). For large batches pass lat/lon instead.

## Actor input object example

```json
{
  "locations": [
    {
      "label": "Berlin Alexanderplatz",
      "address": "Alexanderplatz 1, 10178 Berlin"
    },
    {
      "label": "Leipzig centre",
      "lat": 51.3397,
      "lon": 12.3731
    }
  ],
  "minResolution": "100m",
  "maxAddressLookups": 100
}
```

# Actor output Schema

## `profiles` (type: `string`):

One item per input location: Census 2022 rent per m², vacancy rate, population, owner-occupancy, average age, buildings by construction decade and dwellings by heating type, each with grid resolution and cell id, plus status and attribution.

## `overview` (type: `string`):

Key values per location as a table view.

# 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 = {
    "locations": [
        {
            "label": "Berlin Alexanderplatz",
            "address": "Alexanderplatz 1, 10178 Berlin"
        },
        {
            "label": "Leipzig centre",
            "lat": 51.3397,
            "lon": 12.3731
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("stevenkramp/germany-neighborhood-profile").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 = { "locations": [
        {
            "label": "Berlin Alexanderplatz",
            "address": "Alexanderplatz 1, 10178 Berlin",
        },
        {
            "label": "Leipzig centre",
            "lat": 51.3397,
            "lon": 12.3731,
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("stevenkramp/germany-neighborhood-profile").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 '{
  "locations": [
    {
      "label": "Berlin Alexanderplatz",
      "address": "Alexanderplatz 1, 10178 Berlin"
    },
    {
      "label": "Leipzig centre",
      "lat": 51.3397,
      "lon": 12.3731
    }
  ]
}' |
apify call stevenkramp/germany-neighborhood-profile --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,stevenkramp/germany-neighborhood-profile"
        }
    }
}
```

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/ypX0tDnXDjZdD5wyt/builds/SMp4LF1kIlnXIbzZd/openapi.json
