# DBA.dk Marketplace Scraper (`automation-lab/dba-dk-marketplace-scraper`) Actor

Scrape public DBA.dk marketplace listings with prices, locations, images, attributes, and optional detail enrichment.

- **URL**: https://apify.com/automation-lab/dba-dk-marketplace-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Marketplace Scraper

Extract public marketplace listings from DBA.dk search and category pages. The actor collects Danish classified ads with prices, locations, images, item attributes, and optional detail-page descriptions.

### What does DBA.dk Marketplace Scraper do?

DBA.dk Marketplace Scraper turns public DBA.dk marketplace pages into structured datasets. Provide one or more search queries such as `iphone`, `sofa`, or `cykel`, or paste DBA.dk marketplace URLs, and the actor returns listing rows that are ready for spreadsheets, BI dashboards, alerts, or pricing models.

### Who is it for?

- 🛒 Resale teams tracking Danish second-hand prices.
- 📈 Ecommerce analysts monitoring local supply and demand.
- 🔔 Deal-alert builders watching specific keywords and locations.
- 🧾 Classifieds researchers collecting comparable listings.
- 🤖 Automation builders feeding DBA.dk data into enrichment workflows.

### Why use this actor?

DBA.dk is one of Denmark's most important marketplace sources, but manual browsing is slow when you need repeatable data. This actor gives you clean records with stable listing URLs, numeric prices, images, location hints, and scrape timestamps so you can compare items over time.

### How much does it cost to scrape DBA.dk listings?

This actor uses pay-per-event pricing. There is a small run-start event and a per-listing event. You only pay for records the actor saves to the dataset. Exact Store prices are shown on the Apify actor page and may include volume tiers for larger users.

### Input options

| Input | Description |
| --- | --- |
| `queries` | DBA.dk search keywords. |
| `startUrls` | DBA.dk search or category URLs. |
| `maxItems` | Maximum listings to save. |
| `includeDetails` | Visit detail pages for richer descriptions and images. |
| `requestTimeoutSecs` | Timeout per HTTP request. |

### Output data

Each dataset item represents one marketplace listing.

| Field | Description |
| --- | --- |
| `listingId` | DBA.dk item ID parsed from the URL. |
| `url` | Public listing page. |
| `title` | Listing title. |
| `price` | Price text as displayed. |
| `priceValue` | Numeric price value. |
| `currency` | Usually `DKK`. |
| `location` | Location shown on the listing card. |
| `postedAgo` | Relative posting age when visible. |
| `description` | Detail or schema description when available. |
| `attributes` | Visible item attributes. |
| `imageUrls` | Listing image URLs. |
| `isSponsored` | Whether the card is marked as paid placement. |
| `sourceUrl` | Search/category page that produced the record. |
| `scrapedAt` | ISO timestamp for the scrape. |

### Example output

