# DM Product Scraper (`m3web/dm-product-scraper`) Actor

Easily collect product data from DM-drogeriemarkt websites in all operating countries. This scraper supports product categories  and  filtered results, gathering details like GTIN, name, brand, price, availability, ratings, and more. | dm.de | dm-drogeriemarkt.it | dm.pl | dm.ro | dm.cz | dm.hu |...

- **URL**: https://apify.com/m3web/dm-product-scraper.md
- **Developed by:** [M3Web](https://apify.com/m3web) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 32 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.39 / 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.
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

## DM Product Scraper

### Overview

Easily collect product data from DM-drogeriemarkt websites across all countries where the company operates. This scraper supports product categories and filtered results, making it ideal for gathering detailed product information such as GTIN, name, brand, price, availability, ratings, and more.

| Website                                      | Country                     |
| :------------------------------------------- | :-------------------------- |
| [www.dm.de](https://www.dm.de/)              | Germany                     |
| [www.dm-drogeriemarkt.at](https://www.dm-drogeriemarkt.at/) | Austria                     |
| [www.dm-drogeriemarkt.ba](https://www.dm-drogeriemarkt.ba/) | Bosnia and Herzegovina      |
| [www.dm-drogeriemarkt.bg](https://www.dm-drogeriemarkt.bg/) | Bulgaria                    |
| [www.dm.hr](https://www.dm.hr/)              | Croatia                     |
| [www.dm.cz](https://www.dm.cz/)              | Czech Republic              |
| [www.dm.hu](https://www.dm.hu/)              | Hungary                     |
| [www.dm-drogeriemarkt.it](https://www.dm-drogeriemarkt.it/) | Italy                       |
| [www.dm.pl](https://www.dm.pl/)              | Poland                      |
| [www.dm.ro](https://www.dm.ro/)              | Romania                     |
| [www.dm.rs](https://www.dm.rs/)              | Serbia                      |
| [www.dm.sk](https://www.dm.sk/)              | Slovakia                    |
| [www.dm.si](https://www.dm.si/)              | Slovenia                    |

### Features

- Supports product categories and filtered results URLs.
- Fetches detailed product information, including GTIN, name, price, brand, availability, ratings, and more.

**Important Notice on "/search" URLs**\
This scraper is designed to comply fully with the website's [robots.txt](https://www.dm.de/robots.txt) rules. According to these rules, URLs containing "/search" are disallowed and therefore will be automatically skipped by the scraper. Users are advised not to generate URLs using the search functionality of the website, as such URLs will not be processed. The scraper ensures adherence to these rules to respect the website's terms of service and policies.

### URL examples

- Category: <https://www.dm.de/pflege-und-parfum/parfum/herren-parfum>
- Category with filters: <https://www.dm.de/pflege-und-parfum/parfum/damen-parfum?allCategories.id0=020301&pageSize0=30&sort0=editorial_relevance&popularFacet0=Lieferbar&currentPage0=0>

**Scraping Limitations per URL for "Category URL"**\
The maximum number of products that can be scraped from one "Category URL" or "Category URL with filters" is limited to **200**. If the total product count exceeds 200, use multiple URLs from subcategories or apply filters to stay within the limit. There is no restriction on the overall number of results you can collect using this scraper.

Single product URLs are not supported.\
Running the scraper on individual product pages (/p/d/...) is inefficient and costly. The same product data (GTIN, DAN, brand, title, category, image, price, ratings, etc.) is already available through category URLs. For best results, always use category URLs or category URLs with filters — they return the same structured product information at a fraction of the cost.

### Results

#### Sample Output

The following is a sample output you can expect from the DM Product Scraper:

```json
 {
  "website": "dm.de",
  "gtin": 3414206000592,
  "dan": 1531800,
  "brand": "Joop",
  "title": "Homme Eau de Toilette, 75 ml",
  "category": "Herren Parfum",
  "image": "https://products.dm-static.com/images/f_auto,q_auto,c_fit,h_320,w_320/v1747411521/assets/pas/images/22d0cc25-d944-43ef-bf18-30c065961fdd/joop-homme-eau-de-toilette",
  "priceCurrency": "EUR",
  "price": 29.95,
  "url": "https://www.dm.de/p/d/1531800/joop-homme-eau-de-toilette",
  "ratingValue": 4.5189,
  "ratingCount": 212,
  "additionalData": {
    "priceInfo": {
      "prefix": "Einzelpreis",
      "price": {
        "current": {
          "value": "29,95 €"
        }
      },
      "tileInfos": [
        "0,075 l (399,33 € je 1 l)"
      ]
    },
    "netPriceInfo": {
      "prefix": "Einzelpreis",
      "price": {
        "current": {
          "value": "25,17 €"
        }
      },
      "tileInfos": [
        "0,075 l (335,57 € je 1 l)"
      ]
    },
    "categories": [
      "Herren Parfum"
    ],
    "a11yLabel": "Marke: Joop; Produktname: Homme Eau de Toilette, 75 ml; Preis: 29,95 €; Grundpreis: 0,075 l (399,33 € je 1 l)"
  }
},
```

### Is it legal to scrape DM-drogeriemarkt website?

This scraper was designed to comply with the directives specified in the [dm.de robots.txt](https://www.dm.de/robots.txt) file as of 25.03.2025.

# Actor input Schema

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

URLs to start with. Examples include product categories  and individual product URLs.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.dm.de/pflege-und-parfum/parfum/herren-parfum"
    }
  ]
}
```

# Actor output Schema

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

Link to the dataset items scraped from DM-drogeriemarkt websites (products from categories, filtered results, or single product pages).

# 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 = {
    "startUrls": [
        {
            "url": "https://www.dm.de/pflege-und-parfum/parfum/herren-parfum"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("m3web/dm-product-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 = { "startUrls": [{ "url": "https://www.dm.de/pflege-und-parfum/parfum/herren-parfum" }] }

# Run the Actor and wait for it to finish
run = client.actor("m3web/dm-product-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 '{
  "startUrls": [
    {
      "url": "https://www.dm.de/pflege-und-parfum/parfum/herren-parfum"
    }
  ]
}' |
apify call m3web/dm-product-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,m3web/dm-product-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/LC6fhtXjyAYo974Db/builds/29VfacFocdKZVouFo/openapi.json
