Inspiration

Finding an apartment in Germany is brutal — especially in university cities like Regensburg. You refresh Kleinanzeigen 50 times a day, copy-paste the same message to every landlord, and still get ghosted. We asked ourselves: what if an AI agent could do all of this for us — find, evaluate, and apply — while we focus on studying?

What it does

NestIQ is a fully autonomous apartment hunting agent. It scrapes rental listings from Kleinanzeigen, filters them by your preferences, and uses AI to score each one on a 1–10 scale — flagging good deals and red flags like agency fees or suspiciously low prices. The best listings get sent to you with a simple Yes or No choice. When you say Yes, an AI agent opens a real browser, navigates to the listing, and sends a personalized application message on your behalf. No manual work, no copy-pasting, no refreshing.

How we built it

The pipeline runs in pure Python. We use BeautifulSoup + httpx to scrape Kleinanzeigen with pagination across all listing pages. A SQLite database handles deduplication so you never see the same listing twice. Groq API (LLaMA 3.3 70B) analyzes each listing and returns a score, green flags, red flags, and a summary. The results are delivered through a Telegram bot with inline buttons.

The auto-apply agent is the core innovation. When the user approves a listing, Playwright launches a real browser and the OpenRouter API (Gemini Flash Lite) takes control. It receives a screenshot of the page, decides what to do next (click, fill, scroll), and sends back a JSON action. Our code executes the action, takes a new screenshot, and loops — up to 10 steps. The agent handles cookie popups, overlays, and form navigation on its own. It is not a hardcoded script — it actually sees the page and makes decisions.

Challenges we faced

  • Kleinanzeigen's two-step login — the login form loads email first, then password on a second screen. We had to detect and handle each step separately.
  • Bot detection — Kleinanzeigen actively fights automation. Hidden form elements, session expiration, and login redirects forced us to implement session management, stealth measures, and smart retry logic.
  • Cookie popups and overlays — multiple banners cover the page. We taught the agent to identify and dismiss them before interacting with the contact form.
  • Parsing unstable HTML — Kleinanzeigen changes their CSS class names frequently. We built flexible selectors with multiple fallbacks.

What we learned

  • Building a real AI agent is fundamentally different from building automation scripts. Scripts break when a button moves. Agents adapt.
  • Session management and anti-bot detection are harder problems than the actual scraping.
  • Keeping things simple wins — SQLite over Postgres, one Python process over microservices, Telegram over a custom frontend.

What's next for NestIQ

  • Add more platforms: WG-Gesucht, Immowelt, Immoscout
  • Multi-user support with individual preferences per Telegram user
  • Let the AI write personalized messages based on each listing's description
  • Deploy on a VPS so it runs 24/7 without a laptop

Built With

Share this project:

Updates