# WG-Gesucht Scraper: Rooms & Flats Germany (`memorable_alphabet/wg-gesucht-scraper`) Actor

Scrapes WG-Gesucht.de listings: shared rooms, 1-room flats, flats and houses to rent in 9 German cities, or from any WG-Gesucht search URL. Plain HTTP, no proxy or login. Returns price, size, availability, district, street, flatmates and posting date.

- **URL**: https://apify.com/memorable_alphabet/wg-gesucht-scraper.md
- **Developed by:** [Mathieu](https://apify.com/memorable_alphabet) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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.

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

## WG-Gesucht Scraper (rooms, flats and houses in Germany)

Scrapes WG-Gesucht.de, Germany's main portal for shared rooms (WG-Zimmer), with flats and houses
too. Search a city by type, rent and size, or paste any WG-Gesucht search URL to use all of the
site's own filters (district, furnished, move-in date, ...). Plain HTTP: no browser, no proxy, no login.

### Input

| Field | Type | Description |
|---|---|---|
| `startUrls` | array | WG-Gesucht **search** URLs. If set, the fields below are ignored. |
| `category` | string | `wg-room` (default), `1-room`, `flat`, `house`. |
| `city` | string | Berlin, München, Hamburg, Köln, Frankfurt am Main, Stuttgart, Düsseldorf, Leipzig, Dresden. |
| `maxRent` / `minSize` | integer | Rent ceiling in EUR per month, size floor in m2. |
| `maxItems` | integer | Cap on results (about 20 per page). Default `200`. |
| `requestDelaySeconds` | integer | Pause between pages. Default `2`. WG-Gesucht throttles fast clients. |
| `storeName` | string | Key-Value store used to skip listings returned by earlier runs with the same name. Empty = no dedup. |

### Output (one row per listing)

`id`, `url`, `title`, `price`, `currency`, `pricePeriod`, `sizeM2`, `availableFrom`,
`availableUntil`, `propertyKind` (for example `3er WG`, `2-Zimmer-Wohnung`), `locationText`,
`streetText`, `city`, `district`, `street`, `postalCode`, `flatmatesCurrent`, `flatmatesTotal`,
`isCompany`, `advertiserName`, `datePosted`, `imageUrl`.

Dates are in the site's format `dd.mm.yyyy`. `flatmates*` is only filled for shared rooms.
The advertiser's phone number and message form are behind a login on WG-Gesucht and are not scraped.

### Monitoring new listings

Sort by newest in your search URL (or use the default order), set `storeName`, and schedule the run.
Each run returns only listings not seen by earlier runs with that store name.

### Notes

- The site throttles bursts of requests (temporary 503). The actor paces requests and retries with
  growing waits; keep `requestDelaySeconds` at 2 or higher.
- Promoted ads appear on every page; they are returned once. The fields `city`, `district`, `street`,
  `postalCode`, `datePosted` and `advertiserName` come from the page's structured data, which
  does not cover promoted ads (about a quarter of rows in a typical run), so they are missing there.
  `locationText` and `streetText` are always present.

# Actor input Schema

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

WG-Gesucht search URLs (e.g. https://www.wg-gesucht.de/wohnungen-in-Berlin.8.2.1.0.html?rMax=900). Build the filters on wg-gesucht.de (any city, district, furnished, ...) and paste the URL. If set, the fields below are ignored.

## `category` (type: `string`):

What kind of listing to search for.

## `city` (type: `string`):

City to search. For other cities, paste a search URL above.

## `maxRent` (type: `integer`):

Maximum monthly rent in euro.

## `minSize` (type: `integer`):

Minimum size in square metres.

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

Cap on the number of listings returned (about 20 per page).

## `requestDelaySeconds` (type: `integer`):

Pause between page requests. WG-Gesucht throttles fast clients, so keep this at 2 or more.

## `maxRequestRetries` (type: `integer`):

Retries per failed page, with growing waits.

## `storeName` (type: `string`):

Name of a Key-Value store used to skip listings already returned by a previous run with the same store name. Leave empty to disable dedup.

## Actor input object example

```json
{
  "startUrls": [],
  "category": "wg-room",
  "city": "Berlin",
  "maxItems": 200,
  "requestDelaySeconds": 2,
  "maxRequestRetries": 3
}
```

# Actor output Schema

## `results` (type: `string`):

All matching listings as a dataset.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("memorable_alphabet/wg-gesucht-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("memorable_alphabet/wg-gesucht-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 '{}' |
apify call memorable_alphabet/wg-gesucht-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memorable_alphabet/wg-gesucht-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/bckxVimeIDqdETmae/builds/RPJQBm4kloe8meqMB/openapi.json
