# Newpharma Scraper — Belgian Pharmacy Products & Prices (`studio-amba/newpharma-scraper`) Actor

Scrape pharmacy products, OTC medicines, supplements, and health items from Newpharma.be — Belgium's largest online pharmacy. Browse categories with full product details. No login required.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## Newpharma Scraper

Scrape pharmacy products, OTC medicines, supplements, beauty items, and health products from [Newpharma.be](https://www.newpharma.be) — Belgium's largest online pharmacy with 45,000+ products from 1,700+ brands.

### How to scrape Newpharma data

1. Go to the [Newpharma Scraper](https://apify.com/studio-amba/newpharma-scraper) page on the Apify Store.
2. Click **Try for free** to open the actor in Apify Console.
3. Choose a category URL or use the default (OTC medicines — Pain & Fever).
4. Optionally add a search keyword to filter results (e.g., "paracetamol").
5. Set the maximum number of results you want.
6. Click **Start** and wait for the run to finish.
7. Download your data as JSON, CSV, or Excel from the Dataset tab.

### What data can you extract?

For each product, the scraper extracts:

| Field | Description | Example |
|-------|-------------|---------|
| name | Full product name with dosage/format | Sofrasolone Spray Nasal Microdoseur 10ml |
| brand | Manufacturer or brand name | MELISANA |
| price | Current selling price (EUR) | 4.29 |
| currency | Currency code | EUR |
| originalPrice | Price before discount (if applicable) | 5.99 |
| url | Full product page URL | https://www.newpharma.be/pharmacie/melisana/18941/... |
| imageUrl | Product image URL | https://img.newpharma.net/images/products/... |
| category | Category breadcrumb | Medicaments > Rhume > Sprays |
| productId | Newpharma internal product ID | 18941 |
| inStock | Availability status | true |
| productType | Product classification (PH = pharmacy) | PH |
| rating | Customer rating (0-5) | 4.2 |
| description | Product description (with detail mode) | En cas d'un nez bouche... |
| scrapedAt | Timestamp of data collection | 2026-06-07T10:30:00.000Z |

### Input options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| startUrls | array | OTC Pain & Fever category | Category or product URLs to scrape |
| searchQuery | string | (empty) | Filter products by keyword within categories |
| maxResults | integer | 50 | Maximum number of products to return |
| language | select | fr | Site language: French (/pharmacie/) or Dutch (/apotheek/) |
| includeProductDetails | boolean | false | Fetch individual product pages for extra details |
| brightDataApiKey | string | (required) | Bright Data Web Unlocker API key |

### Example output

```json
{
    "name": "Dafalgan 1g Comprimés 40",
    "brand": "DAFALGAN",
    "price": 8.49,
    "currency": "EUR",
    "url": "https://www.newpharma.be/pharmacie/dafalgan/106248/dafalgan-1g-comprimes-40.html",
    "imageUrl": "https://img.newpharma.net/images/products/fr/500/dafalgan-1g-comprimes-40.v3.jpg",
    "category": "Medicaments (sans prescription) > Douleur - Fièvre",
    "productId": "106248",
    "inStock": true,
    "productType": "PH",
    "scrapedAt": "2026-06-07T10:30:00.000Z"
}
```

### How it works

Newpharma.be is protected by Cloudflare Turnstile — one of the most aggressive anti-bot systems. This actor bypasses it using Bright Data's Web Unlocker service:

1. You provide a Bright Data API key (get one at [brightdata.com](https://brightdata.com)).
2. The actor sends requests through Bright Data's infrastructure which handles the Cloudflare challenge.
3. Product data is extracted from the server-rendered HTML using Cheerio (no browser needed).

This approach is fast, reliable, and cost-effective compared to running headless browsers.

### Category URLs

You can scrape any Newpharma category by providing the category URL. Popular categories:

- **OTC Medicines:** `https://www.newpharma.be/pharmacie/cat/medicaments-sans-prescription/190.html`
- **Pain & Fever:** `https://www.newpharma.be/pharmacie/cat/medicaments-sans-prescription/douleurs-fievre-symptomes-grippaux/190-191.html`
- **Vitamins:** `https://www.newpharma.be/pharmacie/cat/vitamines-nutritherapie/20.html`
- **Beauty & Cosmetics:** `https://www.newpharma.be/pharmacie/cat/beaute-cosmetiques/12.html`
- **Baby & Children:** `https://www.newpharma.be/pharmacie/cat/grossesse-bebes-enfants/1228.html`
- **First Aid:** `https://www.newpharma.be/pharmacie/cat/premiers-soins-soins-a-domicile/1265.html`

For Dutch language, replace `/pharmacie/` with `/apotheek/` and use Dutch category slugs.

### Cost estimate

Each category page fetched costs approximately $0.01 in Bright Data credits. A typical category page contains 20-25 products, so:

- **50 products** = ~2-3 page fetches = ~$0.03 in Bright Data costs + Apify compute
- **500 products** = ~20-25 page fetches = ~$0.25 in Bright Data costs + Apify compute
- With `includeProductDetails` enabled, add ~$0.01 per product for individual page fetches.

### Bilingual support

Newpharma operates in both French and Dutch for Belgian customers:

- **French:** URLs start with `/pharmacie/` (default)
- **Dutch:** URLs start with `/apotheek/`

Set the `language` input to switch between them. Product names, categories, and descriptions will be in the selected language.

### Limitations

- **Search is not supported** — Newpharma's search uses Algolia client-side JavaScript which is not available in server-rendered HTML. Use category URLs or keyword filtering instead.
- **CNK codes** — Belgian pharmacy codes are not consistently displayed in the HTML. The field is included for future compatibility.
- **Rate limiting** — The actor respects Bright Data's rate limits. Very large scrapes (1000+ products) may take several minutes.
- **Product details mode** — Enabling `includeProductDetails` makes the scraper significantly slower and more expensive as it fetches each product page individually.

### No login required

This scraper extracts publicly available product data without requiring any Newpharma account or login credentials. No cookies, no sessions, no authentication needed.

# Actor input Schema

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

Newpharma category or product pages to scrape. Example: https://www.newpharma.be/pharmacie/cat/medicaments-sans-prescription/190.html

## `searchQuery` (type: `string`):

Filter products by keyword (searches within category pages). If no Start URLs provided, scrapes the OTC medicines category by default.

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

Maximum number of products to return.

## `language` (type: `string`):

Site language — determines URL prefix (/pharmacie/ for French, /apotheek/ for Dutch).

## `includeProductDetails` (type: `boolean`):

Fetch individual product pages for extra details (description, full category breadcrumb). Slower but more complete data.

## `brightDataApiKey` (type: `string`):

Your Bright Data API key for the Web Unlocker zone. Required to bypass Newpharma's Cloudflare protection. Get one at https://brightdata.com

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

Apify proxy configuration (not used directly — Bright Data handles anti-bot bypass).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.newpharma.be/pharmacie/cat/medicaments-sans-prescription/douleurs-fievre-symptomes-grippaux/190-191.html"
    }
  ],
  "searchQuery": "paracetamol",
  "maxResults": 20,
  "language": "fr",
  "includeProductDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "BE"
  }
}
```

# 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.newpharma.be/pharmacie/cat/medicaments-sans-prescription/douleurs-fievre-symptomes-grippaux/190-191.html"
        }
    ],
    "searchQuery": "paracetamol",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "BE"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/newpharma-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.newpharma.be/pharmacie/cat/medicaments-sans-prescription/douleurs-fievre-symptomes-grippaux/190-191.html" }],
    "searchQuery": "paracetamol",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "BE",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/newpharma-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.newpharma.be/pharmacie/cat/medicaments-sans-prescription/douleurs-fievre-symptomes-grippaux/190-191.html"
    }
  ],
  "searchQuery": "paracetamol",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "BE"
  }
}' |
apify call studio-amba/newpharma-scraper --silent --output-dataset

```

## MCP server setup

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