# Hemnet.se Scraper - Swedish Real Estate Listings (`datascrapers/hemnet-se-scraper`) Actor

Scrape property listings from Hemnet.se including for-sale, upcoming, and sold homes. Search by URL or location query with pagination controls and Apify residential proxy support.

- **URL**: https://apify.com/datascrapers/hemnet-se-scraper.md
- **Developed by:** [Data Scrapers](https://apify.com/datascrapers) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 listings

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

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

**Hemnet.se Scraper** creates a structured dataset of Swedish property listings collected from Hemnet.se. Each dataset item can include the listing id, address, location, asking price, rooms, living area, housing form, broker agency, coordinates, and publication time. Query the source with a Hemnet results URL or with a place name such as Stockholm, plus listing type and property type. Control volume with `maxListings` and `maxPages`. Retrieve records through the Apify Dataset API or export them as JSON, CSV, Excel, XML, or another supported format.

[![Hemnet.se Scraper — location search to listing rows](https://raw.githubusercontent.com/faizanalii/apify-actor-assets/main/hemnet-se-scraper/hemnet-se-scraper-value-demo.gif)](https://apify.com/datascrapers/hemnet-se-scraper)

### Dataset at a glance

| Property | Value |
|---|---|
| Source | hemnet.se |
| Record unit | One property listing |
| Input methods | `startUrls` or `searchQueries` |
| Main identifiers | `id`, `url` |
| Delivery | Apify Dataset and API |
| Export formats | JSON, CSV, Excel, XML |
| Update model | Fresh records per Actor run |
| Pricing | $1.00 per 1,000 `dataset-item` events, plus $1.00 per 1,000 `listing-details` events. Platform usage is billed separately. |

### Coverage and available records

Supported Hemnet sections are for sale, upcoming, and sold. `searchQueries` are place names. The Actor uses the best autocomplete match. `startUrls` can point at `/bostader`, `/kommande/bostader`, or `/salda/bostader` result pages. `itemTypes` filters villa, apartment, housing cooperative, townhouse, holiday home, plot, farm, and other. Room, living-area, and price filters apply to query searches. `expandLocations` accepts 1, 5, 10, 25, or 50 kilometers.

`maxPages` defaults to 3, and Hemnet shows about 50 listings per page. `maxListings` of 0 means no extra cap inside `maxPages`. `listingDetails` fetches the listing page and charges `listing-details`. Search rows still save when details are off. Sold-only fields such as `finalPrice` and `soldAt` are present on sold listings and empty on for-sale cards.

### Data dictionary

| Field | Type | Nullable | Description | Example |
|---|---|---:|---|---|
| id | string | no | Hemnet listing id. Deduplication key. | 21715144 |
| url | string | yes | Public listing page | https://www.hemnet.se/bostad/villa-7rum-staket-jarfalla-kommun-bielkenstiernas-vag-5-21715144 |
| listingType | string | yes | for_sale, upcoming, or sold | for_sale |
| streetAddress | string | yes | Street address | Bielkenstiernas väg 5 |
| locationDescription | string | yes | Area and municipality | Stäket, Järfälla kommun |
| askingPrice | string | yes | Asking price text, SEK | 6 990 000 kr |
| finalPrice | string | yes | Sold price text when the listing is sold | null |
| rooms | string | yes | Room label | 7 rum |
| livingArea | string | yes | Living area text | 179+85 m² |
| landArea | string | yes | Plot area text | 1 296 m² |
| squareMeterPrice | string | yes | Price per square meter | null |
| housingForm | object | yes | Symbol and name | {"symbol": "HOUSE", "name": "Villa"} |
| broker | object | yes | Agency fields. The example keeps the agency name. | {"agencyName": "Mäklarringen Järfälla"} |
| coordinates | object | yes | lat and lng | {"lat": 59.47323, "lng": 17.7998371} |
| publishedAt | string | yes | Publication time, ISO-8601 | 2026-06-20T07:39:46+00:00 |
| soldAt | string | yes | Sale time on sold listings | null |
| details | object | yes | Listing-page payload when `listingDetails` is on | null |

### Example dataset record

```json
{
  "id": "21715144",
  "url": "https://www.hemnet.se/bostad/villa-7rum-staket-jarfalla-kommun-bielkenstiernas-vag-5-21715144",
  "listingType": "for_sale",
  "streetAddress": "Bielkenstiernas väg 5",
  "locationDescription": "Stäket, Järfälla kommun",
  "askingPrice": "6 990 000 kr",
  "rooms": "7 rum",
  "livingArea": "179+85 m²",
  "landArea": "1 296 m²",
  "housingForm": {"symbol": "HOUSE", "name": "Villa"},
  "broker": {"agencyName": "Mäklarringen Järfälla"},
  "coordinates": {"lat": 59.47323, "lng": 17.7998371},
  "publishedAt": "2026-06-20T07:39:46+00:00",
  "totalResults": 10211
}
```

This row is a for-sale villa card from a Stockholm-area Hemnet search. The broker object in the stored dataset can include more agency fields. This example keeps the agency name.

### Query and input reference

| Input | Type | Required | Default | Accepted values | Description |
|---|---|---:|---|---|---|
| startUrls | array | no | empty | Hemnet result URLs | Direct result pages. |
| searchQueries | array | no | empty | Place names | Autocomplete locations. |
| listingType | string | no | for_sale | for_sale, upcoming, sold | Section used with search queries. |
| itemTypes | array | no | empty | villa, lagenhet, bostadsratt, radhus, fritidshus, tomt, gard-skog, ovrigt | Property types. Empty includes all. |
| minRooms | number | no | empty | Number | Minimum rooms. |
| maxRooms | number | no | empty | Number | Maximum rooms. |
| minLivingArea | integer | no | empty | Square meters | Minimum living area. |
| maxLivingArea | integer | no | empty | Square meters | Maximum living area. |
| minPrice | integer | no | empty | SEK | Minimum price. |
| maxPrice | integer | no | empty | SEK | Maximum price. |
| expandLocations | integer | no | empty | 1, 5, 10, 25, 50 | Extra radius in kilometers. |
| maxPages | integer | no | 3 | Integer | Pages per search target. |
| maxListings | integer | no | 0 | Integer | Total listings. 0 stays inside maxPages. |
| listingDetails | boolean | no | false | true, false | Fetch listing pages. Charges `listing-details`. |
| proxyConfiguration | object | no | Apify residential | Apify proxy input | Proxy used for Hemnet requests. |

Minimal request:

```json
{
  "searchQueries": ["Stockholm"],
  "maxListings": 5,
  "listingDetails": false
}
```

### Retrieve the data through the API

Start the Actor with JSON input, wait for the run, then read the default dataset. Other languages are on the Actor API tab.

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("datascrapers/hemnet-se-scraper").call(run_input={
    "searchQueries": ["Stockholm"],
    "maxListings": 5,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["id"], item.get("askingPrice"))
```

### Data quality and record handling

Use `id` as the deduplication key. Price and area fields on search cards are display strings, including Swedish spacing, not parsed numbers. `publishedAt` is ISO-8601. A listing page that fails is skipped for its detail payload, and the search card can still be saved. Broker objects can include an agency name. Person names are not part of the example above.

### Pricing and cost examples

| Event | Free | Bronze | Silver | Gold |
|---|---:|---:|---:|---:|
| dataset-item | $1.00 | $1.00 | $1.00 | $1.00 |
| listing-details | $1.00 | $1.00 | $1.00 | $1.00 |

Prices are per 1,000 events. Platinum and Diamond use the Gold price. Platform usage is billed separately. Saving 1,000 search cards costs $1.00 before platform usage. Turning on `listingDetails` adds $1.00 per 1,000 successful detail fetches.

### Limitations and responsible data use

Hemnet can change result markup, require a proxy, or hide fields on some cards. `totalResults` is the search total reported on that page, not a guarantee that the run saved every match. Use the data under Hemnet's terms and applicable privacy rules.

### Dataset questions

#### How do I scrape sold homes?

Set `listingType` to `sold`, or paste a `/salda/bostader` URL in `startUrls`.

#### Does maxListings 0 download the whole site?

No. `0` means the cap is `maxPages` for each search target. The default is 3 pages.

#### Which field should I store as the key?

Store `id`. It is also the trailing number in the listing URL.

### Related datasets from Data Scrapers

- [Finn.no Real Estate Scraper](https://apify.com/datascrapers/finn-no-scraper) for Norwegian homes.
- [Booli Sweden Scraper](https://apify.com/datascrapers/booli-se) for another Swedish homes source.
- [Boliga Denmark Scraper](https://apify.com/datascrapers/boliga-dk) for Danish listings.
- [Daft.ie Property Scraper](https://apify.com/datascrapers/daft-ie-scraper) for Irish listings.
- [DAHLER Real Estate Scraper](https://apify.com/datascrapers/dahler-scraper) for German listings.

### Data Scrapers support

Questions about this dataset: stardustspotlight@gmail.com

# Actor input Schema

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

Direct Hemnet search result URLs to scrape. Supports for-sale (/bostader), upcoming (/kommande/bostader), and sold (/salda/bostader) pages with optional filters.

## `searchQueries` (type: `array`):

Location names to search on Hemnet (e.g. "Stockholm", "Södertälje", "Malmö"). The best autocomplete match is used. Combine with the filters below.

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

Which Hemnet listing section to scrape when using search queries.

## `itemTypes` (type: `array`):

Filter by property type. Leave empty to include all types.

## `minRooms` (type: `number`):

Minimum number of rooms. Supports half rooms (e.g. 1.5). Leave empty for no minimum.

## `maxRooms` (type: `number`):

Maximum number of rooms. Supports half rooms (e.g. 3.5). Leave empty for no maximum.

## `minLivingArea` (type: `integer`):

Minimum living area in square meters. Leave empty for no minimum.

## `maxLivingArea` (type: `integer`):

Maximum living area in square meters. Leave empty for no maximum.

## `minPrice` (type: `integer`):

Minimum asking/final price in SEK. Leave empty for no minimum.

## `maxPrice` (type: `integer`):

Maximum asking/final price in SEK. Leave empty for no maximum.

## `expandLocations` (type: `integer`):

Expand the search radius around the selected location in kilometers (Hemnet "expand search area"). Allowed values: 1, 5, 10, 25, or 50. Leave empty to search only the exact location.

## `maxPages` (type: `integer`):

Maximum number of search result pages to scrape per search target (50 listings per page). Default is 3.

## `maxListings` (type: `integer`):

Maximum number of listings to scrape in total across all search targets (0 = unlimited within maxPages).

## `listingDetails` (type: `boolean`):

Fetch full listing detail pages for each result (address, description, broker contact, open houses, all images, and more). Billed as listing-details events.

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

Proxy settings for anti-bot protection. Apify residential proxies are recommended.

## Actor input object example

```json
{
  "startUrls": [],
  "searchQueries": [
    "Stockholm"
  ],
  "listingType": "for_sale",
  "itemTypes": [],
  "maxPages": 3,
  "maxListings": 0,
  "listingDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Link to the default dataset containing scraped Hemnet listings

## `run` (type: `string`):

Link to the run in Apify Console

## `runStats` (type: `string`):

No description

# 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": [],
    "searchQueries": [
        "Stockholm"
    ],
    "itemTypes": [],
    "maxPages": 3,
    "maxListings": 0
};

// Run the Actor and wait for it to finish
const run = await client.actor("datascrapers/hemnet-se-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": [],
    "searchQueries": ["Stockholm"],
    "itemTypes": [],
    "maxPages": 3,
    "maxListings": 0,
}

# Run the Actor and wait for it to finish
run = client.actor("datascrapers/hemnet-se-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": [],
  "searchQueries": [
    "Stockholm"
  ],
  "itemTypes": [],
  "maxPages": 3,
  "maxListings": 0
}' |
apify call datascrapers/hemnet-se-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,datascrapers/hemnet-se-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YUmTsYqKs3KoSzXMg/builds/Hmen4l0TaCsMpzAod/openapi.json
