# Medpex.de Scraper - German Pharmacy Prices, PZN and EAN (`studio-amba/medpex-scraper`) Actor

Scrape product data from medpex.de, the German online pharmacy. Get current prices, list prices, discounts, stock, PZN and EAN codes, sellers, ratings and categories for medicines, skincare, vitamins and personal care.

- **URL**: https://apify.com/studio-amba/medpex-scraper.md
- **Developed by:** [Studio Amba](https://apify.com/studio-amba) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.20 / 1,000 result scrapeds

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?

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

## Medpex.de Scraper

Pull product data from medpex.de, a German online pharmacy. The actor returns one row per product with the current price in EUR, list price (UVP) and discount when a product is on offer, unit price, stock status, PZN, EAN barcode, seller, rating, review count, brand and category.

Medpex.de sells medicines, vitamins, skincare, baby and personal care products from around 220,000 product pages. If you track German pharmacy prices or match products across shops by PZN or barcode, this actor gives you a repeatable feed.

### How to scrape Medpex.de data

There are two ways to tell the actor which products to read.

1. Paste product pages into `productUrls`, for example `https://www.medpex.de/kytta-schmerzsalbe/10832865`.
2. Leave `productUrls` empty and fill `urlKeywords`. The actor reads the public product sitemaps and keeps products whose address contains one of your words, for example `kytta` or `sonnencreme`.

The actor stops at `maxResults`. If you leave everything empty, it reads the first 50 products in the sitemap.

Search result pages are not read. The actor only requests product pages and the sitemaps.

### Input

| Field | Type | Description |
|---|---|---|
| `productUrls` | list of URLs | Medpex.de product pages |
| `urlKeywords` | list of words | Used when no URLs are given. Keeps products whose address contains one of the words |
| `maxResults` | number | Maximum number of rows (default 50) |
| `proxyConfiguration` | proxy | Apify residential proxy in Germany by default. Datacenter addresses are blocked by the site |

### What you get back

| Field | Description |
|---|---|
| `sku` | Medpex product ID. For medicines this is the PZN |
| `pzn` | Pharmazentralnummer, 8 digits, when the product has one |
| `ean` | EAN barcode, when the product page lists one |
| `name` | Product name including pack size |
| `brand` | Brand name |
| `manufacturer` | Manufacturer name |
| `packagingSize` | Pack size as shown, for example 150 g |
| `price` | Current selling price in EUR, VAT included |
| `originalPrice` | Recommended retail price (UVP), only when the selling price is lower |
| `discountPercent` | Percent below the list price |
| `unitPrice` | Price per unit as shown, for example 151,27 EUR/kg |
| `currency` | ISO currency code (EUR) |
| `inStock` | Whether the product is in stock |
| `seller` | Seller of the offer: medpex or a marketplace partner |
| `sellerCountry` | Country code of the seller |
| `isMedicine` | Whether medpex classes the product as a medicine |
| `rating` | Average customer rating, 1 to 5 |
| `reviewCount` | Number of customer reviews |
| `category` | Category path on the site |
| `description` | Short description |
| `imageUrl` | Main product image |
| `url` | Product page address |
| `scrapedAt` | Time of the read |
| `country`, `language` | `de`, `de` |

### Example output

```json
{
  "sku": "04215559",
  "pzn": "04215559",
  "ean": null,
  "name": "Kytta-Sedativum 30 St",
  "brand": "Kytta",
  "manufacturer": "WICK Pharma - Zweigniederlassung der Procter & Gamble GmbH",
  "packagingSize": "30 St",
  "price": 14.79,
  "originalPrice": 21.13,
  "discountPercent": 30,
  "unitPrice": "0,49 €/St",
  "currency": "EUR",
  "inStock": true,
  "seller": "medpex",
  "sellerCountry": "NL",
  "isMedicine": true,
  "rating": 4.38,
  "reviewCount": 26,
  "category": "Arzneimittel-Gesundheit > Muskeln & Gelenke",
  "url": "https://www.medpex.de/kytta-sedativum-fuer-den-tag/04215559",
  "country": "de",
  "language": "de"
}
```

### Input examples

Read one specific product:

```json
{
  "productUrls": [
    "https://www.medpex.de/kytta-schmerzsalbe/10832865"
  ]
}
```

Read up to 500 Kytta and Voltaren products:

```json
{
  "urlKeywords": ["kytta", "voltaren"],
  "maxResults": 500
}
```

### Discounts

When a product is on offer, `originalPrice` holds the recommended retail price and `discountPercent` the difference. When there is no offer both fields are empty.

### PZN and EAN

Medicines carry a PZN, which is also the product ID. Cosmetics and other products from marketplace partners usually carry an EAN and no PZN. The two fields are separate so you can match against either.

### Marketplace sellers

Some products are sold by partners instead of medpex. `seller` names the seller of the shown offer and `sellerCountry` the country it ships from.

### Cost

Pricing is per result. A run of 120 products takes under a minute. The cost only settles after the run has SUCCEEDED, so check the run's usage once it finishes.

### Use cases

- Track German pharmacy prices for a brand or a category.
- Match products between Medpex.de and other European pharmacies with the PZN or EAN.
- Watch discounts, stock and ratings for health and skincare brands.
- Build a price comparison or market report for Germany.

### Related actors

Other pharmacy retailers in this fleet cover DocMorris, Shop Apotheke, Redcare, Aponeo and Farmasiet.

### FAQ

**Does it need a login?** No. The actor reads public product pages.

**How many products can I read?** The sitemaps list around 220,000 products. Set `maxResults` to the number you need.

**How often is the data updated?** Each run reads the live site.

**What if a product page is removed?** The page is skipped and the run goes on with the next one.

### Notes

Use the data in line with the site's terms and with local law. Source websites can change or restrict access, and we are not responsible for restrictions imposed by them.

# Actor input Schema

## `productUrls` (type: `array`):

Product pages from medpex.de, e.g. https://www.medpex.de/kytta-schmerzsalbe/10832865. Each product becomes one row.

## `urlKeywords` (type: `array`):

Used when no product URLs are given. The actor reads the shop sitemap and keeps products whose address contains one of these words, e.g. kytta or sonnencreme. Leave empty to read the first products in the sitemap.

## `maxResults` (type: `integer`):

Maximum number of rows (one row per product).

## `proxyConfiguration` (type: `object`):

Proxy used for the requests. Medpex.de blocks datacenter addresses, so the default is Apify residential proxy in Germany.

## Actor input object example

```json
{
  "urlKeywords": [
    "kytta"
  ],
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DE"
  }
}
```

# 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 = {
    "urlKeywords": [
        "kytta"
    ],
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "DE"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/medpex-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 = {
    "urlKeywords": ["kytta"],
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "DE",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/medpex-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 '{
  "urlKeywords": [
    "kytta"
  ],
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "DE"
  }
}' |
apify call studio-amba/medpex-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studio-amba/medpex-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/jDF6svb9VbrdQQpff/builds/A0gKtmEIpuLDWpWOs/openapi.json
