# Hemnet Scraper - Sweden Property Data (`benthepythondev/hemnet-scraper`) Actor

Scrape Hemnet (Sweden's #1 property portal): asking price, rooms, living area, address, coordinates, estate agent (broker) name and agency, photos and listing URL. Search by location id or a pasted Hemnet search URL. Reliable, no browser.

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

## Pricing

from $2.00 / 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.

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 — Sweden Property & Estate-Agent Data

Extract real-estate listings from **Hemnet** — Sweden's #1 property portal — in clean, structured form. For every home on a search you get the **asking price, fee, number of rooms, living area, full address, map coordinates, property type, photos, the listing URL** and the **estate agent (broker) name + agency** behind it. Search by Hemnet location id (a county, a kommun or all of Sweden) or by simply pasting a Hemnet search URL with any filter you like, and the scraper paginates the whole result set for you. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### 🔎 What is the Hemnet Scraper?

Hemnet lists virtually every home for sale in Sweden — apartments (bostadsrätter), houses (villor), holiday homes, plots and new-build projects. This actor turns those search results into a tidy dataset you can analyse, enrich or feed into your own tools, without copy-pasting and without running a heavy browser.

#### What data does it extract?

- **Listing identity** — listing id and a direct, clickable Hemnet listing URL.
- **Price** — asking price (numeric, SEK), the original price text, the monthly fee, and the price per square metre.
- **Property facts** — property type (apartment, house, plot, …), number of rooms, living area in m², land area, floor and a new-construction flag.
- **Location** — street address, area/kommun description, and exact **latitude & longitude**.
- **Estate agent (lead-gen)** — **broker name**, **brokerage / agency name**, agency logo and broker photo.
- **Media & timing** — main image URL, number of images and the publish timestamp.
- **Highlights** — feature labels (balcony, elevator, patio, fireplace, …).

### ⬇️ Input

| Field | Type | Description |
| --- | --- | --- |
| `locationIds` | array | Hemnet location id(s), e.g. `"17744"` (Stockholm county) or `"17691"` (all of Sweden). Copy the number from `location_ids[]` in a Hemnet URL, or type a known place name like `"Stockholm"`. |
| `searchUrls` | array | Optional. Paste full Hemnet search URLs (from `hemnet.se/bostader`) to apply any filter — property type, price, rooms, area. Use this **or** `locationIds`. |
| `maxResults` | integer | Max listings per location id / search URL. Default `50`. |
| `useResidentialProxy` | boolean | Route through Apify residential Swedish IPs. Off by default — only enable if you get blocked. |

#### How do I find a location id?

Go to [hemnet.se](https://www.hemnet.se/), search for a city or area, and look at the address bar: the number in `?location_ids[]=17744` is the id. Paste that id (or the whole URL) into the actor. A few ready-to-use ids: **17691** = Sweden, **17744** = Stockholms län, **17936** = Huddinge, **17951** = Järfälla.

#### Example input

```json
{
  "locationIds": ["17744"],
  "maxResults": 50,
  "useResidentialProxy": false
}
````

Or with a filtered search URL (apartments only):

```json
{
  "searchUrls": ["https://www.hemnet.se/bostader?location_ids%5B%5D=17744&item_types%5B%5D=bostadsratt"],
  "maxResults": 100
}
```

### ⬆️ Output

Each item in the dataset looks like this:

```json
{
  "id": "21733701",
  "url": "https://www.hemnet.se/bostad/lagenhet-1rum-hagerstensasen-stockholms-kommun-sparbanksvagen-6-21733701",
  "record_type": "COMMON",
  "property_type": "Lägenhet",
  "property_type_symbol": "APARTMENT",
  "new_construction": false,
  "asking_price": 1950000,
  "asking_price_text": "1 950 000 kr",
  "currency": "SEK",
  "square_meter_price": 67241,
  "fee_text": "2 480 kr/mån",
  "fee_per_month": 2480,
  "rooms": 1,
  "rooms_text": "1 rum",
  "living_area_sqm": 29,
  "living_area_text": "29 m²",
  "land_area_sqm": null,
  "floor": null,
  "street_address": "Sparbanksvägen 6",
  "location_description": "Hägerstensåsen, Stockholms kommun",
  "latitude": 59.2987251,
  "longitude": 17.9823036,
  "features": ["Balkong", "Hiss"],
  "broker_name": "Nicklas Vigren",
  "broker_agency": "Notar",
  "broker_agency_logo": "https://bilder.hemnet.se/images/broker_logo_1_2x/...jpg",
  "broker_thumbnail": "https://bilder.hemnet.se/images/broker_profile_small/...jpg",
  "description": "Välkommen till denna ljusa etta...",
  "image": "https://bilder.hemnet.se/images/itemgallery_cut/d8/d2/...jpg",
  "num_images": 18,
  "published_at": 1782754331,
  "search": "location_ids=17744"
}
```

### 💡 Use cases

- 🏠 **Market research & pricing** — track asking prices, price/m² and fees across kommuns to spot trends and value gaps.
- 📊 **Lead generation for agents & proptech** — build lists of active listings with the responsible broker and agency for outreach and CRM enrichment.
- 🤖 **Property alerts & feeds** — schedule the actor and push fresh listings into a spreadsheet, database, Make/Zapier flow or a notification bot.
- 🗺️ **Geo & investment analysis** — use the coordinates to map inventory, model neighbourhoods and feed BI dashboards.

### ❓ FAQ

**Which sites does it cover?** Hemnet (`hemnet.se`), the dominant property marketplace in Sweden, covering homes for sale across the country.

**Do I need a Hemnet account or API key?** No. Just provide a location id or a search URL.

**Can I search a specific city or property type?** Yes — paste a Hemnet search URL with your filters already applied (property type, price range, rooms, etc.) and the scraper will follow it.

**How many listings can I get?** Set `maxResults` as high as you need; the actor paginates automatically until it reaches your limit or the result set ends.

**Does it return the estate agent's details?** Yes — the broker's name and the agency (brokerage) name are included whenever Hemnet exposes them, which is the vast majority of listings.

**Does it include map coordinates?** Yes, exact latitude and longitude for each home.

**Do I need a proxy?** Usually not — requests work directly. If you ever get blocked, enable the built-in Swedish residential-proxy option.

**In what formats can I export?** Any Apify dataset format: JSON, CSV, Excel, XML or HTML, via the UI or API.

**Is it legal?** The actor collects only publicly available listing information. You are responsible for using the data in line with Hemnet's terms, the GDPR and any applicable laws — for example, do not use personal data (such as a broker's details) for unsolicited marketing where that is restricted, and respect data-subject rights.

### 🛠️ How it works

Hemnet is a Next.js application that ships its search results inside the page itself (an embedded GraphQL/Apollo cache). The actor requests the search-results page using a real Chrome TLS fingerprint, reads that embedded data — including each listing's broker and agency — normalises it into flat fields, and walks through the pages until your `maxResults` is reached. Because it reads the data the page already contains, it is fast, lightweight and reliable, with an optional Swedish residential-proxy fallback.

### 🔗 You might also like

- **Funda Scraper** — Netherlands property listings.
- **Immobiliare.it Scraper** — Italy property listings.
- **Rightmove Scraper** — UK property listings with agent details.
- **Kleinanzeigen / Willhaben Scrapers** — DACH classifieds and property.

***

**Keywords:** Hemnet scraper, Hemnet API, Sweden real estate scraper, Swedish property data, hemnet.se scraper, bostäder till salu, bostadsrätt scraper, villa scraper, real estate lead generation Sweden, estate agent leads, broker data, property listings Sweden, scrape Hemnet, Hemnet data export, Stockholm property data, Göteborg real estate, Malmö housing data, property price SEK, real estate dataset, proptech Sweden.

# Actor input Schema

## `locationIds` (type: `array`):

Hemnet location id(s) to search, e.g. "17744" (Stockholm county) or "17691" (all of Sweden). Find an id by searching a place on hemnet.se and copying the number from location\_ids\[] in the URL. You can also enter a known place name like "Stockholm". Leave empty if you use Search URLs instead.

## `searchUrls` (type: `array`):

Optional: paste full Hemnet search URLs (from hemnet.se/bostader) to use any filter — property type, price, rooms, area, etc. The scraper paginates each URL automatically. Use this OR Location IDs.

## `maxResults` (type: `integer`):

Maximum number of listings to return per location id / search URL.

## `useResidentialProxy` (type: `boolean`):

Route requests through Apify residential Swedish IPs. Direct requests usually work; only enable this if you start getting blocked (it consumes proxy quota).

## Actor input object example

```json
{
  "locationIds": [
    "17744"
  ],
  "searchUrls": [
    "https://www.hemnet.se/bostader?location_ids%5B%5D=17744&item_types%5B%5D=bostadsratt"
  ],
  "maxResults": 10,
  "useResidentialProxy": 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 = {
    "locationIds": [
        "17744"
    ],
    "searchUrls": [
        "https://www.hemnet.se/bostader?location_ids%5B%5D=17744&item_types%5B%5D=bostadsratt"
    ],
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/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 = {
    "locationIds": ["17744"],
    "searchUrls": ["https://www.hemnet.se/bostader?location_ids%5B%5D=17744&item_types%5B%5D=bostadsratt"],
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/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 '{
  "locationIds": [
    "17744"
  ],
  "searchUrls": [
    "https://www.hemnet.se/bostader?location_ids%5B%5D=17744&item_types%5B%5D=bostadsratt"
  ],
  "maxResults": 10
}' |
apify call benthepythondev/hemnet-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Hemnet Scraper - Sweden Property Data",
        "description": "Scrape Hemnet (Sweden's #1 property portal): asking price, rooms, living area, address, coordinates, estate agent (broker) name and agency, photos and listing URL. Search by location id or a pasted Hemnet search URL. Reliable, no browser.",
        "version": "1.0",
        "x-build-id": "h9d54iTlrloZfs0lk"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~hemnet-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-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/benthepythondev~hemnet-scraper/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-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/benthepythondev~hemnet-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-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": {
                    "locationIds": {
                        "title": "Location IDs",
                        "type": "array",
                        "description": "Hemnet location id(s) to search, e.g. \"17744\" (Stockholm county) or \"17691\" (all of Sweden). Find an id by searching a place on hemnet.se and copying the number from location_ids[] in the URL. You can also enter a known place name like \"Stockholm\". Leave empty if you use Search URLs instead.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "searchUrls": {
                        "title": "Search URLs",
                        "type": "array",
                        "description": "Optional: paste full Hemnet search URLs (from hemnet.se/bostader) to use any filter — property type, price, rooms, area, etc. The scraper paginates each URL automatically. Use this OR Location IDs.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results per search",
                        "minimum": 1,
                        "maximum": 2000,
                        "type": "integer",
                        "description": "Maximum number of listings to return per location id / search URL.",
                        "default": 50
                    },
                    "useResidentialProxy": {
                        "title": "Use residential proxy (SE)",
                        "type": "boolean",
                        "description": "Route requests through Apify residential Swedish IPs. Direct requests usually work; only enable this if you start getting blocked (it consumes proxy quota).",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
