# Unimarc (`scraperschile/unimarc`) Actor

Scraper rápido de Unimarc Chile para extraer productos, precios, stock, ofertas, categorías, imágenes y URLs desde la búsqueda pública de unimarc.cl. Exporta datos estructurados a Apify Dataset, JSON, CSV, Excel y API para monitoreo de precios, retail analytics y catálogos ecommerce.

- **URL**: https://apify.com/scraperschile/unimarc.md
- **Developed by:** [Scrapers Chile](https://apify.com/scraperschile) (community)
- **Categories:** E-commerce, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN 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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

### Unimarc Chile Scraper for product prices, offers, and supermarket catalog data

Extrae productos públicos desde la búsqueda de `unimarc.cl` y expórtalos como datos estructurados en Apify. Este scraper de Unimarc Chile consulta directamente el backend JSON que usa el sitio, por eso es más rápido que un flujo basado en navegador.

Úsalo como API de precios de Unimarc para monitoreo de precios, retail analytics, inteligencia competitiva, comparación de supermercados, seguimiento de ofertas, catálogos ecommerce y reportes recurrentes de productos de supermercado en Chile.

También puede encontrarse como: Unimarc scraper, unimarc.cl scraper, scraper Unimarc Chile, API precios Unimarc, supermercado Unimarc scraper, productos Unimarc Chile, monitoreo de precios Unimarc, scraping supermercado Chile.

### Qué puede hacer este Actor

- Buscar por producto, marca o palabra clave, por ejemplo `leche`, `arroz`, `bebida`, `detergente` o `Colun`.
- Recorrer todas las páginas disponibles o detenerse en el límite que definas.
- Extraer hasta 50 productos por solicitud para mantener buena velocidad.
- Guardar resultados limpios en el Dataset de Apify.
- Exportar a JSON, CSV, Excel, XML o consumir por API.
- Incluir precio actual, precio lista, descuento, stock, oferta, categoría, imagen, URL y JSON crudo del producto.

### Datos que devuelve

Cada fila del dataset puede incluir:

| Campo | Descripción |
| --- | --- |
| `product_id` | Identificador del producto en Unimarc. |
| `item_id` | Identificador del item vendido. |
| `sku` | SKU reportado por Unimarc. |
| `ean` | Código EAN del producto. |
| `name` | Nombre público del producto. |
| `brand` | Marca. |
| `price` | Precio actual. |
| `list_price` | Precio lista o anterior cuando existe. |
| `price_without_discount` | Precio sin descuento. |
| `discount_percentage` | Porcentaje de descuento. |
| `saving` | Texto de ahorro visible. |
| `ppum` | Precio por unidad informado por Unimarc. |
| `available_quantity` | Stock reportado por el backend. |
| `in_offer` | Indica si está en oferta. |
| `measurement_unit` | Unidad de venta. |
| `net_content` | Contenido neto. |
| `categories` | Ruta de categorías. |
| `image` | Imagen principal. |
| `url` | URL pública del producto. |
| `raw_product` | JSON original del producto para trazabilidad. |
| `search_term` | Término usado en la corrida. |
| `scraped_at` | Fecha de extracción. |

### Inicio rápido

1. Abre el Actor en Apify.
2. Escribe tu búsqueda en `term`, por ejemplo `leche`.
3. Si quieres, limita el alcance con `maxPages`.
4. Ejecuta el Actor.
5. Descarga los resultados desde el **Dataset** o consúmelos por API.

Input mínimo:

```json
{
  "term": "leche"
}
````

Buscar varias páginas:

```json
{
  "term": "detergente",
  "maxPages": 3,
  "pageSize": 50
}
```

Solo productos en promoción:

```json
{
  "term": "bebida",
  "promotionsOnly": true,
  "maxPages": 2
}
```

### Referencia de input

| Campo | Tipo | Requerido | Descripción |
| --- | --- | --- | --- |
| `term` | string | sí | Producto, marca o palabra clave a buscar en Unimarc.cl. |
| `maxPages` | integer | no | Máximo de páginas a extraer. Si se omite, recorre todas las disponibles. |
| `pageSize` | integer | no | Productos por página. Máximo validado: `50`. Default: `50`. |
| `delaySecs` | number | no | Pausa entre páginas. Default: `0`. |
| `retries` | integer | no | Reintentos por página. Default: `3`. |
| `timeoutSecs` | integer | no | Timeout para abrir la sesión y completar solicitudes. Default: `45`. |
| `orderBy` | string | no | Ordenamiento opcional aceptado por el backend de Unimarc. |
| `promotionsOnly` | boolean | no | Solicita solo productos promocionados cuando aplica. |
| `proxyConfiguration` | object | no | Por defecto usa proxy residencial de Chile para acceso estable. |

### Casos de uso

| Caso de uso | Cómo ayuda |
| --- | --- |
| Monitoreo de precios Unimarc | Recolecta precios actuales, precios lista y descuentos en el tiempo. |
| Retail analytics en Chile | Construye datasets de surtido, marcas, categorías y ofertas. |
| Comparación entre supermercados | Cruza precios de Unimarc con otros retailers chilenos. |
| Inteligencia competitiva | Detecta cambios de precio, stock y promociones por término o marca. |
| Catálogos ecommerce | Enriquece catálogos internos con nombre, EAN, imagen, URL y categorías. |
| Reportes programados | Ejecuta el Actor por horario y descarga resultados frescos a BI o planillas. |

### Uso desde API

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_API_TOKEN>")
run = client.actor("scraperschile/unimarc").call(
    run_input={"term": "leche", "maxPages": 2}
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["name"], item["price"], item["url"])
```

#### cURL

```bash
curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <APIFY_API_TOKEN>' \
  -d '{"term":"leche","maxPages":2}' \
  'https://api.apify.com/v2/acts/scraperschile~unimarc/runs?waitForFinish=60'
```

### Confiabilidad y límites

Los precios, descuentos, stock y promociones cambian según la información pública entregada por Unimarc en el momento de la corrida. El Actor consulta la búsqueda pública en tiempo real; para ejecuciones grandes, usa límites y programación responsable.

### Uso responsable

Este Actor extrae información pública de catálogo. No usa cuentas de clientes ni recopila datos privados, carritos, pedidos o credenciales. Úsalo de forma responsable y respeta los términos aplicables de Apify y Unimarc.

### FAQ

#### ¿Sirve para monitorear precios de Unimarc?

Sí. Devuelve precio actual, precio lista, descuento y oferta cuando Unimarc los entrega.

#### ¿Puedo descargar CSV o Excel?

Sí. Los resultados quedan en el Dataset de Apify y pueden descargarse como CSV, JSON, Excel, XML o consumirse por API.

#### ¿Extrae todos los productos de Unimarc?

Extrae los resultados de búsqueda para el término que indiques, recorriendo todas las páginas disponibles salvo que limites `maxPages`.

#### ¿Necesita iniciar sesión en Unimarc?

No. Usa la búsqueda pública del sitio y no requiere cuenta de usuario.

# Actor input Schema

## `term` (type: `string`):

Producto, marca o texto a buscar en Unimarc.cl.

## `maxPages` (type: `integer`):

Límite opcional de páginas a extraer. Si se omite, el Actor recorre todas las páginas disponibles.

## `pageSize` (type: `integer`):

Cantidad de productos por solicitud. Unimarc devuelve hasta 50 por página.

## `delaySecs` (type: `number`):

Pausa en segundos entre solicitudes. Por defecto no agrega espera para mantener el scraper rápido.

## `retries` (type: `integer`):

Cantidad de reintentos por solicitud si falla una página.

## `timeoutSecs` (type: `integer`):

Tiempo máximo en segundos para abrir la sesión y para cada solicitud.

## `orderBy` (type: `string`):

Ordenamiento opcional aceptado por Unimarc. Déjalo vacío para usar el orden por defecto.

## `promotionsOnly` (type: `boolean`):

Si está activo, solicita al backend únicamente productos en promoción cuando la búsqueda lo permita.

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

Para estabilidad en Apify, el Actor usa proxy residencial de Chile por defecto. Puedes reemplazarlo con proxyUrls personalizados si lo necesitas.

## Actor input object example

```json
{
  "term": "leche",
  "pageSize": 50,
  "delaySecs": 0,
  "retries": 3,
  "timeoutSecs": 45,
  "orderBy": "",
  "promotionsOnly": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CL"
  }
}
```

# Actor output Schema

## `results` (type: `string`):

Items del dataset por defecto con nombre, marca, precios, oferta, stock y URL.

# 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 = {
    "term": "leche"
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperschile/unimarc").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 = { "term": "leche" }

# Run the Actor and wait for it to finish
run = client.actor("scraperschile/unimarc").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 '{
  "term": "leche"
}' |
apify call scraperschile/unimarc --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Unimarc",
        "description": "Scraper rápido de Unimarc Chile para extraer productos, precios, stock, ofertas, categorías, imágenes y URLs desde la búsqueda pública de unimarc.cl. Exporta datos estructurados a Apify Dataset, JSON, CSV, Excel y API para monitoreo de precios, retail analytics y catálogos ecommerce.",
        "version": "0.1",
        "x-build-id": "o6Ef6ik2p4yBeD5cu"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraperschile~unimarc/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraperschile-unimarc",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scraperschile~unimarc/runs": {
            "post": {
                "operationId": "runs-sync-scraperschile-unimarc",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scraperschile~unimarc/run-sync": {
            "post": {
                "operationId": "run-sync-scraperschile-unimarc",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "term"
                ],
                "properties": {
                    "term": {
                        "title": "Término de búsqueda",
                        "type": "string",
                        "description": "Producto, marca o texto a buscar en Unimarc.cl."
                    },
                    "maxPages": {
                        "title": "Máximo de páginas",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Límite opcional de páginas a extraer. Si se omite, el Actor recorre todas las páginas disponibles."
                    },
                    "pageSize": {
                        "title": "Productos por página",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Cantidad de productos por solicitud. Unimarc devuelve hasta 50 por página.",
                        "default": 50
                    },
                    "delaySecs": {
                        "title": "Pausa entre páginas",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "number",
                        "description": "Pausa en segundos entre solicitudes. Por defecto no agrega espera para mantener el scraper rápido.",
                        "default": 0
                    },
                    "retries": {
                        "title": "Reintentos",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Cantidad de reintentos por solicitud si falla una página.",
                        "default": 3
                    },
                    "timeoutSecs": {
                        "title": "Timeout",
                        "minimum": 5,
                        "maximum": 60,
                        "type": "integer",
                        "description": "Tiempo máximo en segundos para abrir la sesión y para cada solicitud.",
                        "default": 45
                    },
                    "orderBy": {
                        "title": "Ordenamiento",
                        "type": "string",
                        "description": "Ordenamiento opcional aceptado por Unimarc. Déjalo vacío para usar el orden por defecto.",
                        "default": ""
                    },
                    "promotionsOnly": {
                        "title": "Solo promociones",
                        "type": "boolean",
                        "description": "Si está activo, solicita al backend únicamente productos en promoción cuando la búsqueda lo permita.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Para estabilidad en Apify, el Actor usa proxy residencial de Chile por defecto. Puedes reemplazarlo con proxyUrls personalizados si lo necesitas.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ],
                            "apifyProxyCountry": "CL"
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
