# Boligsiden Property Scraper (Denmark) (`scrapyx/boligsiden-properties-scraper`) Actor

Scrapes houses and apartments for sale from Boligsiden.dk, Denmark's #1 property portal. Search nationwide or by kommune (municipality); returns price, full address, coordinates, rooms, area, energy label and agent from a single search call.

- **URL**: https://apify.com/scrapyx/boligsiden-properties-scraper.md
- **Developed by:** [Ibnu Adzim](https://apify.com/scrapyx) (community)
- **Categories:** Real estate, Automation, Travel
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.0007 / actor start

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

## Boligsiden Property Scraper (Denmark)

Scrapes houses and apartments for sale from
**[Boligsiden.dk](https://www.boligsiden.dk)** — Denmark's #1 property
portal. Nordic coverage in this portfolio was Hemnet (Sweden) only;
Denmark was untouched.

Public data only. No login, no cookies, no browser.

### The one thing you need to know before using this

**No WAF, no bot-mitigation gate of any kind was found** — 7 TLS profiles
across both search and detail pages, all clean, cold, no warmup needed.
The one real engineering challenge is the data layer: Boligsiden renders
via Next.js App Router RSC streaming (`self.__next_f.push(...)`), not
`__NEXT_DATA__`, and the listing array sits nested inside a large
React-element tree rather than as a plain top-level list — this actor
walks that tree looking for the enclosing object that carries the results,
not for the array itself. See [`CRAWLING_METHOD.md`](CRAWLING_METHOD.md)
§5 for the details.

### What you get

Three record types share one dataset, told apart by `recordType`.

#### `PROPERTY` — one row per listing

Search rows (`listing`) already carry price, full address, coordinates,
room count, living area, energy label, days-listed and the listing agent —
among the richest search-only payloads in this portfolio. Turn on **Fetch
listing detail pages** to also attach `propertyDetail`, which adds the one
field genuinely absent from search: the property's free-text description.

#### `SEARCH_SUMMARY` — one row per kommune (or the whole country)

Pages fetched, rows returned, a best-effort total, and `kommuneResolved` —
whether the requested municipality actually matched something upstream.

#### `ERROR` — one row per input that failed

So every entry in **Kommunes** maps to at least one output row.

### Input

| Field | What it does |
| --- | --- |
| **Kommunes** | Danish municipality slugs (`koebenhavn`, `aarhus`, …) — leave empty for the whole country as one query |
| **Fetch listing detail pages** | adds the free-text description (off by default — search already has almost everything) |
| **Max properties / max pages per search** | pagination caps — Boligsiden pages honestly, no clamp/repeat trap |
| **Max concurrent requests / Min seconds between requests** | can be raised more freely than most actors here — no gate observed |

#### Example

```json
{
  "kommunes": ["koebenhavn", "aarhus"],
  "includePropertyDetails": true,
  "maxItems": 100
}
```

### Notes on reliability

- **No WAF observed** — a rare case in this portfolio's REAL\_ESTATE
  family. Residential proxy pinned to Denmark is still the default, as
  this portfolio's standard baseline for a single-country site, not
  because a gate was found.
- **An unrecognised kommune fails clean, not silently-wrong**: Boligsiden
  does not fall back to the national baseline for a bad municipality slug
  — the entire results structure is absent from the page, and this actor
  reports `kommuneResolved: false` with zero rows rather than guessing.
- **Pagination is genuinely honest**: `?page=N` really advances (verified:
  0 id overlap between consecutive pages), and a page past the real end
  answers a truly empty list — no clamp-back-to-page-1 trap like several
  other actors in this portfolio have to work around.
- **`estimatedTotalListings` is best-effort**, parsed from page copy, not
  a structured field — confirmed live to change per kommune (not just
  reused from the national figure), but not gated on for any pagination
  logic.
- **A de-listed detail page answers a clean HTTP 404** — the search row is
  still emitted, with `propertyDetail: null`.

### Output envelope

Every record carries `_input`, `_source` and `_scrapedAt`. Upstream field
names pass through **verbatim** under `listing` (and `propertyDetail` when
requested) — no renaming.

See [`CRAWLING_METHOD.md`](CRAWLING_METHOD.md) for the full
reverse-engineering trail, including the RSC flight-stream parsing
approach and what was NOT verified this session (kommune slug enum,
property-type filtering).

# Actor input Schema

## `kommunes` (type: `array`):

Danish kommune (municipality) slugs, e.g. 'koebenhavn', 'aarhus', 'odense' -- one search per entry, each with its own SEARCH\_SUMMARY row. Leave empty to search the whole country as a single query (43,000+ listings nationwide, capped by Max pages/Max properties below). An unrecognised kommune slug is reported as kommuneResolved=false rather than silently returning the national baseline.

## `includePropertyDetails` (type: `boolean`):

Also fetch each listing's detail page for the free-text description, which is not present in search results. Costs one extra request per listing. Off by default because search results already carry price, full address, coordinates, rooms, area, energy label and the listing agent.

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

Stop paginating a search after this many properties. Set to 0 for unlimited (still bounded by Max pages).

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

Hard cap on pagination depth, independent of maxItems. Boligsiden pages honestly (a page past the real end answers a genuinely empty list, not a repeat/clamp), so this is purely a cost guard for very large searches (50 listings/page).

## `maxConcurrency` (type: `integer`):

Upper bound on requests in flight at once, across searches and detail fetches. This target showed no bot-mitigation gate in recon, so this can be raised more freely than most actors in this portfolio.

## `minRequestInterval` (type: `integer`):

Paces request starts (not held inside a concurrency slot) rather than raw concurrency. Kept small by default as a courtesy -- no request-velocity sensitivity was observed for this target.

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

No WAF or bot-mitigation gate was observed for Boligsiden.dk (7 TLS profiles x 2 surfaces, all clean). Residential proxy pinned to Denmark is still the default as this portfolio's standard baseline for a single-country public site.

## Actor input object example

```json
{
  "kommunes": [
    "koebenhavn"
  ],
  "includePropertyDetails": false,
  "maxItems": 100,
  "maxPages": 20,
  "maxConcurrency": 5,
  "minRequestInterval": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DK"
  }
}
```

# Actor output Schema

## `items` (type: `string`):

One row per scraped record. See the dataset's default view for field definitions.

# 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 = {
    "kommunes": [
        "koebenhavn"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapyx/boligsiden-properties-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 = { "kommunes": ["koebenhavn"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapyx/boligsiden-properties-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 '{
  "kommunes": [
    "koebenhavn"
  ]
}' |
apify call scrapyx/boligsiden-properties-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapyx/boligsiden-properties-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/Wv6XTsgMjGU8HtoHE/builds/rzZcQTk1nlqeXsF0y/openapi.json
