# Bilbasen Scraper: Denmark Used Car Listings (`reventadata/bilbasen-scraper`) Actor

Scrape Bilbasen.dk, the Danish car marketplace. Price in DKK, make, model, variant, first registration, mileage, fuel, gearbox, horsepower, annual tax, location, seller type, description and photos. Unofficial.

- **URL**: https://apify.com/reventadata/bilbasen-scraper.md
- **Developed by:** [reventadata](https://apify.com/reventadata) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 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.

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

## Bilbasen Denmark Car Scraper

> **Unofficial.** This Actor is not affiliated with, authorised by, endorsed by, or in any
> way officially connected to Bilbasen or Vend Marketplaces ApS. "Bilbasen" is a trademark of its
> respective owner and is used here only to describe what this tool reads. It reads public
> search listings.

Extracts used car listings from bilbasen.dk, Denmark's vehicle marketplace: make, model, variant, price, registration date, mileage, horsepower, battery capacity, range, seller type, and location.

### What does it do?

For every search query URL or path provided (default `https://www.bilbasen.dk/brugt/bil`), it crawls the listing pages (30 vehicles per page) and saves one dataset row per vehicle. All vehicle specifications and dealer location data are extracted directly from the listing cards in the search results without requesting individual detail pages.

### Why use it?

- **Structured vehicle specs:** horsepower, mileage in km, first registration date, fuel type, transmission, electric range, battery kWh, towing capacity, and annual tax.
- **Clean columns:** normalized numbers (e.g. `mileageKm: 7000`, `price: 169900`, `horsepower: 136`) alongside formatted display strings.
- **Search filters:** support for price ranges, car body types, and drivetrain/fuel types.
- **Public data only:** extracts public dealer and private seller listings shown on the site.

### How to use it

1. Provide one or more Bilbasen search URLs or relative paths in `searchQueries`.
2. Optionally specify `priceMin`, `priceMax`, `carType`, or `fuelType`.
3. Set `maxItems` (total cars) and `maxPages` (pages per query).
4. Run the Actor and download the results as JSON, CSV, Excel, or NDJSON.

#### Input

| Field | Type | Description |
|---|---|---|
| `searchQueries` | array | Bilbasen search URLs or paths (e.g. `https://www.bilbasen.dk/brugt/bil` or `https://www.bilbasen.dk/brugt/bil?cartype=suv`). |
| `maxItems` | integer | Maximum number of vehicle listings to save. |
| `maxPages` | integer | Maximum listing pages to crawl per query (30 vehicles per page). |
| `priceMin` | integer | Optional minimum asking price in DKK (`pricefrom`). |
| `priceMax` | integer | Optional maximum asking price in DKK (`priceto`). |
| `carType` | string | Optional vehicle body type (`suv`, `stationcar`, `mikro`, etc.). |
| `fuelType` | string | Optional fuel type (`Electric`, `Benzin`, `Diesel`, etc.). |

#### Sample input

```json
{
    "searchQueries": ["https://www.bilbasen.dk/brugt/bil"],
    "maxItems": 10,
    "maxPages": 1
}
```

#### Output

Each dataset item contains:

| Field | Type | Description |
|---|---|---|
| `id` | string | Unique vehicle identifier. |
| `externalId` | integer | Numeric Bilbasen listing ID. |
| `url` | string | Canonical vehicle listing URL. |
| `make` | string / null | Manufacturer name (e.g. Peugeot, VW). |
| `model` | string / null | Model name (e.g. e-Rifter, ID.3). |
| `variant` | string / null | Variant / trim specification. |
| `doors` | integer / null | Number of doors. |
| `description` | string / null | Listing text provided by seller. |
| `price` | integer / null | Numeric cash price in DKK. |
| `displayPrice` | string / null | Formatted price string (e.g. `174.900 kr`). |
| `originalPrice` | integer / null | Original price before reduction if any. |
| `currency` | string | Price currency (`kr`). |
| `priceType` | string / null | Price type (`Retail` / `Leasing`). |
| `sellerType` | string / null | Seller category (`Forhandler` or `Privat`). |
| `saleType` | string / null | Sale type (`Detailsalg` or `Engros`). |
| `city` | string / null | Dealership or seller city. |
| `zipCode` | integer / null | Postal code. |
| `region` | string / null | Geographical region in Denmark. |
| `latitude` | number / null | Geographic latitude coordinate. |
| `longitude` | number / null | Geographic longitude coordinate. |
| `firstRegistrationDate` | string / null | Registration date (e.g. `7/2025`). |
| `mileageKm` | integer / null | Mileage in kilometers. |
| `mileageDisplay` | string / null | Formatted mileage string (e.g. `25.000 km`). |
| `fuelType` | string / null | Fuel type (e.g. `El`, `Benzin`, `Diesel`). |
| `gearType` | string / null | Transmission type. |
| `horsepower` | integer / null | Power in hp (`hk`). |
| `horsepowerDisplay` | string / null | Formatted horsepower string. |
| `annualTaxDisplay` | string / null | Annual vehicle tax (e.g. `920 kr/år`). |
| `towingWeightKg` | integer / null | Max towing capacity in kg. |
| `accelerationDisplay` | string / null | 0-100 km/h acceleration time. |
| `electricRangeKm` | integer / null | Electric range in km if applicable. |
| `batteryCapacityKwh` | integer / null | Battery capacity in kWh if applicable. |
| `kmPerLiterDisplay` | string / null | Fuel consumption in km/l. |
| `images` | array | Listing photo URLs. |
| `searchQuery` | string | Query URL used. |
| `page` | integer | Page number where found. |
| `scrapedAt` | string | ISO 8601 UTC timestamp. |

One row from a real platform run on 2026-11-11 (`images` shortened to 2 items):

```json
{
  "id": "7028561",
  "externalId": 7028561,
  "url": "https://www.bilbasen.dk/brugt/bil/vw/touran/15-tsi-150-comfortline-dsg-7prs-5d/7028561",
  "make": "VW",
  "model": "Touran",
  "variant": "1,5 TSi 150 Comfortline+ DSG 7prs 5d",
  "doors": 5,
  "description": "* Fragus Go Premium garanti til Juni 2028\n* 18\" sommerdæk monteret juni 2026\n* Nysynet 04.11.2026\n* Helt nye vinterdæk monteret 04.11.2026\n* nye bremser juni 2026\n* Fuld LED Lyspakke\n* Apple Carplay\n* Bakkamera High\n* Dolphin Grey metallak\n* Årlig grøn ejerafgift kr. 1600\nkørecomputer, multifunktionsrat, højdejust. forsæder, læderrat, 3 individuelle sæder i bag, bagagerumsdækken, stofindtræk, højdejust. førersæde, integrerede rullegardiner, 18\" alufælge, el-sidespejle m/varme, tågelygter, led kørelys, led baglygter, tagræling, fuld led forlygter, mørktonede ruder i bag, kurvelys, aftageligt træk, automatgear, elektrisk parkeringsbremse, aut. nedbl. bakspejl, sædevarme, el-ruder, fjernb. centrallås, udv. temp. måler, adaptiv fartpilot med kø-assistent, 3 zone klima, dab+ radio, musikstreaming via bluetooth, apple carplay, træthedsregistrering, isofix, fjernlysassistent, 6 airbags, regnsensor, parkeringssensor (bag), parkeringssensor (for), automatisk lys, skiltegenkendelse, bakkamera, automatisk nødbremsesystem, esp, antispin, auto hold,  Kontakt Jimmy Hasemann på 39535452 eller jha@triobiler.dk for mere info og besigtigelse - denne bil kan også fremvise uden for åbningstid. ",
  "price": 219999,
  "displayPrice": "219.999 kr",
  "originalPrice": 229999,
  "currency": "kr",
  "priceType": "Retail",
  "sellerType": "Forhandler",
  "saleType": "Detailsalg",
  "city": "Brøndby",
  "zipCode": 2605,
  "region": "København",
  "latitude": 55.658436,
  "longitude": 12.4365835,
  "firstRegistrationDate": "12/2020",
  "mileageKm": 138000,
  "mileageDisplay": "138.000 km",
  "fuelType": "Benzin",
  "gearType": "Automatisk gear",
  "horsepower": 150,
  "horsepowerDisplay": "150 hk",
  "annualTaxDisplay": "1.600 kr/år",
  "towingWeightKg": 1500,
  "accelerationDisplay": "8,9 sek",
  "electricRangeKm": null,
  "batteryCapacityKwh": null,
  "kmPerLiterDisplay": "15,1 km/l",
  "images": [
    "https://billeder.bilbasen.dk/bilinfo/c9f04c7f-6249-4cd3-95e2-3b2449315f8f.jpeg?class=S640X640",
    "https://billeder.bilbasen.dk/bilinfo/46dd29ec-4da5-44e9-ad65-fde6339df128.jpeg?class=S640X640"
  ],
  "searchQuery": "https://www.bilbasen.dk/brugt/bil",
  "page": 1,
  "scrapedAt": "2026-11-11T06:37:09.000Z"
}
```

### Pricing

Pay-per-event. The current price is on the Actor's Pricing tab.

### Privacy & Compliance

This Actor reads only publicly accessible search pages and returns the public data they show. It sends no login.

# Actor input Schema

## `searchQueries` (type: `array`):

One or more Bilbasen search URLs or relative paths (e.g. "https://www.bilbasen.dk/brugt/bil" or "https://www.bilbasen.dk/brugt/bil?cartype=suv").

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

Maximum number of car listings to extract across all queries.

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

Maximum number of search result pages to crawl per query (30 listings per page).

## `priceMin` (type: `integer`):

Optional minimum asking price in Danish Kroner (pricefrom filter).

## `priceMax` (type: `integer`):

Optional maximum asking price in Danish Kroner (priceto filter).

## `carType` (type: `string`):

Optional filter by vehicle body type: suv, stationcar, mikro, cuv, mpv, sedan, hatchback, cabriolet, coupe.

## `fuelType` (type: `string`):

Optional filter by drivetrain/fuel type: Electric (El), Benzin, Diesel, ElectricAndBenzin (Hybrid - Benzin), ElectricAndDiesel (Hybrid - Diesel), ElectricAndBenzinPlugin (Plug-in - Benzin), ElectricAndDieselPlugin (Plug-in - Diesel).

## Actor input object example

```json
{
  "searchQueries": [
    "https://www.bilbasen.dk/brugt/bil"
  ],
  "maxItems": 10,
  "maxPages": 1
}
```

# Actor output Schema

## `dataset` (type: `string`):

Items scraped from the target website.

# 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 = {
    "searchQueries": [
        "https://www.bilbasen.dk/brugt/bil"
    ],
    "maxItems": 10,
    "maxPages": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("reventadata/bilbasen-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 = {
    "searchQueries": ["https://www.bilbasen.dk/brugt/bil"],
    "maxItems": 10,
    "maxPages": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("reventadata/bilbasen-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 '{
  "searchQueries": [
    "https://www.bilbasen.dk/brugt/bil"
  ],
  "maxItems": 10,
  "maxPages": 1
}' |
apify call reventadata/bilbasen-scraper --silent --output-dataset

```

## MCP server setup

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