# Mifarma Scraper - Spanish Online Pharmacy Products (`studio-amba/mifarma-scraper`) Actor

Scrape products, prices, brands, ratings and stock from Mifarma (mifarma.es / atida.com), a major Spanish online pharmacy in the Atida group. Extract vitamins, supplements, cosmetics and health products. No login required.

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

## Mifarma Scraper

Scrape products from [Mifarma](https://www.mifarma.es) (now part of [atida.com](https://www.atida.com)), one of Spain's largest online pharmacies and part of the Atida group. Search by keyword and pull clean, structured product data: names, prices, original (was) prices, brands, ratings, review counts, stock status, categories, pack format, and images.

No login. No cookies. No account required.

### Why use this scraper?

- **Price monitoring** — Track Mifarma prices for vitamins, supplements, cosmetics and health products over time and spot promotions.
- **Competitive analysis** — Compare Mifarma pricing against other Spanish pharmacies (Promofarma, Dosfarma, Atida siblings) on matching brands and formats.
- **Market research** — Analyse assortment, brand coverage, and pricing across pharmacy and parapharmacy categories.
- **Retail intelligence** — Monitor stock availability and discount depth across large product ranges.
- **Catalogue enrichment** — Enrich your own catalogue with images, ratings, descriptions, and category paths.
- **Brand monitoring** — Track how your brand's products are priced, rated, and merchandised on Mifarma.
- **Data journalism & academia** — Build datasets on Spanish health and beauty retail pricing and consumer ratings.
- **Reselling & arbitrage** — Find discounted lines and price gaps against other Spanish and EU health retailers.

### How to scrape Mifarma data

1. **Create an Apify account** — Sign up at [apify.com](https://apify.com) (free tier available).
2. **Open the Mifarma Scraper** — Navigate to this actor's page in the Apify Store.
3. **Enter a search term** — Type a Spanish product keyword (e.g., "vitamina c", "protector solar", "colageno", "paracetamol"). The scraper searches the full Mifarma / Atida Spain catalogue.
4. **Refine (optional)** — Filter by brand, price range, stock status, or choose a sort order (price low-to-high, price high-to-low, newest).
5. **Set a result limit** — Choose how many products you want (default: 100).
6. **Run the actor** — Click "Start". Most searches finish in well under a minute.
7. **Download your data** — Export as JSON, CSV, or Excel from the Dataset tab, or pull it via the Apify API for automated workflows.

### How it works

Since the Atida group merged the Spanish Mifarma storefront into atida.com, the site serves its storefront behind a Cloudflare "verify real visitors" wall. But its product catalogue is powered by a public product-search index (the same Magento + Algolia search the site's own search box queries directly from your browser). This scraper reads from that same index, so it is fast and reliable and does not need a headless browser or residential proxies for normal use. Each request returns up to 1000 fully hydrated products.

If the site ever rotates its public search credentials, the actor can automatically refresh them (set an optional Bright Data API key). This is not needed for normal use.

### Input parameters

| Field | Type | Description |
|-------|------|-------------|
| `searchQuery` | string | Product search term in Spanish (e.g., "vitamina c", "protector solar"). Defaults to "vitamina c" if left empty. |
| `maxResults` | integer | Maximum number of products to scrape (default: 100). |
| `sort` | select | Sort order: relevance (default), price low-to-high, price high-to-low, or newest. |
| `brand` | string | Filter to a single brand (exact match, e.g., "Redoxon", "Isdin", "La Roche-Posay"). |
| `inStockOnly` | boolean | Only return products currently in stock. |
| `minPrice` | integer | Only return products at or above this price (EUR). |
| `maxPrice` | integer | Only return products at or below this price (EUR). |
| `brightDataApiKey` | string | Optional. Fallback to refresh the built-in search credentials if they ever rotate. Not needed for normal use. |
| `proxyConfiguration` | object | Legacy proxy settings. The catalogue is fetched from a public search API, so this can be left at its default. |

### Output fields

| Field | Type | Example |
|-------|------|---------|
| `name` | string | "Avène Solar Spray Invisible Corporal SPF50 200ml" |
| `brand` | string | "Avene" |
| `price` | number | 16.99 |
| `originalPrice` | number | 25.9 |
| `currency` | string | "EUR" |
| `sku` | string | "513174459052" |
| `productId` | string | "83576" |
| `inStock` | boolean | true |
| `rating` | number | 5 |
| `reviewCount` | integer | 677 |
| `category` | string | "Salud e Higiene > Protección y Crema Solar > Protección Solar Corporal" |
| `packFormat` | string | "Spray - 200 ml" |
| `isOtc` | boolean | false |
| `imageUrl` | string | "https://assets.atida.com/transform/..." |
| `url` | string | "https://www.atida.com/es-es/avene-solar-alta-proteccion-50-spray-200-ml" |
| `productDescription` | string | "Fórmula única que combina..." |
| `scrapedAt` | string | "2026-07-06T20:00:00.000Z" |

### Example output

```json
{
  "name": "La Roche Posay Anthelios Spray Familiar SPF50+ 300 ml",
  "brand": "La Roche Posay",
  "price": 20.99,
  "originalPrice": 37.45,
  "currency": "EUR",
  "sku": "396524303737",
  "productId": "12345",
  "inStock": true,
  "rating": 5,
  "reviewCount": 5,
  "category": "Salud e Higiene > Protección y Crema Solar > Protección Solar Corporal",
  "packFormat": "Spray - 300 ml",
  "isOtc": false,
  "imageUrl": "https://assets.atida.com/transform/abc/2100000190577",
  "url": "https://www.atida.com/es-es/la-roche-posay-anthelios-spray-invisible-family-spf50-300-ml",
  "productDescription": "Protector solar corporal de alta protección para toda la familia.",
  "scrapedAt": "2026-07-06T20:00:00.000Z"
}
```

### Cost estimate

The scraper reads from a fast public search index, so runs are cheap and quick. A typical search of a few hundred products finishes in well under a minute and costs a fraction of a cent in Apify compute plus the per-result event fee. Pricing scales linearly with the number of results you request.

### Limitations / known issues

- **Search-based** — Results come from the site's search index. Use specific Spanish keywords for best coverage; very broad terms return the site's relevance-ranked top matches.
- **EAN not exposed** — The public index does not carry the EAN barcode. Products are keyed by SKU and internal product id instead.
- **Category depth** — The `category` field reports the deepest available category path for each product.
- **Not affiliated with Mifarma or Atida** — This is an independent tool for publicly available product data. Respect the site's terms and applicable laws when using scraped data.

### Related actors

Building a European pharmacy price dataset? Pair this with our other pharmacy and parapharmacy scrapers to compare pricing across chains and markets:

- **Newpharma Scraper** — Belgian online pharmacy products and prices.
- **Farmaline Scraper** — Belgian/EU pharmacy catalogue.
- **Multipharma Scraper** — Belgian pharmacy chain products.
- **Dr. Max Scraper** — Central European pharmacy prices.
- **Aponeo Scraper** — German online pharmacy products.
- **Farmacia Tei Scraper** — Romania's largest online pharmacy.

Atida runs sibling storefronts on the same platform across Germany, France, Portugal, Belgium and the Netherlands, so equivalent per-market scrapers are straightforward to add.

# Actor input Schema

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

Product search term in Spanish (e.g., 'vitamina c', 'protector solar', 'paracetamol', 'colageno').

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

Maximum number of products to scrape.

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

Sort order for results.

## `brand` (type: `string`):

Filter to a single brand (exact match, e.g., 'Redoxon', 'Isdin', 'La Roche-Posay').

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

Only return products currently in stock.

## `minPrice` (type: `integer`):

Only return products at or above this price.

## `maxPrice` (type: `integer`):

Only return products at or below this price.

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

Optional: your own Bright Data Web Unlocker API key. Only used as a fallback to refresh the built-in search credentials if they ever rotate. Not needed for normal use.

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

Legacy proxy settings. The product catalogue is fetched from a public search API, so this can be left at its default.

## Actor input object example

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

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

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

# Run the Actor and wait for it to finish
run = client.actor("studio-amba/mifarma-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 c",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "ES"
  }
}' |
apify call studio-amba/mifarma-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=studio-amba/mifarma-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/tnd7DynWMVucqj4IP/builds/Kyl2y1zrwqOLO15i6/openapi.json
