# Hemnet Scraper – Swedish Real Estate Listings & Sold Prices (`haketa/hemnet-scraper`) Actor

Extract active listings AND sold prices (slutpriser) from Hemnet.se, Sweden's #1 property portal. Price, m² price, rooms, fee, address, broker, coordinates & sale history.

- **URL**: https://apify.com/haketa/hemnet-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** Real estate, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Hemnet Scraper – Swedish Real Estate Listings & Sold Prices (Slutpriser)

Extract **active property listings** *and* **historical sold prices (slutpriser)** from [Hemnet.se](https://www.hemnet.se) — Sweden's #1 real estate marketplace, where **90%+ of all Swedish homes for sale are advertised**. Pull clean, structured JSON, CSV, or Excel data with asking prices, final sale prices, price per square meter, fees, rooms, living area, addresses, broker details, GPS coordinates and more.

Whether you are building a property valuation model, monitoring the Swedish housing market, generating real-estate leads, or feeding a data product — this scraper turns Hemnet into a reliable, on-demand data feed. **No code, no infrastructure, no maintenance.**

> 🇸🇪 **The only Hemnet scraper that covers BOTH homes for sale *and* sold prices.** Most tools only scrape active listings. Sold prices (slutpriser) are the single most valuable dataset on Hemnet — and the one your competitors don't have.

---

### ⭐ Why this Hemnet scraper?

- ✅ **Sold prices (slutpriser) included** — scrape 1.5M+ historical sales with final price, asking price, price change %, and sale date. Perfect for valuations and CMA.
- ✅ **Active listings (till salu)** — every home currently for sale, with asking price, fee and m² price.
- ✅ **Dead-simple targeting** — paste any Hemnet search URL (set your filters on the site, copy the link), or try a plain location name like "Stockholm".
- ✅ **Powerful filters** — property type, price range, number of rooms, living area, and time window for sold homes.
- ✅ **30+ structured fields** — addresses, coordinates, brokers, agencies, fees, areas and more.
- ✅ **Optional deep enrichment** — pull full descriptions and all photos for every property.
- ✅ **Reliable at scale** — automatic pagination and de-duplication across thousands of listings.
- ✅ **Any format** — export to JSON, CSV, Excel, XML, or pull via API.

---

### 📋 Table of contents

1. [What is Hemnet?](#-what-is-hemnet)
2. [What data can you extract?](#-what-data-can-you-extract)
3. [Use cases](#-use-cases--who-is-this-for)
4. [How to use the Hemnet scraper](#-how-to-use-the-hemnet-scraper)
5. [Input examples](#-input-examples)
6. [Output example](#-output-example)
7. [Output fields reference](#-output-fields-reference)
8. [Tips for best results](#-tips-for-best-results)
9. [FAQ](#-frequently-asked-questions)
10. [Integrations](#-integrations--exporting-your-data)

---

### 🏠 What is Hemnet?

[Hemnet](https://www.hemnet.se) is Sweden's largest and most popular property platform. It is the central marketplace for buying and selling homes in Sweden, with **over 90% of all property sales** passing through the site. Millions of Swedes visit Hemnet every week to browse:

- 🏢 **Bostadsrätter** (cooperative apartments)
- 🏡 **Villor** (houses)
- 🏘️ **Radhus** (townhouses)
- 🌲 **Fritidshus** (vacation homes)
- 🌳 **Tomter** (plots of land)
- 🚜 **Gårdar** (farms)

Because Hemnet aggregates nearly the entire Swedish housing market — both **current listings** and a deep archive of **final sale prices** — it is the single richest public source of Swedish real-estate data. This scraper unlocks that data for analysis, automation and product building.

---

### 📦 What data can you extract?

This actor extracts two complementary datasets from Hemnet:

#### 1. Homes for sale (till salu)
Everything currently on the market: asking price, monthly fee, price per square meter, rooms, living area, address, area, municipality, broker and agency, GPS coordinates, and a thumbnail image.

#### 2. Sold prices (slutpriser) — the money data 💰
Hemnet keeps a public archive of **1.5+ million sold homes**. For each sold property you get the **final sale price**, the original **asking price**, the **price change in % and SEK** (how far above or below asking it sold), the **sale date**, and full property specs. This is the dataset that powers:

- Automated valuation models (AVMs)
- Comparative market analysis (CMA)
- "What did the neighbor's apartment sell for?" tools
- Investment and yield analysis
- Market trend dashboards

Nothing else on the market combines both in a single, easy-to-use scraper.

---

### 🎯 Use cases — who is this for?

#### 🏦 Real estate investors & analysts
Track sold prices and asking prices across neighborhoods to spot under- and over-valued areas, calculate yields, and time the market.

#### 💼 PropTech & startups
Power your app, valuation model, or comparison site with fresh Swedish housing data — without building and maintaining a scraper yourself.

#### 📊 Market researchers & journalists
Analyze price trends, days on market, price-per-m² by region, and how final prices compare to asking prices over time.

#### 🏘️ Real estate agencies & brokers
Benchmark your listings against the competition, monitor pricing in your area, and build automated CMA reports for clients.

#### 🎯 Lead generation
Identify new listings and the brokers/agencies behind them for B2B outreach and partnership opportunities.

#### 🏦 Banks & mortgage lenders
Feed sold-price data into risk and collateral valuation models for the Swedish market.

#### 🤖 Data products & AI
Build training datasets and feeds for real-estate machine learning models, chatbots, and analytics dashboards.

---

### 🚀 How to use the Hemnet scraper

You don't need any coding skills. There are two ways to target properties:

#### ✅ Recommended: paste a Hemnet search URL (most reliable)
1. Go to [hemnet.se](https://www.hemnet.se) and search normally — pick your area, property type, price range, and (for sold prices) open the **Slutpriser** tab.
2. Copy the URL from your browser's address bar.
3. Paste it into the **Start URLs** field of this actor. You can add several URLs.
4. Set **Max items** if you want a limit, then click **Start**.

The scraper auto-detects whether the URL is for homes *for sale* or *sold prices*, handles pagination, and streams results into your dataset. Export to JSON, CSV, Excel, or pull via the API.

> 💡 This is the most reliable method because the URL already contains Hemnet's exact area IDs and filters.

#### ⚡ Quick: type a location name (best-effort)
1. **Choose a listing type** — *For sale* (till salu) or *Sold prices* (slutpriser).
2. **Enter a location** — e.g. `Stockholm` or `Göteborg`. The scraper attempts to resolve it automatically.
3. **(Optional) add filters** — property types, price range, rooms, living area, and (for sold homes) the time window.
4. Click **Start**.

If a location name can't be resolved, the actor will tell you — just switch to the **Start URLs** method above, which always works.

---

### 📝 Input examples

#### Example 1 — Apartments for sale in Stockholm
```json
{
  "listingType": "forSale",
  "location": "Stockholm",
  "propertyTypes": ["bostadsratt"],
  "maxItems": 200
}
````

#### Example 2 — Sold houses in Göteborg over the last 12 months 💰

```json
{
  "listingType": "sold",
  "location": "Göteborgs kommun",
  "propertyTypes": ["villa"],
  "soldAge": "12m",
  "maxItems": 500
}
```

#### Example 3 — High-end sold apartments in Stockholm county, 3+ rooms

```json
{
  "listingType": "sold",
  "location": "Stockholms län",
  "propertyTypes": ["bostadsratt"],
  "roomsMin": 3,
  "priceMin": 8000000,
  "soldAge": "12m"
}
```

#### Example 4 — Crawl a ready-made Hemnet URL with full details

```json
{
  "startUrls": [
    { "url": "https://www.hemnet.se/salda/bostader?location_ids%5B%5D=17744&item_types%5B%5D=villa&sold_age=12m" }
  ],
  "fetchDetails": true,
  "maxItems": 100
}
```

***

### 📤 Output example

Each property is saved as a clean JSON record. Example of a **sold** apartment:

```json
{
  "listingType": "sold",
  "id": "21234567",
  "url": "https://www.hemnet.se/salda/lagenhet-3rum-sodermalm-stockholms-kommun-21234567",
  "propertyType": "Lägenhet",
  "address": "Götgatan 25",
  "area": "Södermalm",
  "municipality": "Stockholms kommun",
  "county": "Stockholms län",
  "askingPrice": 5200000,
  "finalPrice": 5650000,
  "priceChange": 450000,
  "priceChangePercent": 8.7,
  "squareMeterPrice": 94166,
  "fee": 3120,
  "rooms": "3",
  "livingArea": 60,
  "supplementalArea": null,
  "plotArea": null,
  "constructionYear": "1928",
  "soldDate": "2026-05-14",
  "broker": "Anna Svensson",
  "brokerAgency": "Notar",
  "latitude": 59.3148,
  "longitude": 18.0732,
  "thumbnail": "https://bilder.hemnet.se/images/...",
  "scrapedAt": "2026-06-02T10:00:00.000Z"
}
```

And an **active** listing:

```json
{
  "listingType": "forSale",
  "id": "21987654",
  "url": "https://www.hemnet.se/bostad/villa-6rum-kungsbacka-21987654",
  "propertyType": "Villa",
  "address": "Ekvägen 12",
  "area": "Kungsbacka",
  "municipality": "Kungsbacka kommun",
  "askingPrice": 7950000,
  "finalPrice": null,
  "squareMeterPrice": 51290,
  "fee": null,
  "rooms": "6",
  "livingArea": 155,
  "plotArea": 850,
  "constructionYear": "2005",
  "broker": "Erik Larsson",
  "brokerAgency": "Fastighetsbyrån",
  "latitude": 57.4878,
  "longitude": 12.0765,
  "scrapedAt": "2026-06-02T10:00:00.000Z"
}
```

***

### 📚 Output fields reference

| Field | Description |
|---|---|
| `listingType` | `forSale` or `sold` |
| `id` | Hemnet listing ID |
| `url` | Direct link to the property page |
| `propertyType` | Apartment, house, townhouse, plot, etc. |
| `address` | Street address |
| `area` | Neighborhood / district |
| `municipality` | Municipality (kommun) |
| `county` | County (län) |
| `askingPrice` | Listed asking price in SEK |
| `finalPrice` | Final sale price in SEK (sold homes only) |
| `priceChange` | Difference between final and asking price (SEK) |
| `priceChangePercent` | Price change vs. asking, in % |
| `squareMeterPrice` | Price per square meter (SEK/m²) |
| `fee` | Monthly association fee (SEK), apartments |
| `rooms` | Number of rooms |
| `livingArea` | Living area in m² |
| `supplementalArea` | Supplemental area (biarea) in m² |
| `plotArea` | Plot / land area in m² |
| `constructionYear` | Year built |
| `soldDate` | Date the property was sold |
| `broker` | Listing broker name |
| `brokerAgency` | Real estate agency |
| `latitude` / `longitude` | GPS coordinates |
| `thumbnail` | Primary image URL |
| `scrapedAt` | When the record was collected (ISO 8601) |

When **Fetch full details** is enabled, records also include a full `description` and an `images` array.

***

### 💡 Tips for best results

- 🔗 **Use Start URLs for precise targeting.** Set your filters on hemnet.se, copy the URL, and paste it in — it's the most accurate way to get exactly the segment you want.
- 🔍 **Be specific with locations.** "Stockholm" matches the city, but "Stockholms län" (county) or "Stockholms kommun" (municipality) give you a precise area.
- 📄 **A single Hemnet search returns at most ~2,500 results.** To collect more, split a large area into smaller districts or municipalities and run them separately (or as multiple Start URLs).
- ⚡ **Skip "Fetch full details" for large jobs.** It collects extra data for every property and is slower. Leave it off when you only need the core fields.
- 💰 **For valuations, use `sold` + `soldAge: 12m`.** Recent comparable sales are the gold standard for estimating value.
- 🎯 **Combine filters** (price + rooms + area) to zero in on exactly the segment you care about.

***

### ❓ Frequently asked questions

#### Does this scraper get sold prices (slutpriser)?

**Yes** — and that's its biggest advantage. Set `listingType` to `sold` to scrape Hemnet's archive of final sale prices, including how much above or below asking each home sold for. Most other Hemnet scrapers only cover active listings.

#### Do I need to know Hemnet's location IDs?

No. The easiest and most reliable approach is to search on hemnet.se the way you normally would, then copy the URL from your browser into **Start URLs** — the area IDs are already baked into that link. You can also just type a location name (best-effort); if it can't be resolved, the actor will ask you to use a Start URL.

#### What's the difference between asking price and final price?

**Asking price** (utgångspris) is what the seller advertised. **Final price** (slutpris) is what the home actually sold for. The `priceChange` and `priceChangePercent` fields show the gap — a key market-temperature indicator.

#### How many properties can I scrape?

As many as you need across multiple searches. Note that a single Hemnet search is capped at ~2,500 results by the site itself, so split large areas into smaller ones to go beyond that.

#### What formats can I export to?

JSON, CSV, Excel, XML, RSS, or programmatically via the Apify API. The data also includes a clean tabular **overview** view in the dataset.

#### Can I run this on a schedule?

Yes. Use Apify Schedules to run the scraper hourly, daily, or weekly and keep your dataset fresh — great for monitoring new listings or tracking sold prices over time.

#### Can I get notified of new listings?

Combine scheduled runs with Apify integrations (webhooks, Make, Zapier, Slack, email) to get alerts whenever new properties match your criteria.

***

### 🔌 Integrations & exporting your data

This actor works seamlessly with the Apify ecosystem:

- **API** — pull results programmatically with a single HTTP request.
- **Webhooks** — trigger downstream workflows when a run finishes.
- **Make / Zapier** — connect Hemnet data to thousands of apps with no code.
- **Google Sheets, Slack, email** — push results where your team works.
- **Schedules** — automate recurring runs to keep data fresh.

Results can be downloaded as JSON, CSV, Excel, XML, or RSS at any time.

***

### 🆘 Support

Found a bug or need a new field or filter? Open an issue on the actor's **Issues** tab. Feedback and feature requests are welcome — this scraper is actively maintained.

**Happy scraping! 🏠🇸🇪**

# Actor input Schema

## `listingType` (type: `string`):

Scrape homes that are currently FOR SALE, or historical SOLD prices (slutpriser).

## `location` (type: `string`):

Optional free-text place name (e.g. "Stockholm", "Göteborg"). The actor tries to resolve it to a Hemnet area automatically. For guaranteed results, use Start URLs below instead.

## `propertyTypes` (type: `array`):

Which dwelling types to include. Empty = all types.

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

The most reliable way to scrape: open hemnet.se, set your filters (area, type, price…), then copy the URL from your browser and paste it here. Works for both homes for sale (https://www.hemnet.se/bostader?...) and sold prices (https://www.hemnet.se/salda/bostader?...). Sold vs. for-sale is detected automatically from the URL. Takes priority over the Location field.

## `soldAge` (type: `string`):

Time window for sold listings. Ignored when scraping homes for sale.

## `priceMin` (type: `integer`):

Minimum price filter in Swedish kronor.

## `priceMax` (type: `integer`):

Maximum price filter in Swedish kronor.

## `roomsMin` (type: `integer`):

Minimum number of rooms.

## `roomsMax` (type: `integer`):

Maximum number of rooms.

## `livingAreaMin` (type: `integer`):

Minimum living area in square meters.

## `livingAreaMax` (type: `integer`):

Maximum living area in square meters.

## `fetchDetails` (type: `boolean`):

Visit each property page to also collect the full description, all image URLs, association (BRF) info and extra attributes. Slower and uses more proxy traffic.

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

Stop after collecting this many properties (0 = no limit). Note: a single Hemnet search returns at most ~2,500 results; split large areas into districts to go beyond that.

## `maxPagesPerSearch` (type: `integer`):

Hard cap on result pages crawled per search URL (50 pages ≈ 2,500 results max on Hemnet).

## `proxyConfiguration` (type: `object`):

Hemnet uses anti-bot protection. Residential Swedish (SE) proxies are strongly recommended for reliable results.

## Actor input object example

```json
{
  "listingType": "forSale",
  "location": "Stockholm",
  "propertyTypes": [],
  "startUrls": [
    {
      "url": "https://www.hemnet.se/bostader?location_ids%5B%5D=17744&item_types%5B%5D=bostadsratt"
    }
  ],
  "soldAge": "12m",
  "fetchDetails": false,
  "maxItems": 100,
  "maxPagesPerSearch": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "SE"
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Active listings and sold prices collected from Hemnet.

# 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 = {
    "startUrls": [
        {
            "url": "https://www.hemnet.se/bostader?location_ids%5B%5D=17744&item_types%5B%5D=bostadsratt"
        }
    ],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "SE"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/hemnet-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 = {
    "startUrls": [{ "url": "https://www.hemnet.se/bostader?location_ids%5B%5D=17744&item_types%5B%5D=bostadsratt" }],
    "maxItems": 100,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "SE",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/hemnet-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 '{
  "startUrls": [
    {
      "url": "https://www.hemnet.se/bostader?location_ids%5B%5D=17744&item_types%5B%5D=bostadsratt"
    }
  ],
  "maxItems": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "SE"
  }
}' |
apify call haketa/hemnet-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Hemnet Scraper – Swedish Real Estate Listings & Sold Prices",
        "description": "Extract active listings AND sold prices (slutpriser) from Hemnet.se, Sweden's #1 property portal. Price, m² price, rooms, fee, address, broker, coordinates & sale history.",
        "version": "0.1",
        "x-build-id": "0VQADAusONiC0cK2B"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/haketa~hemnet-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-haketa-hemnet-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/haketa~hemnet-scraper/runs": {
            "post": {
                "operationId": "runs-sync-haketa-hemnet-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/haketa~hemnet-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-haketa-hemnet-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": {
                    "listingType": {
                        "title": "Listing type",
                        "enum": [
                            "forSale",
                            "sold"
                        ],
                        "type": "string",
                        "description": "Scrape homes that are currently FOR SALE, or historical SOLD prices (slutpriser).",
                        "default": "forSale"
                    },
                    "location": {
                        "title": "Location (best-effort auto-resolve)",
                        "type": "string",
                        "description": "Optional free-text place name (e.g. \"Stockholm\", \"Göteborg\"). The actor tries to resolve it to a Hemnet area automatically. For guaranteed results, use Start URLs below instead."
                    },
                    "propertyTypes": {
                        "title": "Property types",
                        "type": "array",
                        "description": "Which dwelling types to include. Empty = all types.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "bostadsratt",
                                "villa",
                                "radhus",
                                "fritidshus",
                                "tomt",
                                "gard",
                                "other"
                            ],
                            "enumTitles": [
                                "Apartment (bostadsrätt)",
                                "House (villa)",
                                "Townhouse (radhus)",
                                "Vacation home (fritidshus)",
                                "Plot of land (tomt)",
                                "Farm (gård)",
                                "Other"
                            ]
                        },
                        "default": []
                    },
                    "startUrls": {
                        "title": "Start URLs (recommended)",
                        "type": "array",
                        "description": "The most reliable way to scrape: open hemnet.se, set your filters (area, type, price…), then copy the URL from your browser and paste it here. Works for both homes for sale (https://www.hemnet.se/bostader?...) and sold prices (https://www.hemnet.se/salda/bostader?...). Sold vs. for-sale is detected automatically from the URL. Takes priority over the Location field.",
                        "default": [],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "soldAge": {
                        "title": "Sold within (only for Sold prices)",
                        "enum": [
                            "all",
                            "1m",
                            "3m",
                            "12m"
                        ],
                        "type": "string",
                        "description": "Time window for sold listings. Ignored when scraping homes for sale.",
                        "default": "12m"
                    },
                    "priceMin": {
                        "title": "Min price (SEK)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum price filter in Swedish kronor."
                    },
                    "priceMax": {
                        "title": "Max price (SEK)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum price filter in Swedish kronor."
                    },
                    "roomsMin": {
                        "title": "Min rooms",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum number of rooms."
                    },
                    "roomsMax": {
                        "title": "Max rooms",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of rooms."
                    },
                    "livingAreaMin": {
                        "title": "Min living area (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum living area in square meters."
                    },
                    "livingAreaMax": {
                        "title": "Max living area (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum living area in square meters."
                    },
                    "fetchDetails": {
                        "title": "Fetch full details for each property",
                        "type": "boolean",
                        "description": "Visit each property page to also collect the full description, all image URLs, association (BRF) info and extra attributes. Slower and uses more proxy traffic.",
                        "default": false
                    },
                    "maxItems": {
                        "title": "Max items",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Stop after collecting this many properties (0 = no limit). Note: a single Hemnet search returns at most ~2,500 results; split large areas into districts to go beyond that.",
                        "default": 0
                    },
                    "maxPagesPerSearch": {
                        "title": "Max pages per search",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Hard cap on result pages crawled per search URL (50 pages ≈ 2,500 results max on Hemnet).",
                        "default": 50
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Hemnet uses anti-bot protection. Residential Swedish (SE) proxies are strongly recommended for reliable results.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "SE"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
