# Inkafarma Scraper - Peru Pharmacy Prices (+ Mifarma) (`fabrikit/inkafarma-scraper`) Actor

Scrape Inkafarma and Mifarma, Peru's top pharmacy chains: brand, lab, presentation, category, regular/promo/Oh! card prices, stock, active ingredient, Rx flag. Search, filters or full catalog. From US$3 per 1,000 products.

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

## Pricing

from $3.00 / 1,000 product 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/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

## Inkafarma Scraper — Peru Pharmacy Prices (+ Mifarma)

Scrape the product catalogs of **Inkafarma** (inkafarma.pe) and **Mifarma** (mifarma.com.pe), the two largest pharmacy chains in Peru (same owner), into clean JSON: product name, **brand and laboratory**, presentation, category, **regular price, promo price and the "Tarjeta Oh!" card price**, discount %, availability, **active ingredient / composition**, **prescription (Rx) flag**, sanitary registration number and the sales amount the store publishes for each product.

Search by keyword, filter by category, brand/lab, promo, stock and Rx status, or switch on **full catalog mode** to export every product: about **56,800 Inkafarma** items (12,600 sold by the pharmacy plus 44,200 marketplace listings) and **12,800 Mifarma** items, as of October 2026.

- **Fast and light.** No browser, no login. The Actor uses the stores' public product search API (the one their own website calls), so 2,000 products take a few seconds.
- **Gets past the 1,000-result cap.** The search API stops at 1,000 results per query. Full catalog mode splits the catalog into ranges until each one fits, so you get all of it, deduplicated by SKU.
- **Keys stay up to date.** On every run the Actor reads the current search-API key from the store's own web page, and falls back to the last known-good key if the page can't be read.

### Who uses this data

- **Pharma and consumer-health companies:** check shelf prices, promotions and discount depth for your brands and your competitors' brands in Peru's biggest retail pharmacy chains.
- **Distributors and market-access teams:** track assortment by laboratory, therapeutic category, Rx vs OTC, and generics vs brands.
- **Regulators, researchers and journalists:** monitor medicine prices and availability over time, matched by sanitary registration (DIGEMID / NSO codes).
- **Price-comparison and health apps:** feed product, price and image data into your catalog with stable SKUs and product URLs.

### How to use

1. Choose the **store**: `inkafarma`, `mifarma` or `both`.
2. Type one or more **keywords** (`paracetamol`, `protector solar`, `losartan`, a brand or a SKU), or switch on **Full catalog mode**.
3. Optionally narrow by **categories** (store names such as `Salud`, `Cuidado Facial`, `Vitaminas`), **brands / laboratories** (`Bayer`, `Eucerin`, `Roemmers`), **only in stock**, **only on promotion**, **seller** (the pharmacy itself or marketplace sellers) and **prescription** (Rx only / OTC only).
4. Set **Max products** and click **Start**. Export as JSON, CSV or Excel, or use the API, webhooks, Make, Zapier or Google Sheets.

#### Example inputs

Default (quick test):

```json
{ "store": "inkafarma", "keywords": ["paracetamol"], "maxItems": 50 }
```

Every promotion on prescription drugs in both chains:

```json
{
    "store": "both",
    "fullCatalog": true,
    "onlyOnPromo": true,
    "prescription": "rx_only",
    "maxItems": 20000
}
```

All products from two laboratories in the Salud department, sold by the pharmacy itself:

```json
{
    "store": "inkafarma",
    "categories": ["Salud"],
    "brands": ["Bayer", "Roemmers"],
    "sellerType": "store",
    "maxItems": 5000
}
```

The full catalog of both chains (about 69,600 products):

```json
{ "store": "both", "fullCatalog": true, "maxItems": 70000 }
```

### Output

One item per product and store (the same SKU sold by both chains appears twice, once per store). This is a real item:

