# Swiss Rentals Scraper - Flatfox, Newhome & Homegate (`memo23/swiss-rentals-scraper`) Actor

Scrape Swiss real-estate from Flatfox, Newhome & Homegate in one run — rent or buy. Get price, rooms, living space, address, geo-coordinates, images, description, amenities, year built & agency. Search by city or paste listing URLs. Homegate’s bot wall solved. Pay per result.

- **URL**: https://apify.com/memo23/swiss-rentals-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** Real estate, AI, Agents
- **Stats:** 18 total users, 17 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 listing 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

<img src="https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/swiss-rentals-logo.png" alt="Swiss Rentals Scraper logo" width="96">

## Swiss Rentals Scraper — Flatfox, Newhome & Homegate

<img src="https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/swiss-rentals-card.png" alt="Swiss Rentals Scraper — Flatfox, Newhome & Homegate" width="760">

Scrape Swiss real-estate listings from **Flatfox**, **Newhome** and **Homegate** in a single run — for **rent** or **for sale**. Get price (gross & net), rooms, living space, full address with geo-coordinates, images, description, amenities, year built and the listing agency. Search by city or region, or paste individual listing URLs. The actor **solves Homegate's DataDome bot protection for you** and returns one clean, unified row shape across all three portals. Pay per result, no monthly fee.

#### How it works

![How the Swiss Rentals Scraper works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-swiss-rentals.png)

#### ✨ Why use this scraper?

- **Three portals, one schema.** Flatfox, Newhome and Homegate return wildly different data structures — this actor normalizes them into a single identical row, so a Zürich flat looks the same whether it came from Homegate or Newhome.
- **Beats Homegate's bot wall.** Homegate is protected by DataDome; the actor unlocks it server-side and parses the embedded listing data — you just get the results.
- **Rent or buy.** Flip one toggle to switch between rental listings (mieten) and properties for sale (kaufen).
- **Fair coverage across sources.** The item budget is split evenly across the selected portals, so one large source can't crowd out the others — you get a genuine cross-market sample.
- **Full detail, including price.** Every row carries the gross price, net rent + extra costs where available, living space, room count, exact street, lat/long, the full image gallery and the plain-text description.
- **Pay per result.** Billed per listing with a hard `maxItems` cap — a run never collects (or charges) more than you set.

#### 🎯 Use cases

| You are… | Use it to… |
|---|---|
| **Real-estate analysts** | Track rents and sale prices by city, canton and property type across all major CH portals |
| **PropTech / listing aggregators** | Feed a unified Swiss listings dataset into your app or CRM |
| **Investors & agencies** | Monitor new supply, price changes and yields in target regions |
| **Relocation & search agents** | Pull fresh matching listings for clients on a schedule |
| **Market researchers** | Measure inventory, price/m² and time-on-market across Flatfox, Newhome & Homegate |

#### 📥 Supported inputs

| Input | Example | What you get |
|---|---|---|
| **Portals** | `["flatfox","newhome","homegate"]` | Any combination of the three sources |
| **City / region keyword** | `Zürich`, `Bern`, `Genève`, `Lausanne` | Listings matching that place on each portal |
| **Direct listing URL** | `https://www.homegate.ch/rent/4002086141` | That single listing, auto-routed to the right parser |
| **Rent or buy** | `RENT` / `BUY` | Rental market or for-sale market |

Leave the keyword list empty to scrape **nationwide** — Flatfox and Homegate cover all of Switzerland, and Newhome falls back to the major regions.

#### 📤 Output

Every listing is one row with an identical shape across all three portals:

