# Mifarma Scraper - Peru Pharmacy Prices (`normdata/mifarma-scraper`) Actor

Scrape every Mifarma Peru product: regular, Monedero and card prices, discounts, unit and blister prices, stock, prescription type, brand, generic, categories, composition, use, warnings and photos. Filter by search, category, brand, price, discount, stock and prescription. Monitor new products.

- **URL**: https://apify.com/normdata/mifarma-scraper.md
- **Developed by:** [Norm Data](https://apify.com/normdata) (community)
- **Categories:** E-commerce
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.50 / 1,000 products

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

![Norm Data](https://raw.githubusercontent.com/FabriAV/normdata/refs/heads/main/assets/banner_norm2.png)

## 💊 Mifarma Scraper - Peru Pharmacy Prices

Extract every product from **Mifarma**, one of Peru's biggest pharmacy chains: about **12,800 medicines, vitamins, beauty, baby and personal care products**. Each product comes with its **regular, Monedero del Ahorro and card price** ("Exclusivo con Sip"), discount, **price per unit and per blister**, stock, **prescription type** (venta libre or receta), generic or not, brand, categories, **composition, how to use, warnings, contraindications and side effects**, packs and photos. Search by name or active ingredient, pick categories and brands, and filter by price, discount, stock and prescription. It reads **1,000 products in about 10 seconds** and the whole catalog in under 2 minutes, with no proxy, and can run on a schedule to send you **only new products**.

> 👉 **Try it now:** press **Start**. The ready-made input gives you 10 products in a few seconds.<br>
> 💰 **$0.0125 per product** on the Free plan (10 products per run), from $0.0119 on paid plans. [See pricing](#-pricing)

### ✨ Why this scraper?

> - **The only Mifarma Peru scraper on Apify**
>
> - **All three prices**<br>
>   Regular, Monedero del Ahorro and card price, with the discount of each, exactly as the product page shows them.
>
> - **Blister and unit prices**<br>
>   For medicines sold in parts, the price per blister and per unit.
>
> - **Full product sheet in every row**<br>
>   Composition, how to use, warnings, contraindications and side effects as plain text, no extra cost.
>
> - **Matches Inkafarma**<br>
>   Mifarma uses the same product ids as Inkafarma (same group), so you can join both pharmacies on `id`.
>
> - **Fast, no proxy**<br>
>   1,000 products in about 10 seconds.
>
> - **Apify platform**<br>
>   Schedule runs, get only new products, export to Excel or CSV, use the API, or connect Google Sheets, Zapier and Make.

### 🚀 How to scrape Mifarma

1. Create a free Apify account.
2. Pick the filters you need, or keep the ready-made input.
3. Click **Start**.
4. Download the products as Excel, CSV or JSON from the **Output** tab.

### 💰 Pricing

#### How much does it cost to scrape Mifarma?

You pay a one-time **$0.0034** per run, plus a price for each product saved:

| Charged for | Free | Bronze | Silver | Gold+ |
| --- | --- | --- | --- | --- |
| **Product**: One Mifarma product saved to the dataset | 0.0125 | 0.0119 | 0.0111 | 0.0105 |

Example: 1,000 products cost about **$11.9** on Bronze. No proxy or compute costs on top.

### 📦 What data you get

| Field | Description |
| --- | --- |
| `imageUrl` | Main photo. |
| `id` | Mifarma product id (SKU). The same id as at Inkafarma. |
| `name` | Product name. |
| `brand` | Brand. |
| `category` | Main category path, like "Salud › Dolor › Analgésicos". |
| `price` | Regular price in soles (S/). |
| `promoPrice`, `cardPrice` | Monedero del Ahorro price and the card price ("Exclusivo con Sip"), only when lower than the regular price. |
| `discountPercent`, `cardDiscountPercent` | Percent off the regular price, for the promo and for the card price. |
| `bestPrice`, `currency` | The lowest of the three prices, and its currency (PEN). |
| `presentation`, `quantity`, `unitMeasure` | Pack as sold, like "CAJA 28 UN", its quantity and unit (UN, ML, GR...). |
| `unitPrice`, `fractionPresentation`, `fractionPrice` | For products also sold in parts (like a blister): price per unit, the part, and its price. |
| `prescription` | Venta libre (over the counter), Presenta receta, Adjuntar receta or Retener receta. |
| `status`, `stock`, `maxPerOrder` | In stock or Sold out, units in stock and most units per order. |
| `badge` | Label shown on the product, like "¡NUEVO LANZAMIENTO!". |
| `sapCode` | The chain's internal SAP product code. |
| `summary`, `description` | Short and full description. |
| `composition`, `howToUse`, `precautions`, `contraindications`, `sideEffects`, `technicalData` | Composition (active ingredients), how to use, warnings, contraindications, side effects and technical data, as plain text. |
| `inStock`, `onSale`, `prescriptionRequired`, `generic`, `pack`, `fractionable` | Yes/no: in stock, on sale, needs a prescription, generic, pack, sold in parts. |
| `categories` | Every category path it is listed in. |
| `packItems` | For packs: the products inside (id, name, presentation, quantity). |
| `variants` | Other sizes or colors (id, name, lowest price, in stock, link). |
| `gifts` | Free gifts that come with it. |
| `substituteIds` | Ids of products the site offers as substitutes (same active ingredient). |
| `images` | Every photo. |
| `url` | Its Mifarma page. |
| `scrapedAt` | When this row was saved. |

#### Example row (trimmed)

```json
{
  "imageUrl": "https://dcuk1cxrnzjkh.cloudfront.net/imagesproducto/092109X.jpg",
  "id": "092109",
  "name": "Complejo Probiótico 50 Mil Millones UFC Cápsula",
  "brand": "NUTRICOST",
  "category": "Farmacia › Malestar Estomacal › Agentes Antidiarreicos",
  "price": 169,
  "promoPrice": 152.1,
  "cardPrice": 144.4,
  "discountPercent": 10,
  "cardDiscountPercent": 15,
  "bestPrice": 144.4,
  "currency": "PEN",
  "presentation": "FRASCO 60 UN",
  "quantity": 1,
  "unitMeasure": "UN",
  "prescription": "Venta libre",
  "status": "In stock",
  "stock": 5,
  "maxPerOrder": 3,
  "badge": "¡CUPÓN AHORRO40 DESDE S/199!",
  "sapCode": "840734",
  "summary": "Complejo probiótico para salud digestiva\nAporta 260 mg de complejo probiótico por porción\nAporta más de 50 mil millones de UFC por porción\nPresentación en cápsulas\nRS: DE-5618",
  "composition": "Complejo probiótico 260 mg\nUFC (unidades formadoras de colonias) Más de 50 mil millones de UFC",
  "howToUse": "1 cápsula al día.",
  "precautions": "No superar la dosis expresamente recomendada. Los productos dietéticos no deben usarse como sustituto de una dieta equilibrada. Si está tomando medicamentos o tiene una afección ...",
  "contraindications": "En caso de embarazo y lactancia, consultar con su médico",
  "sideEffects": "En las dosis recomendadas son poco comunes. Puede presentar molestias gastrointestinales leves y temporales.",
  "inStock": true,
  "onSale": true,
  "prescriptionRequired": false,
  "generic": false,
  "pack": false,
  "fractionable": false,
  "categories": ["Farmacia › Malestar Estomacal › Agentes Antidiarreicos", "Salud › Problemas Digestivos › Flora Intestinal"],
  "substituteIds": ["088207", "088224", "092097"],
  "images": ["https://dcuk1cxrnzjkh.cloudfront.net/imagesproducto/092109X.jpg", "https://dcuk1cxrnzjkh.cloudfront.net/imagesproducto/092109M.jpg", "https://dcuk1cxrnzjkh.cloudfront.net/imagesproducto/092109L.jpg"],
  "url": "https://www.mifarma.com.pe/producto/complejo-probiotico-50-mil-millones-ufc-capsula/092109",
  "scrapedAt": "2026-11-08T17:01:17.843Z"
}
```

### ⚙️ Input

| Section | What it's for |
| --- | --- |
| **Maximum results** | Always first, caps the whole run. Empty means no limit. |
| **What to scrape** | Search terms, categories and brands. |
| **Filters** | Minimum price (S/), maximum price (S/), minimum discount (%), only on sale, only in stock, prescription, only generics and sort by. |
| **Monitoring** | Only new products and monitor name. |
| **Links** | Links instead of the fields above. Filters are ignored with links. |

#### Input examples

**Every paracetamol and ibuprofen product, cheapest first:**

```json
{
  "searchTerms": ["paracetamol", "ibuprofeno"],
  "sortBy": "priceAsc"
}
```

**Baby products on sale, at least 30% off:**

```json
{
  "categories": ["cuidado-del-bebe"],
  "minDiscount": 30
}
```

**Generic prescription medicines in stock:**

```json
{
  "prescription": "rx",
  "onlyGeneric": true,
  "onlyInStock": true
}
```

**One brand's whole range:**

```json
{
  "brands": ["LA ROCHE POSAY"]
}
```

**New products every day (schedule this run):**

```json
{
  "onlyNew": true,
  "monitorName": "mifarma-new"
}
```

### 🔗 Related scrapers

> - [Inkafarma Scraper](https://apify.com/normdata/inkafarma-scraper): Peru Pharmacy Prices.
> - [8891 Scraper](https://apify.com/normdata/auto8891-scraper): Taiwan Used Cars: Prices, Mileage, Dealers.
> - [Broad Arrow Auctions Scraper](https://apify.com/normdata/broad-arrow-scraper): Classic Car Prices & Results.
> - [Knasta Scraper](https://apify.com/normdata/knasta-scraper): Chile & Peru Price Tracker & Real Deals.

### ❓ FAQ and troubleshooting

#### Is there a Mifarma API? Do I need an API key?

> Mifarma has no public data API for this. This Actor works as a Mifarma API alternative: it reads the public pages and gives you clean JSON, CSV or Excel, with no API key, no login and no code to maintain. You can also call it from your own code with the Apify API, or from an AI agent through MCP.

#### Why do I get only 10 products?

> On the Apify free plan each run saves up to 10 results, so you can try it before paying. Any paid plan removes the limit.

#### Which price do the filters use?

> The lowest price paid: the card price, else the promo price, else the regular price (`bestPrice`).

#### Can I compare it with Inkafarma?

> Yes. Both chains use the same product ids, so join this dataset with our Inkafarma Scraper's on `id`.

#### Few or no results

> Search in Spanish ("vitamina", "protector solar"). A term matches when all its words are in the product, so try fewer words.

#### A sorted run takes longer

> Any sort but the site order reads the whole catalog first (1 to 2 minutes).

#### Is this an official Mifarma tool?

> No. It is independent and not affiliated with Mifarma. It reads only data Mifarma publishes on its public pages, at a moderate pace. Use the data in line with Mifarma's terms and the laws that apply to you.

### 📧 Contact

Need a scraper for a different site, or found something wrong with this one? norm.data.scrapers@gmail.com

# Actor input Schema

## `maxItems` (type: `integer`):

Stop after this many products in total. Leave empty for the whole catalog. The Apify Free plan is always capped at 10.

## `searchTerms` (type: `array`):

Words in the product name, brand, composition or product id, like paracetamol, ensure or 024503. A product matches a term when it has all its words. Products matching any term are kept.

## `categories` (type: `array`):

Departments and their sub-categories. Products in any of them are kept.

## `brands` (type: `array`):

Brand names as the site writes them, like BAYER, LA ROCHE POSAY or ENSURE (upper or lower case).

## `minPrice` (type: `number`):

Lowest price paid (the card or promo price when there is one).

## `maxPrice` (type: `number`):

Highest price paid (the card or promo price when there is one).

## `minDiscount` (type: `integer`):

Only products at least this much off the regular price (promo or card price).

## `onlyOnSale` (type: `boolean`):

Only products with a promo or card price below the regular price.

## `onlyInStock` (type: `boolean`):

Skip sold out products.

## `prescription` (type: `string`):

Over the counter or prescription products.

## `onlyGeneric` (type: `boolean`):

Only generic medicines.

## `sortBy` (type: `string`):

Order of the results. Any sort but the site order reads the whole catalog first (1 to 2 minutes).

## `onlyNew` (type: `boolean`):

Skip products saved by earlier runs with the same monitor name.

## `monitorName` (type: `string`):

Runs with the same name share their history. Use a different name for each schedule.

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

Mifarma product pages, like https://www.mifarma.com.pe/producto/huggies-toallitas-humedas-limpieza-efectiva/097283, or category pages, like https://www.mifarma.com.pe/categoria/salud-1/vitaminas-1. Filters are ignored with links.

## Actor input object example

```json
{
  "maxItems": 10,
  "categories": [
    "salud-1"
  ],
  "onlyOnSale": true,
  "onlyInStock": true
}
```

# 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 = {
    "maxItems": 10,
    "categories": [
        "salud-1"
    ],
    "onlyOnSale": true,
    "onlyInStock": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("normdata/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 = {
    "maxItems": 10,
    "categories": ["salud-1"],
    "onlyOnSale": True,
    "onlyInStock": True,
}

# Run the Actor and wait for it to finish
run = client.actor("normdata/mifarma-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 '{
  "maxItems": 10,
  "categories": [
    "salud-1"
  ],
  "onlyOnSale": true,
  "onlyInStock": true
}' |
apify call normdata/mifarma-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,normdata/mifarma-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/NHqg6rIt1ZzpNUjnh/builds/ntWBtcTjHZCc4fYQb/openapi.json