```json
{
    "id": "inkafarma:036051",
    "store": "Inkafarma",
    "country": "PE",
    "currency": "PEN",
    "sku": "036051",
    "name": "Gel Limpiador Espumoso CeraVe Foaming Cleanser",
    "brand": "CERAVE",
    "manufacturer": "L’ORÉAL",
    "presentation": "FRASCO 473 ML",
    "categoryPath": "Belleza > Cuidado Facial > Cuidado Facial para tu Rutina Diaria",
    "categories": ["Belleza", "InkaDays", "Cuidado Facial", "Limpieza Facial", "..."],
    "url": "https://inkafarma.pe/producto/gel-limpiador-espumoso-cerave/036051",
    "image": "https://dcuk1cxrnzjkh.cloudfront.net/imagesproducto/036051X.jpg",
    "price": 104.9,
    "promoPrice": 73.4,
    "cardPrice": 69.7,
    "cardPriceLabel": "Tarjeta Oh!",
    "discountPercent": 30.03,
    "inStock": true,
    "salesAmount": 415323.37,
    "salesPeriod": "2026-06-30T19:00:00/2026-09-30T18:59:59",
    "activeIngredient": "Agua Purificada, Cocamidopropil Hidroxisultaína, Glicerina, Niacinamida, Ceramida 1, 3, 6-ll.",
    "rxRequired": false,
    "isGeneric": false,
    "sanitaryRegistration": "NSOC34451-18PE",
    "sellerType": "store",
    "sellerName": "Inkafarma",
    "description": "- Adecuado para pieles normales a grasas.\n- Limpiador refrescante en forma de gel espumoso. ...",
    "searchKeyword": null,
    "scrapedAt": "2026-10-12T17:14:54.242Z"
}
```

| Field | Description |
|---|---|
| `id` | `store:sku`, unique per store, stable across runs |
| `store`, `country`, `currency` | `Inkafarma` or `Mifarma`, `PE`, `PEN` |
| `sku` | The store's product code (the same code is used by both chains for the same product) |
| `name`, `presentation` | Product name and pack (`CAJA 100 UN`, `FRASCO 60 ML`) |
| `brand`, `manufacturer` | Commercial brand and laboratory/company. For medicines the manufacturer is the lab (`ROEMMERS`, `BAYER`) and the brand is the product name (`LOSACOR`, `XARELTO`) |
| `categoryPath`, `categories` | Main department › category › subcategory, plus every grouping the store assigns (including campaigns) |
| `url`, `image` | Product page and main image |
| `price` | Regular (list) price in soles |
| `promoPrice` | Current promotional price, `null` when there is none |
| `cardPrice`, `cardPriceLabel` | Price when paying with the Oh! card, `null` when there is none |
| `discountPercent` | Discount the store shows (promo vs regular) |
| `inStock` | `false` when the store flags the product as sold out |
| `salesAmount`, `salesPeriod` | Online sales amount (PEN) the store publishes for the product and the period it covers. Only the pharmacy's own items have it; marketplace listings don't |
| `activeIngredient` | Composition / active ingredient(s) as published (e.g. `Paracetamol 500mg`) |
| `rxRequired` | `true` = "Presenta Receta" (prescription), `false` = "Venta Libre" (OTC) |
| `isGeneric` | Generic-drug flag from the store |
| `sanitaryRegistration` | DIGEMID registration or NSO cosmetic notification number found in the product text (e.g. `NG-2481`, `NSOC34451-18PE`) |
| `sellerType`, `sellerName` | `store` (sold by the pharmacy) or `marketplace` (third-party seller on inkafarma.pe, with its seller name) |
| `description` | Short product description as plain text |
| `searchKeyword` | The keyword that found the product (`null` in full catalog mode) |
| `scrapedAt` | ISO timestamp |

The run also stores a `SUMMARY` record in the key-value store with the catalog size of each store, the matches per keyword, the number of requests and which search-API key was used (read from the site, or the fallback key).

### Pricing

Pay per event. You only pay for products saved to the dataset:

| Event | Price |
|---|---|
| Actor start | US$0.00005 per run (per GB of memory) |
| `product-result`: one product saved to the dataset | **US$0.003** (US$3 per 1,000 products) |

A full export of both chains (about 69,600 products) costs about US$209. A 50-product keyword search costs about US$0.15.

### FAQ

**Is a proxy needed?** No. The requests go to the public search API that the store's website calls, and that API answers Apify's servers directly. If it ever starts refusing them, the Actor switches to a Peruvian residential proxy on its own.

**Why do Inkafarma and Mifarma show the same SKU?** Both chains belong to the same group and use the same product code. Prices and promotions often differ, so each store's offer is a separate item (`inkafarma:<sku>` and `mifarma:<sku>`).

**Can I get barcodes (EAN/GTIN)?** No. Neither store publishes barcodes in its catalog (the field was empty on all 56,806 Inkafarma products checked). Use `sku`, `name` + `presentation`, or `sanitaryRegistration` to match products.

**Does it include stock per store?** No. The stores only publish whether a product is sold out (`inStock`), not quantities per store.

