Immoscout searches with exclusioncriteria=swapflat silently return 0 results
What happens
Any Immoscout search URL that contains exclusioncriteria=swapflat (the web UI's "Tauschwohnungen ausschließen" filter) never returns a single listing. No error is logged — the job just quietly finds nothing, which makes this really nasty to track down.
Why
convertWebToMobile() in lib/services/immoscout/immoscout-web-translator.js passes exclusioncriteria through verbatim. The mobile API doesn't know the web value swapflat — it expects swap_flat. And instead of ignoring an unknown value, the API responds with totalResults: 0 for the entire search.
Repro
Same shape search (Munich rentals, ≤1500 €, 1.5+ rooms) against https://api.mobile.immobilienscout24.de/search/list, only the exclusion value changed:
exclusioncriteria |
totalResults |
|---|---|
| (none) | 23 |
swapflat (what the translator sends today) |
0 |
swap_flat |
23 |
projectlisting,swapflat |
0 |
projectlisting,swap_flat |
23 |
Counts were stable across repeated calls. Note projectlisting is fine as-is — both APIs share that value, it's only swapflat that differs.
Fix
Map swapflat → swap_flat during web→mobile conversion, leave every other value untouched. PR incoming.