Skip to content

unik-w/MietRadar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MietRadar πŸ“‘

Automated Apartment & WG Application Bot for Germany β€” WG-Gesucht + ImmobilienScout24

Scan. Apply. Move in. β€” An AI-powered Python bot that monitors WG-Gesucht and ImmobilienScout24, automatically applies to new rental listings, and personalises each application using an LLM β€” either fully local, or via a hosted API (Google Gemini, OpenAI).

Python 3.10+ License: GPL Platforms


What is MietRadar?

Finding an apartment in Germany β€” especially in cities like Munich, Berlin, or Hamburg β€” is brutally competitive. Listings disappear within minutes. MietRadar monitors WG-Gesucht and ImmobilienScout24 around the clock, instantly applies to new listings matching your search filters, and optionally uses an LLM to write a personalised paragraph for each application. Choose the backend that fits you: a local Gemma 3 4B-IT model (no API costs, runs on your machine), or a hosted API β€” Google Gemini (Developer API key or Vertex AI) or OpenAI (e.g. GPT-5 nano).

Keywords: Wohnung Bot, WG Bot, apartment bot Germany, Wohnungssuche automatisieren, WG-Gesucht Bot, ImmobilienScout24 Bot, rental application automation, Mietwohnung Bot, automated apartment search Germany, Bewerbung automatisch senden

Disclaimer: Use at your own risk. Respect the platforms' terms of service. This tool is provided "as is" without warranty.

Features

Feature Description
🏠 Dual Platform Supports both WG-Gesucht and ImmobilienScout24
πŸ”„ Zero-Touch Loop Scans search results every N minutes, applies to new listings automatically
πŸ₯· Stealth Automation Chrome with anti-detection patches, human-like typing & clicking
🚫 Smart Blacklisting Auto-blocks sent listings, skips sponsored/agency ads, manual override lists
🧠 AI Personalisation Multi-provider LLM (local Gemma 3 4B-IT, Google Gemini, or OpenAI) generates a unique paragraph per listing (optional)
πŸ“Š Reply Tracking CSV reports with 🟒/🟑/πŸ”΄ status for each application
⚑ Shared Pipeline Single message template, LLM persona, and helper functions for both platforms

Directory Structure

miet-radar/
β”œβ”€β”€ config/                         # User-editable configurations
β”‚   β”œβ”€β”€ .env                        # Secrets (credentials, URLs, HF token)
β”‚   β”œβ”€β”€ .env.example                # Template for .env
β”‚   β”œβ”€β”€ llm_persona.txt             # LLM prompt/identity (editable)
β”‚   β”œβ”€β”€ message.txt                 # Shared message template (both bots)
β”‚   β”œβ”€β”€ message.txt.example         # Template for message.txt
β”‚   β”œβ”€β”€ wg_blacklist.txt            # Manual blacklist for WG-Gesucht
β”‚   β”œβ”€β”€ wg_blacklist.txt.example    # Template
β”‚   β”œβ”€β”€ immo_blacklist.txt          # Manual blacklist for ImmoScout24
β”‚   └── immo_blacklist.txt.example  # Template
β”œβ”€β”€ data/                           # Runtime data (auto-generated, DO NOT EDIT)
β”‚   β”œβ”€β”€ wg_diff.dat                 # Processed WG IDs
β”‚   β”œβ”€β”€ wg_sent_request.dat         # WG audit log with timestamps
β”‚   β”œβ”€β”€ wg_replies_report.csv       # WG reply tracker
β”‚   β”œβ”€β”€ wg_offer.json               # WG scan snapshot
β”‚   β”œβ”€β”€ wgbot_profile/              # WG browser session cache
β”‚   β”œβ”€β”€ immo_diff.dat               # Processed ImmoScout IDs
β”‚   β”œβ”€β”€ immo_sent_request.dat       # ImmoScout audit log
β”‚   β”œβ”€β”€ immo_replies_report.csv     # ImmoScout reply tracker
β”‚   β”œβ”€β”€ immo_offer.json             # ImmoScout scan snapshot
β”‚   └── immobot_profile/            # ImmoScout browser session cache
β”œβ”€β”€ src/                            # Core Python application logic
β”‚   β”œβ”€β”€ wg-gesucht.py               # Main loop β€” WG-Gesucht
β”‚   β”œβ”€β”€ submit_wg.py                # WG browser automation & form submission
β”‚   β”œβ”€β”€ check_replies.py            # WG reply tracker
β”‚   β”œβ”€β”€ immoscout.py                # Main loop β€” ImmobilienScout24
β”‚   β”œβ”€β”€ submit_immo.py              # IS24 browser automation & form submission
β”‚   β”œβ”€β”€ check_replies_immo.py       # IS24 reply tracker
β”‚   └── llm_personalizer.py         # Shared LLM inference (Gemma 3 4B-IT, Gemini, OpenAI)
β”œβ”€β”€ tests/                          # Tests (no live sends)
β”‚   β”œβ”€β”€ test_llm_personalizer.py    # WG end-to-end test
β”‚   β”œβ”€β”€ test_immo.py                # IS24 end-to-end test
β”‚   β”œβ”€β”€ test_stealth.py             # Browser stealth validation
β”‚   └── test_llm_only.py            # Isolated LLM test
β”œβ”€β”€ scripts/
β”‚   └── setup.sh                    # One-command setup script
β”œβ”€β”€ README.md
└── requirements.txt

Quick Start

1. Prerequisites

  • Python 3.10+
  • Google Chrome installed

2. Setup (One Command)

git clone https://github.com/unik-w/MietRadar
cd miet-radar
bash scripts/setup.sh

