# 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:** 12 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 1.00 out of 5 stars

## 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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": 5,
  "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(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 '{
  "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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mayno/hemnet-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/Y8prXpXcIpaYSY8md/builds/hcClZ6xzNqk1NxRgs/openapi.json
