# Lokalebasen Scraper - Danish Commercial Space (`studio-amba/lokalebasen-scraper`) Actor

Scrape commercial space listings from Lokalebasen.dk: offices, warehouses, retail, coworking and serviced offices for rent or sale across Denmark. Rent per m2, areas, energy ratings, provider names and coordinates.

- **URL**: https://apify.com/studio-amba/lokalebasen-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 result 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/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

## Lokalebasen Scraper

Scrape commercial space listings from [Lokalebasen.dk](https://www.lokalebasen.dk), one of Denmark's largest portals for erhvervslokaler. The portal carries offices, warehouses and production space, retail, coworking, serviced offices (kontorhoteller), meeting rooms, parking and, on the sale side, commercial properties, housing investments and land. Roughly 9,000 listings are live at any time: about 6,700 for rent and 2,300 for sale.

Every record includes the rent per m2 per year (the standard Danish commercial quote), the monthly rent, floor area, full address with coordinates, energy rating, the provider behind the listing and a direct link to the listing page.

### What you get

- All rental segments: kontor, kontorhotel, lager/produktion, butik, coworking, mødelokaler, virtuelt kontor, parkering
- All sale sections: brugerejendomme (own use), investeringsejendomme (investment), tvangsauktioner (foreclosures)
- Rent per m2 per year and monthly rent, parsed to numbers, with the original price text kept
- Whether operating costs (drift) are included in the quoted rent
- Full address, postal code, postal district and WGS84 coordinates
- Energy rating, floor area range, provider name and photo count
- Filter by location, listing type and segment, or pull the whole portal

### Use cases

- **Market monitoring**: track asking rents per m2 across Danish cities and segments
- **Site selection**: feed available offices or warehouses in a target area into your own tooling
- **Investment sourcing**: watch the investment and foreclosure sections for new opportunities
- **Lead generation**: see which providers and brokers are active in which districts
- **Research**: supply and pricing data for the Danish commercial property market

### Input

| Field | Type | Description |
|---|---|---|
| `searchQuery` | string | City, postal district or postal code. `København`, `Aarhus C`, `Odense`, `8000`. ASCII spellings work too (`Kobenhavn`). Empty = all of Denmark. |
| `listingType` | string | `rent` (leje), `sale` (køb) or `all` (default). |
| `segment` | string | `kontor`, `kontorhotel`, `lager`, `butik`, `coworking`, `moedelokale`, `virtuelt_kontor`, `parkering`, `bolig`, `grund` or `all` (default). |
| `sort` | string | Site default, newest first, or by area. |
| `maxResults` | integer | Cap on returned listings, default 100, maximum 12,000. |
| `proxyConfiguration` | object | Danish residential proxy by default. |

#### Example: offices for rent in Copenhagen

```json
{
    "searchQuery": "København",
    "listingType": "rent",
    "segment": "kontor",
    "maxResults": 100
}
```

#### Example: warehouses in Aarhus

```json
{
    "searchQuery": "Aarhus",
    "listingType": "rent",
    "segment": "lager",
    "maxResults": 50
}
```

#### Example: every investment property in Denmark

```json
{
    "listingType": "sale",
    "maxResults": 3000
}
```

### Output

One record per listing. Example (shortened):

```json
{
    "title": "Byens Bedste Baghus med rigtig kongelig nabo",
    "listingType": "rent",
    "segment": "office",
    "price": 1950,
    "currency": "DKK",
    "priceUnit": "kr/m2/år",
    "priceRaw": "1.950 kr.",
    "priceLabel": "Leje pr. m² inkl. drift",
    "rentPerM2Year": 1950,
    "monthlyRentDkk": 57362,
    "surface": 353,
    "address": "Toldbodgade 51 D 2.sal., 1253 København K",
    "postalCode": "1253",
    "city": "København K",
    "latitude": 55.6845,
    "longitude": 12.5953,
    "energyRating": "C",
    "providerName": "Finsen Ejendomme ApS",
    "url": "https://www.lokalebasen.dk/leje/kontorlokaler/1000-1499-kobenhavn-k/toldbodgade-116889",
    "source": "lokalebasen.dk",
    "scrapedAt": "2026-08-18T09:00:00.000Z"
}
```

Notes on the data:

- `price` is the rent per m2 per year for rentals and the total asking price for sales. Price on application is common in this market, so `price` can be null; `priceRaw` always keeps the portal's own wording.
- When the portal quotes a range ("4.900 - 6.000 kr."), the numeric fields carry the lower bound and `priceRaw` keeps the full range.
- `priceLabel` states whether operating costs (drift) are included in the rent.
- `surface` and `surfaceTo` describe the available area range for flexible spaces.

### How to scrape Lokalebasen data

1. Create a free Apify account and open this actor.
2. Set a location (for example `København` or `Aarhus`) or leave it empty for all of Denmark.
3. Pick a listing type and segment, or keep both on their defaults to get everything.
4. Run the actor and download the dataset as JSON, CSV or Excel, or read it through the API.

A run over a city segment takes well under a minute. A full-portal run (around 9,000 listings) finishes in a few minutes; the actor reads the portal's own list API in pages of 250, so even large runs stay light.

### Pricing and cost per result

The actor charges per result under Apify's pay-per-event model. Data transfer is small (one JSON API request per 250 listings), so compute and proxy costs stay low: expect the per-result event price to dominate the total. A run's usage cost only settles after the run reports SUCCEEDED; a failed run does not deliver (or charge for) a partial dataset.

### Limitations

- Descriptions are the portal's list-view texts, truncated at roughly 500 characters.
- Provider phone numbers and full detail-page amenities are not included; the listing URL gets you there in one click.
- Clinic space (klinik) is not a separate segment on this portal; clinics appear under offices and retail with a suitable-for tag.

### Related actors

- [Ejendomstorvet Scraper](https://apify.com/jelledes/ejendomstorvet-scraper) for the other major Danish commercial portal
- Commercial property scrapers for Sweden (Objektvision), Finland (Toimitilat), the UK (Rightmove Commercial) and more European markets

### Support

Found an issue or missing a field? Open an issue on the actor's page and it gets picked up quickly.

# Actor input Schema

## `searchQuery` (type: `string`):

City, postal district or postal code to search (e.g. 'København', 'Aarhus C', 'Odense', '8000'). Danish spelling and ASCII forms both work ('København' or 'Kobenhavn'). Leave empty to search all of Denmark.

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

Rent (leje), sale (køb: brugerejendom, investering, tvangsauktion), or both.

## `segment` (type: `string`):

Commercial space segment. 'All segments' returns every listing type on the portal. Serviced offices (kontorhotel), coworking, meeting rooms, virtual offices and parking exist on the rent side only; housing and land on the sale side only.

## `sort` (type: `string`):

How the portal orders results. Empty uses the site default.

## `maxResults` (type: `integer`):

Maximum number of listings to return. The whole portal holds roughly 9,000 listings (about 6,700 for rent, 2,300 for sale).

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

Proxy settings. The site sits behind Cloudflare (passive on the search API at recon time, see docs/site-recon/lokalebasen.md) — Danish residential proxy is the reliable default.

## Actor input object example

```json
{
  "searchQuery": "København",
  "listingType": "all",
  "segment": "all",
  "sort": "created_at|desc",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DK"
  }
}
```

# Actor output Schema

## `results` (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 = {
    "searchQuery": "København",
    "sort": "created_at|desc",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "DK"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/lokalebasen-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 = {
    "searchQuery": "København",
    "sort": "created_at|desc",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "DK",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/lokalebasen-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 '{
  "searchQuery": "København",
  "sort": "created_at|desc",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DK"
  }
}' |
apify call studio-amba/lokalebasen-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studio-amba/lokalebasen-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/fMynpQ5qKpJ9MTuJY/builds/VA1ynVadJZ0Hlc7SL/openapi.json