The setup script creates a virtual environment, installs all dependencies, and scaffolds config files from templates.

2b. Manual Install (Alternative)

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp config/.env.example config/.env
cp config/message.txt.example config/message.txt

3. Configuration

  1. Credentials β€” Edit config/.env:

    • WG-Gesucht: WG_EMAIL, WG_PASSWORD, WG_SEARCH_URLS
    • ImmoScout24: IMMO_EMAIL, IMMO_PASSWORD, IMMO_SEARCH_URLS and personal details (IMMO_FIRST_NAME, IMMO_LAST_NAME, etc.) for the IS24 contact form.
    • (Optional) HF_TOKEN for LLM Personalisation.
  2. Message Template β€” Edit config/message.txt:

    • Use {name} for the landlord's name (auto-filled)
    • Use {LLM_TEXT} for the AI-generated paragraph (auto-filled when LLM is enabled)
  3. LLM Persona (Optional) β€” Edit config/llm_persona.txt: Set USE_LLM_PERSONALIZATION=true in .env to enable. The persona auto-adapts to WG vs. apartment listings.

    Choose the LLM backend via LLM_PROVIDER in .env:

    LLM_PROVIDER Backend Required .env vars
    gemma_local (default) Local Gemma 3 4B-IT (HuggingFace + PyTorch, runs on your machine) HF_TOKEN
    gemini Google Gemini API β€” Developer API key or Vertex AI GEMINI_MODEL + either GEMINI_API_KEY or (GOOGLE_GENAI_USE_VERTEXAI=true, GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION, and gcloud auth application-default login)
    openai OpenAI API (e.g. GPT-5 nano) OPENAI_MODEL, OPENAI_API_KEY

    Install the extra SDKs only for the backend(s) you use: pip install google-genai (Gemini) and/or pip install openai (OpenAI).

    πŸ’Έ Free credits tip: new Google Cloud accounts get $300 in free credit (valid ~90 days), usable against Vertex AI usage β€” not just Gemini. Vertex AI's Model Garden also hosts third-party models (e.g. Anthropic Claude) and open-source models (Llama, Mistral, and others), so the same credit can be used to experiment with those too, not only Google's own models. To use Vertex AI instead of a plain Gemini API key:

    1. Install the gcloud CLI: brew install --cask google-cloud-sdk (macOS)
    2. gcloud auth application-default login (one-time browser login)
    3. gcloud services enable aiplatform.googleapis.com --project=<your-project-id>
    4. Set GOOGLE_GENAI_USE_VERTEXAI=true, GOOGLE_CLOUD_PROJECT, and GOOGLE_CLOUD_LOCATION in .env

    Note: model availability varies by project/region on Vertex AI β€” if a model 404s, check the Model Garden for exact IDs enabled for your project, or try location=global for newer preview models.

  4. Blacklists:

    • config/wg_blacklist.txt β€” paste WG-Gesucht URLs to ignore
    • config/immo_blacklist.txt β€” paste ImmoScout expose IDs to ignore

4. First Run & CAPTCHAs 🧩

On first run, the platform will likely show a CAPTCHA. The bot detects this and pauses β€” solve it manually in the browser window. Subsequent runs use saved session cookies from data/wgbot_profile/ or data/immobot_profile/.

Usage

Run the WG-Gesucht Bot

source venv/bin/activate
python src/wg-gesucht.py

Run the ImmobilienScout24 Bot

source venv/bin/activate
python src/immoscout.py

Both bots run independently as continuous loops. They scan multiple search result pages, apply to new listings, update blacklists, and sleep for CHECK_INTERVAL_SECONDS (configurable in .env).

Reply Tracking πŸ“Š

Generate a report of all sent applications and their reply status:

Command Report File
python src/check_replies.py data/wg_replies_report.csv
python src/check_replies_immo.py data/immo_replies_report.csv

Status indicators:

  • 🟒 Replied β€” host has responded
  • 🟑 Pending β€” no reply yet, sent < 3 days ago
  • πŸ”΄ No Reply β€” no response after 3+ days

Testing (Dry Run)

Test the full pipeline without sending any messages:

# WG-Gesucht β€” scrape + LLM personalisation
python tests/test_llm_personalizer.py --listings 3

# ImmobilienScout24 β€” scrape + LLM personalisation
python tests/test_immo.py --listings 3

# ImmoScout24 β€” template only, no LLM (fast scraping test)
python tests/test_immo.py --no-llm --listings 3

# Browser stealth validation
python tests/test_stealth.py

How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Scan search │───▢│ Filter: skip │───▢│ Extract desc  │───▢│ Generate msg β”‚
β”‚  result pagesβ”‚    β”‚ sponsored &  β”‚    β”‚ + contact nameβ”‚    β”‚ (template +  β”‚
β”‚  (paginated) β”‚    β”‚ blacklisted  β”‚    β”‚ from expose   β”‚    β”‚  LLM paragraphβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                                                                   β”‚
                                                                   β–Ό
                                                           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                                           β”‚ Fill form &  β”‚
                                                           β”‚ send message β”‚
                                                           β”‚ (stealth)    β”‚
                                                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Credits & History πŸ“œ

This project is an advanced evolution of the original immo repository by nickirk.

While MietRadar has been completely restructured and modernized with Python 3 support, dual-platform automation, Selenium stealth techniques, and LLM-based personalization, the original git history has been merged and preserved to ensure proper attribution to the foundational work of the original contributors.

About

Python bot for automating WG-Gesucht applications using Selenium, LLMs (Gemma via HuggingFace), and intelligent filtering. Generates personalized rental messages at scale with anti-bot handling, agency blacklisting, and automated listing parsing.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages