# DBA Scraper - Danish Classifieds, Prices & Locations (`s-r/dba-scraper`) Actor

Export DBA.dk search results to a dataset: ad title, asking price in Danish kroner, seller town, listing age, image, shipping and buy-now flags, and used or new condition. Search by keyword or paste a filtered DBA URL. Built for resellers, price research and Danish second-hand market analysis.

- **URL**: https://apify.com/s-r/dba-scraper.md
- **Developed by:** [SR](https://apify.com/s-r) (community)
- **Categories:** E-commerce, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 run start fees

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

## DBA.dk Scraper

DBA.dk Scraper is a DBA scraper that turns public DBA search results into structured classified ads with asking prices in Danish kroner, locations, listing age, images and visible shipping badges. Supply a search term or paste a DBA search URL with your filters. Each delivered advertisement becomes one dataset row, with its stable item ID and the fields used by the existing actor.

The actor reads the public search page. It does not require a DBA account, cookies or a DBA API credential. It returns what the page actually contains; it does not visit individual advertisement pages to obtain contact details or a full seller description.

Results can be downloaded from the dataset as JSON, CSV, Excel or XML, or fetched through the Apify API, so the actor also works as a DBA search API for your own scripts, spreadsheets and dashboards.

### DBA.dk Scraper input

The seven original input names and defaults remain available. Provide `query` or `url`. The Console prefill uses `cykel`, the Danish word for bicycle, but `query` has no API default. An API input with neither a query nor a URL produces a successful empty run with an input error. A pasted URL takes precedence for searching; a separately supplied query is still echoed in the output.

| Field | Type | Default | Meaning |
|---|---|---|---|
| `query` | string | absent | Search text, trimmed before use |
| `url` | string | absent | DBA search URL, including browser-selected filters |
| `sort` | string | `relevance` | `relevance`, `newest`, `price_asc` or `price_desc` |
| `price_min` | integer | absent | Minimum asking price in DKK, starting at zero |
| `price_max` | integer | absent | Maximum asking price in DKK, starting at zero |
| `limit` | integer | `60` | Maximum advertisements, from 1 to 1,000 |
| `retries` | integer | `3` | Maximum attempts per page, from 1 to 6 |

When `sort` is relevance, an existing sort parameter in a pasted URL is retained. The other sort choices override that parameter. Price bounds override their corresponding URL parameters. Zero is a valid bound. Use the current `/recommerce/forsale/search?q=` search URL shown in the browser: the older `/soeg/?soegeord=` route can discard the search term.

### Output

The following row is a real response collected on 4 October 2026 with `query: "cykel"` and `limit: 60`. Listings, prices and age labels change as sellers update advertisements, so this is evidence of the output format rather than a promise that this particular listing remains available.

```json
{
  "item_id": "25347373",
  "url": "https://www.dba.dk/recommerce/forsale/item/25347373",
  "title": "El-cykel Sparta C-Grid Energy M8TB D46",
  "subtitle": null,
  "price": 10000,
  "price_text": "10.000 kr.",
  "price_type": "fixed price",
  "currency": "DKK",
  "location": "Risskov",
  "posted_label": "5 dage",
  "buy_now": false,
  "shipping_ready": false,
  "is_promoted": true,
  "badges": [
    "Betalt placering"
  ],
  "condition": null,
  "availability": null,
  "description": null,
  "image": "https://images.dbastatic.dk/dynamic/default/item/25347373/8f81239b-3344-434a-9093-2b501594b2af",
  "enriched": false,
  "query": "cykel",
  "position": 1,
  "fetched_at": "2026-10-03T23:58:38.742Z",
  "source": "dba-scraper",
  "listing_id": "25347373",
  "image_url": "https://images.dbastatic.dk/dynamic/default/item/25347373/8f81239b-3344-434a-9093-2b501594b2af",
  "country": "DK"
}
```

The original fields remain present: `item_id`, `url`, `title`, `subtitle`, `price`, `price_text`, `price_type`, `currency`, `location`, `posted_label`, `buy_now`, `shipping_ready`, `is_promoted`, `badges`, `condition`, `availability`, `description`, `image`, `enriched`, `query` and `position`. Optional text fields remain null when the page does not supply them. `badges` is a list of visible Danish labels or null. Boolean flags remain booleans.

Additional fields provide a common listing format: `source`, `fetched_at`, `listing_id`, `image_url` and `country`. The original `item_id` and `image` remain available beside these names. `fetched_at` is a UTC collection timestamp. Positions start at one after deduplication, and repeated advertisements are identified by their item IDs.

`price` is a number in DKK when an amount is available. Danish thousand separators are removed and decimal commas are interpreted correctly. `price_text` preserves the visible wording. `price_type` distinguishes a fixed price, a giveaway, a wanted advertisement and a price that was not stated. A giveaway has a genuine price of zero. A wanted advertisement represents a buyer seeking an item and has a null asking price. Filter wanted ads before calculating asking-price averages.

Condition and availability come from structured data on the same search page. That data has titles but no advertisement IDs, so the actor joins only unique titles. Repeated titles remain unenriched instead of receiving an uncertain match. `enriched` reports whether the join succeeded. The search-page `description` often repeats the title; it should not be treated as the full advertisement description. The visible subtitle may mix brand, size and storage capacity, so it should not automatically be treated as a clean brand field.

### Use cases for this DBA scraper

- **Price research for resellers.** Collect asking prices for a product on DBA.dk, filter out wanted ads with `price_type`, and see what comparable second-hand items are listed for before you buy or set your own price.
- **Second-hand market analysis in Denmark.** Run the same query on a schedule and compare snapshots of asking prices, listing counts and locations over time, for example for bicycles, furniture, electronics or baby equipment.
- **Lead and stock monitoring.** Sort by `newest` and run the actor regularly to pick up new advertisements for a search term or a filtered DBA URL, then pass new item IDs to your own alert or spreadsheet.
- **Regional comparison.** Use `location` to see where supply for a category is concentrated, and `shipping_ready` to see how much of it can be shipped instead of collected.
- **Data for analysts and developers.** Feed structured rows with stable item IDs into a database, BI tool or price model without maintaining your own parser for DBA search pages.

### DBA scraper compared with other options

**Browsing DBA.dk by hand.** The website is the right tool for buying a single item. It does not give you a table of all results with numeric prices, so comparing dozens or hundreds of ads means copying values one by one.

**An official DBA API.** DBA offers integrations for professional sellers who publish advertisements automatically. Those are for posting ads, not for exporting search results. When you need search results as data, this actor provides them as a pay-per-result DBA API on Apify.

**Writing your own scraper.** Open-source DBA scrapers exist, but you have to run them, keep them working when the page changes, and handle price formats such as Danish thousand separators, giveaways and wanted ads yourself. Here those cases are already mapped to `price`, `price_text` and `price_type`.

**Other DBA actors in the Apify Store.** Several actors cover DBA. This one keeps a stable output format for existing users, separates giveaways and wanted ads from priced listings, reports `enriched` instead of guessing condition, charges nothing per advertisement for an empty result, and uses a small per-advertisement price with no monthly rental.

### Pricing

The DBA scraper uses pay-per-event pricing, and the existing model is unchanged. `run_start` costs **$0.0005 per run**, including a run that returns no advertisements. `listing` costs **$0.0007 per advertisement written to the dataset**. A run returning 60 advertisements therefore has event charges of $0.0425; 1,000 advertisements have event charges of $0.7005. An empty run has no listing charge and retains the existing run-start event.

An advertisement repeated across collected pages is delivered and counted once. The actor delivers rows before charging the listing event. Failed pages do not create invented rows or listing charges. Users without a paid Apify plan receive at most ten rows per run, and listing charges follow those delivered rows. Paying users keep the requested volume up to the existing 1,000-row limit. The output summary reports the delivered count and charge outcome.

### Summary and errors

The default key-value store preserves the `summary` record with advertisement counts, price states, pages containing advertisements, first-page card counts, enrichment counts and collection duration. The `errors` record appears when a search or page fails and contains a code and message. The `OUTPUT` record also reports final delivery, charge counts and whether a free-plan cap applied.

A search without matching advertisements finishes successfully with an empty dataset. Invalid input also becomes an empty result with an explanatory error. Temporary source failures can leave an incomplete collection; already collected advertisements remain available and the summary identifies the interruption. Large collections can be continued internally until the requested volume or the end of the results is reached.

### Limits and interpretation

DBA is the Danish market, so `currency` is DKK and `country` is DK. Search pages contain about 54 advertisement cards. Paid placements can appear above sorted results and can repeat on several pages; `is_promoted` lets you identify the visible placement. `shipping_ready` reflects the Fiks færdig label. `buy_now` is true only when a supported visible purchase label is present. Absence of a label does not prove that a seller refuses other arrangements.

`posted_label` is the age wording displayed by DBA, not a converted publication timestamp. Search results are a snapshot of asking prices and availability as shown at collection time. They do not establish that an item was sold or what a buyer eventually paid. Narrow queries and price bands help make repeated observations comparable, but the number of rows cannot exceed the requested limit or the actual available results.

### FAQ

#### Does DBA.dk Scraper need a DBA login?

No. It reads publicly visible search results and has no DBA credential input. Seller phone numbers and account-only information are outside this output.

#### How many advertisements can I receive?

The existing limit accepts one to 1,000 advertisements. A user without a paid Apify plan receives at most ten rows. Fewer rows are returned when the search ends earlier or some pages cannot be collected.

#### Why can condition or availability be null?

Those fields depend on the page's structured data and a unique title match. Paid placements or repeated titles can lack that match. The actor preserves null rather than guessing a condition.

#### Can I paste a filtered DBA search URL?

Yes. Use the current search URL from your browser. The URL wins over the query for fetching, and explicit input sort or price filters can override its corresponding parameters.

#### Does an empty result charge for an advertisement?

No. An empty dataset creates no listing event. The unchanged $0.0005 run-start event still applies once, as specified by the actor's existing live price model.

#### Is there a DBA API I can use instead?

DBA's own integrations are meant for professional sellers who publish advertisements. To read search results as data, call this actor through the Apify API: send a query or DBA search URL as input and read the rows from the dataset in JSON or CSV.

#### Can I export DBA.dk results to Excel or CSV?

Yes. Every run stores its rows in an Apify dataset, which you can download as CSV, Excel, JSON or XML from the Console or through the API.

# Actor input Schema

## `query` (type: `string`):

What to search for on dba.dk. Danish terms work best. Optional if you pass a search URL instead.

## `url` (type: `string`):

A dba.dk search URL to read instead of a search term. Paste it from your browser after applying any filters. Takes precedence over the search term.

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

How to order the ads.

## `price_min` (type: `integer`):

Lower price bound in Danish kroner.

## `price_max` (type: `integer`):

Upper price bound in Danish kroner.

## `limit` (type: `integer`):

How many ads to return, 1 to 1000. A page carries roughly 54.

## `retries` (type: `integer`):

Maximum attempts per page, within the shared request budget.

## Actor input object example

```json
{
  "query": "cykel",
  "url": "https://www.dba.dk/recommerce/forsale/search?q=iphone",
  "sort": "relevance",
  "limit": 60,
  "retries": 3
}
```

# Actor output Schema

## `results` (type: `string`):

One row per classified ad.

## `summary` (type: `string`):

Ads returned, pages fetched, how many carried a price and a location, and how many were enriched from the page's structured data.

## `errors` (type: `string`):

Per-page failures with a code and a redacted message.

# 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 = {
    "query": "cykel",
    "limit": 60,
    "retries": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("s-r/dba-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 = {
    "query": "cykel",
    "limit": 60,
    "retries": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("s-r/dba-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 '{
  "query": "cykel",
  "limit": 60,
  "retries": 3
}' |
apify call s-r/dba-scraper --silent --output-dataset

```

## MCP server setup

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