# dm Search API Documentation

<p>Search public dm.de products by keyword or category. Both modes honour q. Filter by brand, price range, sort and page. Cards carry DAN, GTIN, numeric EUR price, original price, discount, base price when dm shows one, full size image, rating and review count. One credit per successful request; five credits if the residential fallback is used.</p>

- **Documentation:** [https://scrappa.co/docs/dm-api/dm_search](https://scrappa.co/docs/dm-api/dm_search)
- **API group:** dm-drogerie markt API
- **Endpoint:** `GET https://scrappa.co/api/dm/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | No | Keywords; required unless category is given. |
| `category` | string | No | Category id from dm.categories or dm.ids; required unless q is given. |
| `brand` | string | No | Brand name filter from the brandName facet. |
| `price_from` | string | No | Minimum numeric price in EUR. |
| `price_to` | string | No | Maximum numeric price in EUR. |
| `sort` | string | No | relevance, price_asc, price_desc, new or rating from dm.sorts. |
| `page` | string | No | One based page number. |
| `page_size` | string | No | Items per page, 1 to 100. |
| `mode` | string | No | frontend (facets) or crawl (cheap fallback). |
| `pharmacy` | string | No | Only pharmacy products. |
| `popular_facet` | string | No | Popular facet value from the facets list. |

## Example response

```json
{
    "data": {
        "page": 1,
        "items": [
            {
                "id": "3104754",
                "gtin": "4015600461234",
                "name": "NIVEA Creme",
                "price": 4.99,
                "rating": 4.6,
                "currency": "EUR",
                "discount": 2,
                "review_count": 812,
                "original_price": 6.99,
                "discount_percent": 29
            }
        ],
        "total": 1000,
        "facets": [],
        "page_size": 30,
        "total_pages": 34
    },
    "meta": {
        "billable": true
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A filter or id failed validation. No credit is charged. |
| 503 | Upstream Unavailable | The public data is temporarily unavailable. No credit is charged. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