**What is `salesAmount`?** It's the online sales amount the store publishes in its catalog data for the period in `salesPeriod` (the last quarter when checked in October 2026). It's useful for ranking best-sellers. Treat it as the store's own figure: we don't audit it.

**How fresh is the data?** Each run reads the live catalog, so prices are the ones online at the time of the run. Schedule the Actor daily to build a price history.

**Why did a full export come back smaller than usual?** The store rebuilds its search index from time to time, and while that runs it briefly reports fewer products. The Actor checks the count again at the end and logs a warning (`indexChangedDuringRun` in `SUMMARY`) when it changed. If `catalogSize` in `SUMMARY` is far below the usual size (about 56,800 for Inkafarma), run it again a little later.

**Category or brand names return 0 results?** They must match the store's own names (case-insensitive), e.g. `Cuidado Facial` and not `face care`. Run a keyword search first and copy the values from `categories` or `brand`/`manufacturer`.

### En español

**Scraper de Inkafarma y Mifarma** (Perú): extrae el catálogo de las dos cadenas de farmacias más grandes del país con nombre, marca, laboratorio, presentación, categoría, **precio regular, precio promoción y precio con Tarjeta Oh!**, % de descuento, disponibilidad, principio activo/composición, **condición de venta (con receta / venta libre)**, registro sanitario y monto de ventas publicado por la tienda. Puedes buscar por palabra clave, filtrar por categoría, marca o laboratorio, promociones, stock y receta, o activar el **modo catálogo completo** (unos 56.800 productos de Inkafarma y 12.800 de Mifarma). Funciona sin navegador y sin login. Precio: US$3 por cada 1.000 productos.

# Actor input Schema

## `store` (type: `string`):

Which Peruvian pharmacy chain to scrape. Inkafarma (inkafarma.pe) also lists ~44,000 marketplace items from third-party sellers; Mifarma (mifarma.com.pe) sells only its own catalog. `both` splits the item budget between the two.

## `keywords` (type: `array`):

One search per keyword, exactly like the store's search box: a product (`paracetamol`, `protector solar`), an active ingredient (`ibuprofeno`), a brand (`La Roche-Posay`) or a SKU. Leave empty (or turn on Full catalog) to list everything that matches the filters below.

## `fullCatalog` (type: `boolean`):

Ignore keywords and walk the whole catalog (after the category/brand/stock/promo filters). The store's search caps any query at 1,000 results; this mode splits the catalog into ranges so you can get all ~56,800 Inkafarma and ~12,800 Mifarma products. Set Max products high enough.

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

Optional. Only products in any of these departments, categories or subcategories, using the store's own names (case-insensitive), e.g. `Salud`, `Farmacia`, `Cuidado Facial`, `Vitaminas`, `Mamá y Bebé`, `Analgésicos`.

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

Optional. Only products whose brand or laboratory is any of these (case-insensitive exact name), e.g. `Eucerin`, `Bayer`, `Portugal`, `Genfar`, `Medifarma`, `Procter & Gamble`.

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

Skip products the store flags as sold out.

## `onlyOnPromo` (type: `boolean`):

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

## `sellerType` (type: `string`):

Inkafarma only: `store` = products sold by Inkafarma itself (pharmacy catalog, ~12,600), `marketplace` = third-party sellers on inkafarma.pe. Mifarma has no marketplace.

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

`rx_only` = products the store sells only with a prescription ("Presenta Receta"); `otc_only` = over-the-counter ("Venta Libre").

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

Stop after this many products in total (shared across stores and keywords). For a full Inkafarma + Mifarma catalog use ~70000.

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

Not needed: requests go to the stores' public search API, which answers Apify's servers directly. If it ever refuses them, the Actor switches to a Peruvian residential proxy on its own.

## Actor input object example

```json
{
  "store": "inkafarma",
  "keywords": [
    "paracetamol"
  ],
  "fullCatalog": false,
  "categories": [],
  "brands": [],
  "onlyInStock": false,
  "onlyOnPromo": false,
  "sellerType": "all",
  "prescription": "any",
  "maxItems": 50,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `products` (type: `string`):

All products collected during the run

# 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 = {
    "keywords": [
        "paracetamol"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("fabrikit/inkafarma-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 = {
    "keywords": ["paracetamol"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("fabrikit/inkafarma-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 '{
  "keywords": [
    "paracetamol"
  ],
  "maxItems": 50
}' |
apify call fabrikit/inkafarma-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fabrikit/inkafarma-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/5pWl3ogCl4UasMEDb/builds/8Ivga5m7ZwiUtImnl/openapi.json
