# HSB Co-op Housing Scraper (`rainminer/hsb-se-scraper`) Actor

Track HSB.se co-op housing supply in Sweden — new-build projects and individual apartments for sale. Export project price ranges, rok, kvm, move-in dates, available units, photos and listing URLs. Built for housing analysts and agencies monitoring Swedish bostadsmarknaden.

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

## Pricing

from $1.49 / 1,000 listing scrapeds

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?

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

### What does HSB.se Scraper do?

**HSB.se Scraper** extracts **co-op housing projects and apartments for sale** from [hsb.se](https://www.hsb.se/) — Sweden's HSB housing association marketplace. Provide a search results URL or an individual listing URL and export structured housing data to JSON or CSV without writing code.

### Why scrape hsb.se?

- **New-build market research** — Track asking prices, sizes, and move-in dates across HSB projects nationwide.
- **Buyer lead lists** — Collect active for-sale projects and individual apartments with location, price, and direct listing URLs.
- **Portfolio monitoring** — Watch new listings in target regions on a schedule.
- **Apify platform** — Schedule runs, export JSON/CSV/Excel, and integrate via API or webhooks.

### What data can you extract?

| Field          | Description                                                |
| -------------- | ---------------------------------------------------------- |
| id             | Listing identifier from the URL path                       |
| title          | Project or apartment headline                                |
| listingType    | `project` or `apartment`                                   |
| price          | Numeric price in SEK when a single value is shown            |
| priceText      | Formatted price text (including ranges)                      |
| currency       | `SEK`                                                      |
| location       | Area and municipality                                      |
| size           | Rooms and area (projects) or floor, area, and unit number  |
| moveDate       | Estimated move-in date                                     |
| status         | Sale status banner (e.g. Till salu)                          |
| availableUnits | Available units text on project cards                        |
| imageUrl       | Primary listing image URL                                  |
| url            | Public listing page on hsb.se                                |
| searchUrl      | Source search URL when found via a search page               |

### How to scrape hsb.se

1. Open **HSB.se Scraper** in Apify Console.
2. Add one or more **start URLs** under **Start URLs**, for example:
   - `https://www.hsb.se/sok-bostad/sokresultat/` — all current for-sale projects and apartments
   - `https://www.hsb.se/sok-bostad/dalarna/leksand/projekt/flottisten/` — a single project
   - `https://www.hsb.se/sok-bostad/ostergotland/linkoping/projekt/djurgardsbacken/38/` — a single apartment
3. Set **Maximum items** to control how many listings are extracted per start URL (default 3).
4. Click **Start** and download results from the **Dataset** tab.

Search result pages include both project cards and individual apartment blocks in a single HTML response — no pagination is required.

### Is it legal to scrape hsb.se?

This scraper only collects publicly visible for-sale listings shown on hsb.se without logging in. It does not access private account data or bypass authentication. Ensure your use complies with applicable laws (including GDPR) and the site's Terms of Service.

### Output example

```json
{
  "id": "dalarna/leksand/projekt/flottisten",
  "title": "Flottisten",
  "listingType": "project",
  "price": null,
  "priceText": "2 095 000 - 4 250 000 kr",
  "currency": "SEK",
  "location": "Edshult, Leksand",
  "size": "2 - 5 rok | 56 - 119 kvm",
  "moveDate": "Januari 2027",
  "status": "Till salu",
  "availableUnits": "7 lediga bostäder",
  "imageUrl": "https://www.hsb.se/remote.jpg.ashx?width=500&height=247&scale=both&mode=crop&autorotate=true&urlb64=...",
  "url": "https://www.hsb.se/sok-bostad/dalarna/leksand/projekt/flottisten/",
  "searchUrl": "https://www.hsb.se/sok-bostad/sokresultat/"
}
```

### Image Credit

Image credit: [hsb.se](https://www.hsb.se/)

# Actor input Schema

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

hsb.se search or listing URLs under /sok-bostad/ (e.g. https://www.hsb.se/sok-bostad/sokresultat/ or an individual project/apartment page).

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

Maximum number of listings to return per start URL.

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

Optional proxy settings. Defaults to no proxy.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.hsb.se/sok-bostad/sokresultat/"
    }
  ],
  "maxItems": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (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": [
        {
            "url": "https://www.hsb.se/sok-bostad/sokresultat/"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/hsb-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": [{ "url": "https://www.hsb.se/sok-bostad/sokresultat/" }],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("rainminer/hsb-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": [
    {
      "url": "https://www.hsb.se/sok-bostad/sokresultat/"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call rainminer/hsb-se-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rainminer/hsb-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/RDTnO0g59iOGp44Ng/builds/IMEDeYbdOQHqdUPsa/openapi.json
