Small script to find offers on immoscout24.ch by filtering for travel duration to specific locations and keywords. Please note that this script was created in 2022 for one-time use and later adapted a bit to be configured -> it is rather hacky. Feel free to send a pull request or open an issue if you have propsals etc.
Before you can use the script, you need to create a config file named config.json in the same directory as the script. In this file, the location, target location, price range etc. are defined. An example configuration can be found in sample_config.json
- location is the location for the immoscout search
- s is the type of housing - House is 3, Appartment is 2 and House/Appartment is 1
- t is whether you want to buy or rent - 1 is rent, 2 is buy
- priceFrom, priceTo, roomNumberMin, roomNumberMax - price range and range of amount of rooms
- range - range in km from location to search
- searchkeywords - keyword that need to be in the offer description (or leave empty)
- earliestAvailability - only show offers that are not available prior to this time.
- locations - set the locations and specify how long the commute from the housing to the specified can take (max value). Max value is specified in maxDuration. maxTravelTime is required for the immoscout API.
- transportationTypeId is to specify if commute is by car, public transport or bicycle. 10 is for public transport
Install the requirements: pip3 install -r requirements.txt
After you have configured the config file, you can run the script with: python3 immofinder.py