# PromoFarma Scraper - Spanish Online Pharmacy Products (`studio-amba/promofarma-scraper`) Actor

Scrape products, prices, brands, ratings and stock from PromoFarma.com, Spain's largest online pharmacy marketplace (DocMorris group). Extract vitamins, supplements, cosmetics and health products by keyword or category. No login required.

- **URL**: https://apify.com/studio-amba/promofarma-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 $20.00 / 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.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#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

## PromoFarma Scraper

Scrape products from [PromoFarma.com](https://www.promofarma.com), Spain's largest online pharmacy marketplace. PromoFarma is part of the DocMorris group and aggregates the catalogue of more than 1,000 pharmacies and sellers, listing around 150,000 parapharmacy products from 7,000+ brands: vitamins, supplements, cosmetics, sun care, baby care and personal health products.

Search by keyword or browse a category. Each product includes the name, brand, best marketplace price, recommended retail price, stock status, rating, category path, image and product URL.

### What you get

| Field | Description |
|---|---|
| `name` | Full product name including format and size |
| `brand` | Brand or manufacturer name |
| `price` | Current best marketplace price |
| `currency` | Currency code (EUR) |
| `originalPrice` | Recommended retail price, when above the selling price |
| `sku` | PromoFarma numeric product code (the `p-<code>` in the URL) |
| `productId` | Internal PromoFarma product UUID |
| `category` | Category path from root to leaf, joined with `>` |
| `inStock` | Availability (`null` when the site does not expose it) |
| `rating` | Average customer rating (0 to 5) |
| `reviewCount` | Number of customer ratings |
| `sellerCountry` | Country of the marketplace seller offering the best price |
| `imageUrl` | Primary product image URL |
| `url` | Direct product page URL |
| `source` | `promofarma.com` |
| `country` | `ES` |
| `scrapedAt` | ISO 8601 timestamp |

Example item:

```json
{
  "name": "ESI Vitamina D 30 Tabletas",
  "brand": "ESI",
  "price": 6.92,
  "currency": "EUR",
  "originalPrice": 8,
  "sku": "439716",
  "category": "Herbolario > Dietética Natural > Complementos Alimenticios Naturales > Defensas y Sistema Inmune",
  "inStock": true,
  "rating": 4,
  "reviewCount": 1,
  "sellerCountry": "ES",
  "imageUrl": "https://statics.promofarma.com/static/promofarma/prod/product_images/WC5G88_es_ES_0.png",
  "url": "https://www.promofarma.com/es/esi-vitamina-d-30-tabletas/p-439716",
  "source": "promofarma.com",
  "country": "ES",
  "scrapedAt": "2026-08-18T14:52:10.959Z"
}
```

### How to scrape PromoFarma data

1. Set a **Search Query** in Spanish, for example `vitamina d`, `protector solar`, `colageno` or `crema hidratante`. Or set a **Category** instead.
2. Set **Max Results** to the number of products you need.
3. Run the actor. Results land in the dataset and can be exported as JSON, CSV or Excel.

If you provide neither a search query nor a category, the actor runs a default search for `vitamina d` so an empty input still returns data.

#### Search examples

```json
{ "searchQuery": "vitamina d", "maxResults": 100 }
```

```json
{ "searchQuery": "protector solar 50", "maxResults": 200, "sort": "price_asc" }
```

#### Category examples

Use the category path from any promofarma.com category URL:

```json
{ "category": "proteccion-solar/c-1542", "maxResults": 500 }
```

```json
{ "category": "facial/c-225", "sort": "price_desc", "maxResults": 300 }
```

Verified category slugs: `proteccion-solar/c-1542` (sun care), `facial/c-225` (facial cosmetics), `cosmetica/c-1` (cosmetics), `salud/c-2` (health), `cosmetica-corporal/c-293` (body care). Any category URL from the site works, pasted in full or as the path after `/es/`.

If you give both a search query and a category, the actor scrapes both listings and deduplicates the results.

### Input options

| Option | Default | Description |
|---|---|---|
| `searchQuery` | none | Spanish product keyword |
| `category` | none | Category path or full category URL |
| `sort` | `relevance` | `relevance`, `price_asc` or `price_desc` |
| `inStockOnly` | `false` | Only return products currently in stock |
| `maxResults` | `100` | Hard cap on scraped products (maximum 9,000) |
| `proxyConfiguration` | residential ES | Spanish residential proxies, required by the site's bot protection |

### Limits worth knowing

- The site serves 60 products per listing page and caps any single listing at around 9,000 products. For bigger extractions, split the work across subcategories or multiple keywords.
- Medicine categories (`medicamentos/c-1733` and its children) list almost no products because prescription-adjacent items are not browsable on the marketplace. Parapharmacy categories are fully covered.
- EAN barcodes are not exposed by the site. The `sku` field is PromoFarma's own product code.
- `originalPrice` is the recommended retail price reported by the marketplace and is only included when it is above the current selling price.

### Cost

The actor uses a real browser session with Spanish residential proxies, which is what the site's bot protection requires. A run scraping a few hundred products typically completes in a couple of minutes. Cost estimate: one listing-page fetch covers 60 products and a run starts a single browser, so the usage cost per result stays low even on larger runs (a 120-product cloud test finished in under 30 seconds).

Note that a run's usage cost only settles after the run has SUCCEEDED. A run that fails does not deliver partial billing surprises later.

### Use cases

- **Price monitoring**: track pharmacy and parapharmacy prices across Spain's largest marketplace, including discounts against recommended retail prices.
- **Brand monitoring**: see how a brand's products are priced, rated and stocked across 1,000+ sellers.
- **Assortment analysis**: map which products, brands and categories are available in the Spanish online pharmacy market.
- **Marketplace intelligence**: PromoFarma is a multi-seller marketplace, so the best price per product reflects real competition between pharmacies.

### Related actors

- [Mifarma Scraper](https://apify.com/jelledesramaults/mifarma-scraper) for mifarma.es (Atida), Spain
- [DosFarma Scraper](https://apify.com/jelledesramaults/dosfarma-scraper) for dosfarma.com, Spain
- [DocMorris Scraper](https://apify.com/jelledesramaults/docmorris-scraper) for docmorris.de, Germany
- [Shop Apotheke Scraper](https://apify.com/jelledesramaults/shop-apotheke-scraper) for shop-apotheke.com, Germany

### Legal note

This actor scrapes publicly available product listing data only. It does not access accounts, personal data or gated content. Users are responsible for how they use the extracted data.

# Actor input Schema

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

Product search term in Spanish (e.g., 'vitamina d', 'protector solar', 'colageno', 'crema hidratante'). If neither a search query nor a category is given, the actor runs a default search for 'vitamina d'.

## `category` (type: `string`):

Category path from a promofarma.com category URL, e.g. 'proteccion-solar/c-1542', 'facial/c-225', 'cosmetica/c-1', 'salud/c-2' — or the full URL. Verified slugs: proteccion-solar/c-1542, facial/c-225, cosmetica/c-1, salud/c-2, cosmetica-corporal/c-293. Note: medicine categories (medicamentos/c-1733 tree) list almost no products because prescription-adjacent items are not browsable.

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

Sort order for results.

## `inStockOnly` (type: `boolean`):

Only return products currently in stock. Off by default — when off, out-of-stock products are included with inStock: false.

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

Maximum number of products to scrape. The site serves 60 products per page and caps any single listing at around 9,000 products.

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

PromoFarma sits behind an F5/Shape client challenge that blocks plain HTTP clients and datacenter fingerprints — residential Spanish proxies are required (see docs/site-recon/promofarma.md).

## Actor input object example

```json
{
  "searchQuery": "vitamina d",
  "sort": "relevance",
  "inStockOnly": false,
  "maxResults": 60,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}
```

# 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 = {
    "searchQuery": "vitamina d",
    "maxResults": 60,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "ES"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio-amba/promofarma-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 = {
    "searchQuery": "vitamina d",
    "maxResults": 60,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "ES",
    },
}

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

```

## MCP server setup

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