```json
{
  "type": "listing",
  "site": "homegate",
  "listingId": "4002086141",
  "url": "https://www.homegate.ch/rent/4002086141",
  "title": "Cosy Studio Apartment close to Zürich centre",
  "offerType": "RENT",
  "propertyType": "APARTMENT",
  "price": 1971,
  "currency": "CHF",
  "rooms": 1,
  "livingSpace": 17,
  "street": "Rotbuchstrasse 9",
  "zip": "8006",
  "city": "Zürich",
  "canton": "ZH",
  "country": "CH",
  "latitude": 47.386581,
  "longitude": 8.548506,
  "images": ["https://media2.homegate.ch/.../image.jpg"],
  "description": "Neu eröffnet! Zentral gelegene Apartments …",
  "attributes": ["hasParking", "hasElevator", "hasDishwasher"],
  "yearBuilt": 2025,
  "availableFrom": "2026-10-01T00:00:00",
  "agency": "City Pop",
  "scrapedAt": "2026-07-02T10:00:00.000Z",
  "sourceUrl": "https://www.homegate.ch/rent/4002086141"
}
````

Export as **JSON, CSV, Excel** or via API.

#### ⚙️ How it works, per source

| Portal | Access | Notes |
|---|---|---|
| **Flatfox** | Public sitemap → server-rendered detail pages | Free; ~34,600 listings indexed |
| **Newhome** | Open JSON API (search → detail) | Free; price & description come from the detail call |
| **Homegate** | DataDome-protected — solved via built-in unlocker | The proxy input is only used for Flatfox & Newhome |

#### 💳 Pricing

This actor is **pay-per-result**: you're billed for each listing pushed to the dataset, capped by `maxItems`. Flatfox and Newhome are scraped for free; Homegate goes through a paid unlocker, and that cost is already blended into the flat per-result price — no surprises, no separate proxy bill.

#### ❓ FAQ

- **Do I need my own proxies?** No. Homegate is unlocked for you. Flatfox and Newhome work on Apify's proxy (residential recommended for large runs).
- **Rent and buy in one run?** Not simultaneously — run once with `RENT` and once with `BUY`.
- **How current is the data?** Live — every field is fetched at run time from each portal.
- **Can I schedule it?** Yes, use Apify Schedules to run it hourly/daily and diff the output.

> This tool is for lawful data collection of publicly available listings. Respect each portal's terms and applicable laws.

# Actor input Schema

## `sites` (type: `array`):

Which Swiss portals to scrape. Default: all three.

## `searchTerms` (type: `array`):

Places to search, e.g. `Zürich`, `Bern`, `Genève`, `Lausanne`. Leave empty to scrape nationwide (Flatfox & Homegate cover all of Switzerland; Newhome falls back to major regions).

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

Paste individual Flatfox / Newhome / Homegate listing URLs — each is auto-routed to the right portal. When provided, keyword search is skipped.

## `transactionType` (type: `string`):

Scrape rentals (mieten) or properties for sale (kaufen).

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

Hard cap on listings collected (and billed) across all portals.

## `maxConcurrency` (type: `integer`):

Parallel requests. Default 5 is tuned for the built-in proxy — raising it speeds runs up but may lower the success rate unless you supply your own rotating proxy below.

## `proxy` (type: `object`):

Leave empty — the actor already routes all traffic through its own built-in residential proxy at no extra cost to you. Only set this if you want to use your own proxies.

## `enrichEmails` (type: `boolean`):

If enabled, finds a contact email for each result from its own website (or by discovering it from the name). Adds contactEmail + contactWebsite columns plus a detailed emailEnrichment object. Best-effort.

## Actor input object example

```json
{
  "sites": [
    "flatfox",
    "newhome",
    "homegate"
  ],
  "searchTerms": [
    "Zürich"
  ],
  "startUrls": [],
  "transactionType": "RENT",
  "maxItems": 1000,
  "maxConcurrency": 5,
  "enrichEmails": false
}
```

# 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 = {
    "sites": [
        "flatfox",
        "newhome",
        "homegate"
    ],
    "searchTerms": [
        "Zürich"
    ],
    "startUrls": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/swiss-rentals-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 = {
    "sites": [
        "flatfox",
        "newhome",
        "homegate",
    ],
    "searchTerms": ["Zürich"],
    "startUrls": [],
}

# Run the Actor and wait for it to finish
run = client.actor("memo23/swiss-rentals-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "sites": [
    "flatfox",
    "newhome",
    "homegate"
  ],
  "searchTerms": [
    "Zürich"
  ],
  "startUrls": []
}' |
apify call memo23/swiss-rentals-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=memo23/swiss-rentals-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Swiss Rentals Scraper - Flatfox, Newhome & Homegate",
        "description": "Scrape Swiss real-estate from Flatfox, Newhome & Homegate in one run — rent or buy. Get price, rooms, living space, address, geo-coordinates, images, description, amenities, year built & agency. Search by city or paste listing URLs. Homegate’s bot wall solved. Pay per result.",
        "version": "0.0",
        "x-build-id": "kklxbElepgdwyLR4F"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/memo23~swiss-rentals-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-memo23-swiss-rentals-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/memo23~swiss-rentals-scraper/runs": {
            "post": {
                "operationId": "runs-sync-memo23-swiss-rentals-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/memo23~swiss-rentals-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-memo23-swiss-rentals-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "sites": {
                        "title": "Portals",
                        "type": "array",
                        "description": "Which Swiss portals to scrape. Default: all three.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "flatfox",
                                "newhome",
                                "homegate"
                            ],
                            "enumTitles": [
                                "Flatfox",
                                "Newhome",
                                "Homegate"
                            ]
                        },
                        "default": [
                            "flatfox",
                            "newhome",
                            "homegate"
                        ]
                    },
                    "searchTerms": {
                        "title": "City / region keywords",
                        "type": "array",
                        "description": "Places to search, e.g. `Zürich`, `Bern`, `Genève`, `Lausanne`. Leave empty to scrape nationwide (Flatfox & Homegate cover all of Switzerland; Newhome falls back to major regions).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Direct listing URLs",
                        "type": "array",
                        "description": "Paste individual Flatfox / Newhome / Homegate listing URLs — each is auto-routed to the right portal. When provided, keyword search is skipped.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "transactionType": {
                        "title": "Rent or buy",
                        "enum": [
                            "RENT",
                            "BUY"
                        ],
                        "type": "string",
                        "description": "Scrape rentals (mieten) or properties for sale (kaufen).",
                        "default": "RENT"
                    },
                    "maxItems": {
                        "title": "Maximum listings",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Hard cap on listings collected (and billed) across all portals.",
                        "default": 1000
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Parallel requests. Default 5 is tuned for the built-in proxy — raising it speeds runs up but may lower the success rate unless you supply your own rotating proxy below.",
                        "default": 5
                    },
                    "proxy": {
                        "title": "Proxy configuration (optional override)",
                        "type": "object",
                        "description": "Leave empty — the actor already routes all traffic through its own built-in residential proxy at no extra cost to you. Only set this if you want to use your own proxies."
                    },
                    "enrichEmails": {
                        "title": "Enrich with contact emails (experimental)",
                        "type": "boolean",
                        "description": "If enabled, finds a contact email for each result from its own website (or by discovering it from the name). Adds contactEmail + contactWebsite columns plus a detailed emailEnrichment object. Best-effort.",
                        "default": false
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
