# DBA.dk Scraper (`ivanvs/dba-dk-scraper`) Actor

Extract data from classified advertisements on Den Blå Avis(dba.dk). Scrape details from jobs, furniture, sport items, services, cars and trucks listed on dba.dk. Download listings data in JSON, XML, Excel, and other. Unlimited and extremely fast!

- **URL**: https://apify.com/ivanvs/dba-dk-scraper.md
- **Developed by:** [Gen First](https://apify.com/ivanvs) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 ads

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

## DBA.dk Scraper

Extract listings, prices, descriptions, specifications, photos, and seller info from
[dba.dk](https://www.dba.dk/) — Denmark's largest general classifieds site — no login, no
cookies, and no proxy setup required. DBA.dk Scraper turns any dba.dk search or ad URL into
clean, structured JSON you can export to CSV, Excel, JSON, XML, or HTML Table.

### What does DBA.dk Scraper do?

- 🔎 **Scrapes search pages** — paste any dba.dk search-results URL and collect every listing on it (with automatic pagination).
- 🏪 **Scrapes shop pages** — paste a `dba.dk/shop/<name>` URL and collect every ad that shop has published.
- 📄 **Scrapes individual ads** — paste a single ad URL to get its full detail record.
- 🚗 🏠 🐶 **Works across verticals** — cars, motorcycles, boats, agricultural/commercial vehicles (`/mobility`) and general classifieds (`/recommerce/forsale`).
- 🧾 **Returns rich structured data** — title, description, price, images, technical specifications/attributes, equipment list, location, and seller info.
- 🔓 **No login or session cookies** required — dba.dk's search API and ad pages are public.
- 📤 **Export anywhere** — JSON, CSV, Excel, XML, or HTML Table.

### About dba.dk

dba.dk is Denmark's largest online marketplace for classifieds, spanning vehicles (`/mobility`:
cars, motorcycles, boats, trucks, agricultural equipment) and general secondhand goods
(`/recommerce/forsale`: everything from furniture to pets to electronics), listed by both private
sellers and dealers.

### What can you do with this data?

- **Price monitoring** — track asking prices for specific categories, makes, or models over time.
- **Market comparison** — benchmark prices across many comparable listings.
- **Dataset building** — feed structured listing data into analytics, dashboards, or ML pipelines.

### How to use DBA.dk Scraper

1. Open the actor on Apify.
2. Add one or more dba.dk URLs to the **urls** field (search pages, shop pages or single ads).
3. Set **maxRecords** to cap how many listings to collect (default `100`).
4. Click **Start** and let the scraper run.
5. Download the results in JSON, CSV, Excel, XML, or HTML Table.

#### Input parameters

| Input parameter | Description                                     | Required | Default value                                                            |
| --------------- | ----------------------------------------------- | -------- | ------------------------------------------------------------------------ |
| `urls`          | dba.dk URLs to scrape (search, shop or ad URLs) | `true`   | `{ "url": "https://www.dba.dk/mobility/search/car?q=c4&variant=0.749" }` |
| `maxRecords`    | Maximum number of records to scrape             | `false`  | `100`                                                                    |

#### Supported input URLs

DBA.dk Scraper accepts three kinds of URLs. There is no separate mobility dealer stage; a car
dealer's listings are reached through a search URL filtered to that dealer, or one ad at a time.

- **Search URL** — collects every listing on the page (and paginates):
  - `https://www.dba.dk/mobility/search/car?q=c4&variant=0.749`
  - `https://www.dba.dk/recommerce/forsale/search?category=0.77`
  - Any `/mobility/search/...` or `/recommerce/forsale/search` path with query filters copied straight from your browser works.
- **Shop URL** — collects every ad a shop has published (and paginates):
  - `https://www.dba.dk/shop/hygglo`
  - `https://www.dba.dk/shop/hygglo?page=2` starts from that page instead of the first.
- **Single ad URL** — collects one listing's full detail record:
  - `https://www.dba.dk/mobility/item/24169526`
  - `https://www.dba.dk/recommerce/forsale/item/20748565`
  - The short form `https://www.dba.dk/24169526` also works (dba.dk redirects it to the canonical URL).

You can mix all three URL types in the same `urls` list. Each output record's `inputUrl` field is
set to the original URL you supplied that produced it.

### Examples

#### Input

Scrape 20 search results from a given search URL:

```json
{
  "urls": ["https://www.dba.dk/mobility/search/car?q=c4&variant=0.749"],
  "maxRecords": 20
}
```

Scrape one specific ad:

```json
{
  "urls": ["https://www.dba.dk/mobility/item/24169526"],
  "maxRecords": 1
}
```

#### Output

Search runs return the **same ad records** as single-ad runs — one record per listing — with
each record's `inputUrl` set to the URL you supplied.

The example below is illustrative: identifying details have been replaced with fictional
placeholders, and the `images`, `attributes`, and `equipment` arrays are shortened. Real records
contain the full lists.

```json
{
  "id": "1234567",
  "url": "https://www.dba.dk/mobility/item/1234567",
  "title": "BMW i4 eDrive40 Fully Charged M-Sport 5D",
  "description": "Pæn og velholdt BMW i4 med masser af udstyr.\n\n⭐ Highlights ⭐\n✅ Soltag",
  "descriptionHtml": "<p>Pæn og velholdt BMW i4 med masser af udstyr.<br><br>⭐ Highlights ⭐<br>✅ Soltag</p>",
  "price": 369900,
  "currency": "DKK",
  "brand": "BMW",
  "model": "i4",
  "modelSeries": "4-Serie",
  "modelYear": 2024,
  "images": ["https://images.dbastatic.dk/dynamic/default/item/1234567/<uuid-1>", "https://images.dbastatic.dk/dynamic/default/item/1234567/<uuid-2>"],
  "location": {
    "text": "Eksempelvej 12, 2650 Eksempelby",
    "postalCode": null,
    "postalName": null,
    "countryCode": null,
    "latitude": null,
    "longitude": null
  },
  "vertical": "car",
  "category": ["DBA", "Bil", "Biler", "BMW", "i4"],
  "attributes": {
    "Mærke": "BMW",
    "Model": "i4",
    "Modelår": "2024",
    "Karosseri": "Hatchback 5-dørs",
    "Drivmiddel": "El",
    "fuel": "4",
    "year": "2024",
    "price": "369900"
  },
  "equipment": ["360° kamera", "Adaptiv fartpilot", "Airbag foran", "Alufælge", "Ambiente belysning"],
  "assurances": { "Service": "Køretøjets serviceprogram er blevet fulgt. Køretøjet er blevet serviceret i henhold til fabrikkens retningslinjer." },
  "seller": {
    "id": "1000000",
    "name": "Eksempel Biler A/S",
    "type": "dealer",
    "address": "Eksempelvej 12, 2650 Eksempelby",
    "phone": null,
    "dealerUrl": "https://www.dba.dk/mobility/dealer/1000000/eksempel-biler-as",
    "cvrUrl": "https://datacvr.virk.dk/enhed/virksomhed/00000000",
    "adCountText": null,
    "openingHours": [
      { "day": "Mandag", "hours": "09:00 - 17:30" },
      { "day": "Tirsdag", "hours": "09:00 - 17:30" }
    ]
  },
  "transaction": null,
  "lastEdited": "2026-09-03T11:10:00.000Z",
  "scrapedAt": "2026-09-12T20:21:10.602Z",
  "inputUrl": "https://www.dba.dk/mobility/search/car?q=c4&variant=0.749"
}
```

The record above is a `/mobility` listing, where the structured location fields and `transaction`
are both empty — dba.dk only publishes those on `/recommerce/forsale` ads, which fill them in like
this:

```json
{
  "location": {
    "text": "3600 Frederikssund",
    "postalCode": "3600",
    "postalName": "Frederikssund",
    "countryCode": "DK",
    "latitude": 55.83658956,
    "longitude": 12.09380321
  },
  "seller": {
    "id": "1156257931",
    "name": null,
    "type": null,
    "address": null,
    "phone": null,
    "dealerUrl": null,
    "cvrUrl": null,
    "adCountText": null,
    "openingHours": []
  },
  "transaction": {
    "transactable": true,
    "buyNow": true,
    "sellerPaysShipping": false,
    "eligibleForShipping": true,
    "shippingText": "Fragt fra 29,99 kr. + Tryg betaling 181 kr.",
    "priceText": "5.699 kr.",
    "tradeTypeText": "Til salg"
  }
}
```

### Output formats

Results are stored in an Apify dataset (`ad_details`). After a run finishes you can download the
data as **JSON, CSV, Excel, XML, or HTML Table**, or pull it via the Apify API.

### ❓ FAQ

#### Do I need proxies to scrape dba.dk?

No setup needed on your side. The actor configures proxies automatically for optimal
performance. There is nothing to select or configure in the input.

#### Do I need to write code?

No. DBA.dk Scraper is a no-code tool: paste your URLs, set `maxRecords`, and run.

#### Can I scrape a single ad or a whole search?

Both. Provide a search URL to collect many listings, or a single ad URL to collect one listing's
full record. You can mix search, shop and single-ad URLs in the same `urls` list.

#### Can I scrape every ad from one shop?

Yes — paste the shop's profile URL, e.g. `https://www.dba.dk/shop/hygglo`, and the scraper
paginates through every ad that shop has published, up to `maxRecords`. Add `?page=N` to start
from a later page.

#### Can I scrape every listing from one car dealer?

There's no dedicated mobility dealer stage — use a search URL filtered to that dealer, or scrape the
dealer's individual ad URLs directly. The dealer's id is the number in its page URL, so
`https://www.dba.dk/mobility/dealer/5287217/larsen-auto` becomes
`https://www.dba.dk/mobility/search/car?orgId=5287217`. Supplying the dealer page itself logs that
hint and skips the URL.

#### How many listings can I scrape?

Use `maxRecords` to set the cap (default `100`). Increase it to collect more results across a
paginated search.

#### Does it work for both cars and general classifieds?

Yes. Any `/mobility/search/...` path (cars, motorcycles, boats, trucks, agricultural equipment)
and `/recommerce/forsale/search` (general classifieds) are supported, for both search and
single-ad URLs.

#### What if an ad can't be scraped?

The record is still written, as `{ inputUrl, url, title: "AD not found" }`, so you can tell
missing listings apart from silent gaps.

#### Is it legal to scrape dba.dk?

Scraping publicly available data is generally permitted, but you are responsible for how you use
it. Listings may include seller contact details, which are personal data under the GDPR. Avoid
collecting or storing personal data beyond what your use case requires, and comply with
applicable laws and dba.dk's terms. Consult legal counsel if you're unsure.

#### What export formats are available?

JSON, CSV, Excel, XML, and HTML Table — plus programmatic access via the Apify API.

### Support

For custom or simplified outputs, or to report a bug, contact the developer at
**support (at) getmediumdata.com** or open an issue.

# Actor input Schema

## `maxRecords` (type: `integer`):

Maximum number of records to be scraped

## `urls` (type: `array`):

List of URLs from DBA.dk (https://www.dba.dk) that needs to be scraped — search result pages, shop pages or single ad pages

## Actor input object example

```json
{
  "maxRecords": 10,
  "urls": [
    {
      "url": "https://www.dba.dk/mobility/search/car?q=c4&variant=0.749"
    }
  ]
}
```

# 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 = {
    "maxRecords": 10,
    "urls": [
        {
            "url": "https://www.dba.dk/mobility/search/car?q=c4&variant=0.749"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ivanvs/dba-dk-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 = {
    "maxRecords": 10,
    "urls": [{ "url": "https://www.dba.dk/mobility/search/car?q=c4&variant=0.749" }],
}

# Run the Actor and wait for it to finish
run = client.actor("ivanvs/dba-dk-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 '{
  "maxRecords": 10,
  "urls": [
    {
      "url": "https://www.dba.dk/mobility/search/car?q=c4&variant=0.749"
    }
  ]
}' |
apify call ivanvs/dba-dk-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ivanvs/dba-dk-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/q6XturxyY9TsPZT0o/builds/zzd48T0N0VsdECILv/openapi.json