```json
{
  "listingId": "22499066",
  "url": "https://www.dba.dk/recommerce/forsale/item/22499066",
  "title": "Apple iPhone 15 Pro Max 256 GB hvid",
  "price": "4.400 kr.",
  "priceValue": 4400,
  "currency": "DKK",
  "location": "Vallensbæk Strand",
  "postedAgo": "6 dage",
  "imageUrls": ["https://images.dbastatic.dk/dynamic/default/item/22499066/..."],
  "isSponsored": true,
  "sourceUrl": "https://www.dba.dk/recommerce/forsale/search?q=iphone",
  "scrapedAt": "2026-06-30T02:43:45.650Z"
}
````

### How to scrape DBA.dk search results

1. Open the actor on Apify.
2. Enter one or more search queries, for example `iphone` or `sofa`.
3. Set `maxItems` to the number of listings you need.
4. Keep `includeDetails` disabled for faster monitoring runs, or enable it when descriptions matter.
5. Run the actor and export the dataset as JSON, CSV, Excel, or via API.

### Search-query examples

- `iphone`
- `sofa`
- `cykel`
- `kamera`
- `lego`
- `barnevogn`

### DBA.dk URL examples

Use URLs from the public marketplace area, for example:

```text
https://www.dba.dk/recommerce/forsale/search?q=iphone
https://www.dba.dk/recommerce/forsale/search?q=sofa
```

### Detail enrichment

When `includeDetails` is enabled, the actor opens every listing URL it is about to save. This can add richer descriptions and additional item images. Disable it when you only need fast search-card data or when you are running frequent monitors.

### Tips for better results

- Start with a specific query and a small `maxItems` value.
- Use broad category/search URLs for market-size monitoring.
- Enable detail enrichment only for high-value workflows.
- Run the actor on a schedule to build a price-history table.
- Deduplicate externally by `listingId` if you merge multiple runs.

### Integrations

- 📊 Send datasets to Google Sheets for daily price dashboards.
- 🔔 Trigger alerts when `priceValue` drops below your target.
- 🧠 Feed listing titles and descriptions into classification or enrichment models.
- 🗄️ Store records in a database keyed by `listingId` for trend analysis.
- 📨 Combine with Apify webhooks to notify a Slack channel after each run.

### API usage: Node.js

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/dba-dk-marketplace-scraper').call({
  queries: ['iphone'],
  maxItems: 50,
});
console.log(run.defaultDatasetId);
```

### API usage: Python

```python
from apify_client import ApifyClient

client = ApifyClient('MY-APIFY-TOKEN')
run = client.actor('automation-lab/dba-dk-marketplace-scraper').call(run_input={
    'queries': ['sofa'],
    'maxItems': 50,
})
print(run['defaultDatasetId'])
```

### API usage: cURL

```bash
curl -X POST "https://api.apify.com/v2/acts/automation-lab~dba-dk-marketplace-scraper/runs?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"queries":["iphone"],"maxItems":50}'
```

### MCP usage

Use this actor from Claude Desktop, Claude Code, or other MCP-capable tools via Apify MCP Server:

```text
https://mcp.apify.com/?tools=automation-lab/dba-dk-marketplace-scraper
```

Claude Code setup:

```bash
claude mcp add apify-dba-dk --transport http "https://mcp.apify.com/?tools=automation-lab/dba-dk-marketplace-scraper"
```

Claude Desktop JSON configuration:

```json
{
  "mcpServers": {
    "apify-dba-dk": {
      "url": "https://mcp.apify.com/?tools=automation-lab/dba-dk-marketplace-scraper"
    }
  }
}
```

Example prompts:

- "Scrape 50 DBA.dk listings for iPhone and summarize the price range."
- "Find recently posted sofa listings and return the cheapest five."
- "Monitor DBA.dk for camera listings and flag items below 1,000 DKK."

### Scheduling and monitoring

Create an Apify schedule for daily or hourly checks. Use `maxItems` to control run size and cost. For recurring alerts, export only new `listingId` values since your previous run.

### Data quality notes

DBA.dk page layout and visible fields can vary by category. Some listings include item attributes such as brand or storage size, while others only expose title, price, location, and images. Seller metadata is collected only when public markup exposes it.

### Legality and responsible use

This actor extracts publicly available marketplace pages. Always use the data responsibly, respect DBA.dk terms, avoid excessive scraping, and do not collect or misuse private personal information.

### FAQ

#### Is this a DBA.dk API?

No. The actor extracts public DBA.dk marketplace pages and returns structured data in an Apify dataset.

### Troubleshooting

#### Why are some fields null?

DBA.dk does not expose every field on every listing. Enable `includeDetails` for richer records, but expect some seller or category fields to remain unavailable.

#### Why did my run return fewer records than expected?

The selected query may have fewer listings, DBA.dk may group sponsored cards differently, or `maxItems` may be lower than the number you expected. Try a broader query or URL.

### Related scrapers

- [DBA.dk Cars Scraper](https://apify.com/automation-lab/dba-dk-cars-scraper) for vehicle-specific DBA.dk workflows.
- [2dehands / 2ememain Scraper](https://apify.com/automation-lab/2dehands-2ememain-scraper) for Belgian classifieds monitoring.
- [1688 Scraper](https://apify.com/automation-lab/1688-scraper) for product sourcing workflows.

### Changelog

- Initial version: public DBA.dk marketplace search/category scraping with optional detail enrichment.

### Support

If your workflow needs an additional DBA.dk field or a category-specific extraction improvement, open an issue on the Apify actor page with an example URL.

# Actor input Schema

## `queries` (type: `array`):

Keywords to search on DBA.dk marketplace, for example iPhone, sofa, cykel, or kamera.

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

Optional DBA.dk marketplace search/category URLs to scrape. Use URLs from dba.dk/recommerce/forsale/.

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

Maximum number of listing records to save across all queries and URLs.

## `includeDetails` (type: `boolean`):

When enabled, the scraper visits each listing page to collect richer descriptions and images. This is slower but more complete.

## `requestTimeoutSecs` (type: `integer`):

HTTP timeout for each DBA.dk page request.

## Actor input object example

```json
{
  "queries": [
    "iphone"
  ],
  "startUrls": [
    {
      "url": "https://www.dba.dk/recommerce/forsale/search?q=iphone"
    }
  ],
  "maxItems": 20,
  "includeDetails": false,
  "requestTimeoutSecs": 30
}
```

# 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 = {
    "queries": [
        "iphone"
    ],
    "startUrls": [
        {
            "url": "https://www.dba.dk/recommerce/forsale/search?q=iphone"
        }
    ],
    "maxItems": 20,
    "includeDetails": false,
    "requestTimeoutSecs": 30
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/dba-dk-marketplace-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 = {
    "queries": ["iphone"],
    "startUrls": [{ "url": "https://www.dba.dk/recommerce/forsale/search?q=iphone" }],
    "maxItems": 20,
    "includeDetails": False,
    "requestTimeoutSecs": 30,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/dba-dk-marketplace-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "iphone"
  ],
  "startUrls": [
    {
      "url": "https://www.dba.dk/recommerce/forsale/search?q=iphone"
    }
  ],
  "maxItems": 20,
  "includeDetails": false,
  "requestTimeoutSecs": 30
}' |
apify call automation-lab/dba-dk-marketplace-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/dba-dk-marketplace-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "DBA.dk Marketplace Scraper",
        "description": "Scrape public DBA.dk marketplace listings with prices, locations, images, attributes, and optional detail enrichment.",
        "version": "0.1",
        "x-build-id": "292ZmcwedFKOZLb5Z"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/automation-lab~dba-dk-marketplace-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-automation-lab-dba-dk-marketplace-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/automation-lab~dba-dk-marketplace-scraper/runs": {
            "post": {
                "operationId": "runs-sync-automation-lab-dba-dk-marketplace-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/automation-lab~dba-dk-marketplace-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-automation-lab-dba-dk-marketplace-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "queries": {
                        "title": "Search queries",
                        "type": "array",
                        "description": "Keywords to search on DBA.dk marketplace, for example iPhone, sofa, cykel, or kamera.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "DBA.dk URLs",
                        "type": "array",
                        "description": "Optional DBA.dk marketplace search/category URLs to scrape. Use URLs from dba.dk/recommerce/forsale/.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxItems": {
                        "title": "Maximum listings",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of listing records to save across all queries and URLs.",
                        "default": 20
                    },
                    "includeDetails": {
                        "title": "Open listing detail pages",
                        "type": "boolean",
                        "description": "When enabled, the scraper visits each listing page to collect richer descriptions and images. This is slower but more complete.",
                        "default": false
                    },
                    "requestTimeoutSecs": {
                        "title": "Request timeout seconds",
                        "minimum": 10,
                        "maximum": 120,
                        "type": "integer",
                        "description": "HTTP timeout for each DBA.dk page request.",
                        "default": 30
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
