# Hemnet Scraper - Sweden Real Estate Data Extractor (`mayno/hemnet-scraper`) Actor

Extract property listings from Hemnet.se - prices, locations, agent info & images. Sweden's #1 real estate platform. Get detailed property data including financials, viewing dates, and amenities in structured JSON/CSV format.

- **URL**: https://apify.com/mayno/hemnet-scraper.md
- **Developed by:** [Amine Feriani](https://apify.com/mayno) (community)
- **Categories:** Real estate, Jobs, Automation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 2 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.
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 🇸🇪 - Sweden Real Estate Data Extractor

**Scrape property listings from Hemnet.se** — Sweden's #1 real estate platform 
with 90%+ market share. Extract prices, addresses, agent contacts, images, 
and 30+ data fields per property in structured JSON, CSV, or Excel format. 
Perfect for **Swedish real estate market analysis, property investment research, 
PropTech applications, and lead generation**.

No Hemnet API needed. No login required. Just paste a search URL and get clean, 
structured data in seconds.

### 🎯 What You Get

For every Swedish property listing, this scraper extracts:

- 🏠 **Property details**: type (Villa, Lägenhet, Radhus), rooms, living area (m²), 
  land area, year built, floor, amenities
- 📍 **Location data**: address, neighborhood, city (kommun), county (län), 
  distance to coast
- 💰 **Financial info**: asking price (SEK), price per m², monthly fees (Avgift), 
  annual running costs (Driftskostnad)
- 👤 **Agent contact**: name, agency, phone, email
- 🖼️ **Media & dates**: high-res images, viewing dates (visningar), full description


### 🚀 Quick Start (60 seconds)

1. Click **"Try for free"** above
2. Choose your scraping mode:
 - **Search URL mode** — paste any Hemnet search URL to scrape multiple properties

    ```json
    {
      "searchUrl": "https://www.hemnet.se/bostader?location_ids[]=17744",
      "maxPages": 5
    }
    ```


- **Direct URLs mode** — paste specific property URLs to scrape individual listings

    ```json
    {
      "propertyUrls": [
        "https://www.hemnet.se/bostad/villa-5rum-vate-gotlands-kommun-19397535",
        "https://www.hemnet.se/bostad/lagenhet-3rum-stockholm-19397536"
      ]
    }
    ```
3. Click **"Start"** and download results in JSON, CSV, or Excel


#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `searchUrl` | String | No* | Hemnet search results URL |
| `maxPages` | Integer | No | Number of pages to scrape (default: 1, max: 50) |
| `propertyUrls` | Array | No* | Direct property URLs to scrape |

*At least one of `searchUrl` or `propertyUrls` must be provided.

### Output

Each property listing includes:

```json
{
  "id": "19397535",
  "url": "https://www.hemnet.se/bostad/villa-5rum-vate-gotlands-kommun-19397535",
  "scraped_at": "2026-04-28T18:30:00.000Z",
  
  "location": {
    "address": "Väte Hässle 809",
    "neighborhood": "Väte",
    "city": "Gotlands kommun",
    "county": "Gotlands län",
    "distance_to_coast_m": 500
  },
  
  "property_details": {
    "title": "Villa i Väte",
    "type": "Villa",
    "tenure": "Äganderätt",
    "rooms": 5,
    "living_area_sqm": 120,
    "supplemental_area_sqm": 30,
    "land_area_sqm": 1500,
    "formatted_land_area": "1 500 m²",
    "year_built": 1985,
    "floor": "1/1",
    "amenities": ["Fiber", "Garage", "Förråd"],
    "is_new_construction": false
  },
  
  "financials": {
    "asking_price_sek": 3500000,
    "price_per_sqm": 29167,
    "monthly_fee_sek": null,
    "running_costs_year_sek": 25000
  },
  
  "agent": {
    "name": "Erik Svensson",
    "agency": "Svensk Fastighetsförmedling",
    "phone": "+46-8-555-1234",
    "email": "erik.svensson@svenskfast.se"
  },
  
  "content": {
    "description": "Charmig villa nära havet...",
    "viewing_dates": ["2026-05-01 10:00", "2026-05-03 14:00"],
    "images": [
      "https://bilder.hemnet.se/...",
      "https://bilder.hemnet.se/..."
    ]
  }
}
````

#### Complete Field Reference

##### Root Fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | String | Unique Hemnet property ID |
| `url` | String | Full URL to the property listing on Hemnet.se |
| `scraped_at` | String (ISO 8601) | Timestamp when the property was scraped |

##### Location Object

| Field | Type | Description |
|-------|------|-------------|
| `location.address` | String | Street address of the property |
| `location.neighborhood` | String | Neighborhood or area name (may include district hierarchy) |
| `location.city` | String | Municipality/city name |
| `location.county` | String | County (län) name |
| `location.distance_to_coast_m` | Integer/Null | Distance to nearest coastline in meters (null if not applicable) |

##### Property Details Object

| Field | Type | Description |
|-------|------|-------------|
| `property_details.title` | String | Property listing title from Hemnet |
| `property_details.type` | String | Property type (Villa, Lägenhet, Radhus, Kedjehus, Parhus, etc.) |
| `property_details.tenure` | String | Ownership type: "Äganderätt" (freehold), "Bostadsrätt" (tenant-ownership), "Hyresrätt" (rental) |
| `property_details.rooms` | Float/Null | Number of rooms (e.g., 3.5 means 3 rooms + 1 small room) |
| `property_details.living_area_sqm` | Float/Null | Living area in square meters (Boarea/Boyta) |
| `property_details.supplemental_area_sqm` | Float/Null | Supplemental area in square meters (Biarea - e.g., attic, basement) |
| `property_details.land_area_sqm` | Float/Null | Land/plot area in square meters (Tomtarea) |
| `property_details.formatted_land_area` | String/Null | Human-readable land area (e.g., "1 500 m²", "2,5 hektar") |
| `property_details.year_built` | Integer/Null | Year the property was built |
| `property_details.floor` | String/Null | Floor information (e.g., "2/4" means 2nd floor out of 4) |
| `property_details.amenities` | Array | List of available amenities (Fiber, Garage, Balkong, Terrass, etc.) |
| `property_details.is_new_construction` | Boolean | True if the property is newly built/under construction |

##### Financials Object

| Field | Type | Description |
|-------|------|-------------|
| `financials.asking_price_sek` | Integer/Null | Asking price in Swedish Kronor (SEK) |
| `financials.price_per_sqm` | Integer/Null | Price per square meter of living area (SEK/m²) |
| `financials.monthly_fee_sek` | Integer/Null | Monthly housing association fee (Avgift) - for Bostadsrätt properties |
| `financials.running_costs_year_sek` | Integer/Null | Estimated annual running costs (Driftskostnad) - for Villa/Radhus properties |

##### Agent Object

| Field | Type | Description |
|-------|------|-------------|
| `agent.name` | String/Null | Real estate agent's full name |
| `agent.agency` | String/Null | Real estate agency name |
| `agent.phone` | String/Null | Agent's phone number (Swedish format) |
| `agent.email` | String/Null | Agent's email address |

##### Content Object

| Field | Type | Description |
|-------|------|-------------|
| `content.description` | String/Null | Full property description text from the listing |
| `content.viewing_dates` | Array | List of scheduled open house dates in "YYYY-MM-DD HH:MM" format |
| `content.images` | Array | List of property image URLs (high-resolution) |

#### Data Export Formats

All data can be downloaded in multiple formats:

- **JSON** - Complete structured data with all fields
- **CSV** - Tabular format (nested objects flattened)
- **Excel** - Spreadsheet with formatted columns
- **HTML Table** - Web-viewable table format

### Use Cases

#### Real Estate Agencies

- Track competitor pricing
- Monitor market trends
- Generate comparative market analyses

#### Property Investors

- Find undervalued properties
- Track specific listings
- Analyze neighborhood data

#### Market Researchers

- Study Swedish housing market
- Price trend analysis
- Geographic market mapping

### Tips for Best Results

1. **Use specific search filters** - Narrow your search on Hemnet.se before copying the URL
2. **Monitor specific properties** - Use direct URLs for properties you want to track over time
3. **Export formats** - Download results as JSON, CSV, Excel, or HTML table

# Actor input Schema

## `mode` (type: `string`):

⚠️ IMPORTANT: Only fill in the field for your selected mode below. Other fields will be ignored.

## `searchUrl` (type: `string`):

Paste a Hemnet search results URL.

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

How many search result pages to scrape (~50 properties each).

## `propertyUrls` (type: `array`):

Paste individual Hemnet property URLs (one per line). Example: https://www.hemnet.se/bostad/lagenhet-3rum-barkarbystaden-jarfalla-kommun-karlslundsvagen-15-21538498

## Actor input object example

```json
{
  "mode": "search",
  "searchUrl": "https://www.hemnet.se/bostader?item_types%5B%5D=villa&location_ids%5B%5D=17744",
  "maxPages": 2,
  "propertyUrls": [
    "https://www.hemnet.se/bostad/lagenhet-3rum-barkarbystaden-jarfalla-kommun-karlslundsvagen-15-21538498"
  ]
}
```

# Actor output Schema

## `overview` (type: `string`):

Curated view showing key property details: title, address, price, rooms, area, and link.

## `allFields` (type: `string`):

Complete dataset with all extracted fields including agent info, amenities, viewing dates, and images.

# 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 = {
    "searchUrl": "https://www.hemnet.se/bostader?item_types%5B%5D=villa&location_ids%5B%5D=17744",
    "propertyUrls": [
        "https://www.hemnet.se/bostad/lagenhet-3rum-barkarbystaden-jarfalla-kommun-karlslundsvagen-15-21538498"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mayno/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 = {
    "searchUrl": "https://www.hemnet.se/bostader?item_types%5B%5D=villa&location_ids%5B%5D=17744",
    "propertyUrls": ["https://www.hemnet.se/bostad/lagenhet-3rum-barkarbystaden-jarfalla-kommun-karlslundsvagen-15-21538498"],
}

# Run the Actor and wait for it to finish
run = client.actor("mayno/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 '{
  "searchUrl": "https://www.hemnet.se/bostader?item_types%5B%5D=villa&location_ids%5B%5D=17744",
  "propertyUrls": [
    "https://www.hemnet.se/bostad/lagenhet-3rum-barkarbystaden-jarfalla-kommun-karlslundsvagen-15-21538498"
  ]
}' |
apify call mayno/hemnet-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Hemnet Scraper - Sweden Real Estate Data Extractor",
        "description": "Extract property listings from Hemnet.se - prices, locations, agent info & images. Sweden's #1 real estate platform. Get detailed property data including financials, viewing dates, and amenities in structured JSON/CSV format.",
        "version": "1.1",
        "x-build-id": "0EUStUHiTDCKYkp4d"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/mayno~hemnet-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-mayno-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/mayno~hemnet-scraper/runs": {
            "post": {
                "operationId": "runs-sync-mayno-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/mayno~hemnet-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-mayno-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",
                "required": [
                    "mode"
                ],
                "properties": {
                    "mode": {
                        "title": "Scraping Mode",
                        "enum": [
                            "search",
                            "direct"
                        ],
                        "type": "string",
                        "description": "⚠️ IMPORTANT: Only fill in the field for your selected mode below. Other fields will be ignored.",
                        "default": "search"
                    },
                    "searchUrl": {
                        "title": "Hemnet Search URL",
                        "type": "string",
                        "description": "Paste a Hemnet search results URL."
                    },
                    "maxPages": {
                        "title": "Maximum Pages to Scrape",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "How many search result pages to scrape (~50 properties each).",
                        "default": 2
                    },
                    "propertyUrls": {
                        "title": "Property URLs",
                        "type": "array",
                        "description": "Paste individual Hemnet property URLs (one per line). Example: https://www.hemnet.se/bostad/lagenhet-3rum-barkarbystaden-jarfalla-kommun-karlslundsvagen-15-21538498",
                        "items": {
                            "type": "string",
                            "pattern": "^https://www\\.hemnet\\.se/bostad/"
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
