# Unimarc Chile Scraper - Precios de Supermercado (`scraperschile/unimarc`) Actor

Scraper de Unimarc Chile para extraer productos, precios, ofertas, stock, marcas, categorías, imágenes y enlaces del supermercado. Exporta resultados a JSON, CSV, Excel o API para comparar canastas, monitorear promociones y analizar el retail chileno.

- **URL**: https://apify.com/scraperschile/unimarc.md
- **Developed by:** [Scrapers Chile](https://apify.com/scraperschile) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 28 total users, 5 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### 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 abre una sesión válida y luego consulta el backend JSON que usa el sitio, por eso evita extraer productos desde el HTML y mantiene la paginación rápida.

Ú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.

El `OUTPUT` informa `status: success` o `status: no_results`. Un dataset vacío solo se acepta cuando el backend de Unimarc confirma que no hay productos disponibles; bloqueos, campos faltantes o cambios del contrato hacen fallar la ejecución.

### 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.
- Limitar exactamente las filas guardadas y cobradas mediante `maxItems`.
- 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
}
```

Limitar la salida a ocho productos:

```json
{
  "term": "leche sin lactosa",
  "maxItems": 8
}
```

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. Por API también acepta `query`, `searchTerm` o `keyword`; debe enviarse al menos uno de esos campos. |
| `maxPages` | integer | no | Máximo de páginas a extraer. Si se omite, recorre todas las disponibles. |
| `maxItems` | integer | no | Máximo exacto de productos disponibles que se guardarán y cobrarán. |
| `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`. |
| `proxyAttempts` | integer | no | Sesiones/proxies distintos a intentar si Unimarc devuelve timeout, 403 o respuesta no JSON. Con el proxy residencial predeterminado se intenta una ruta directa final. Default: `3`. |
| `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. También se aceptan los alias query, searchTerm o keyword al llamar por API.

## `query` (type: `string`):

Alias opcional para term al usar la API. Útil si tu integración envía query en vez de term.

## `searchTerm` (type: `string`):

Alias opcional para term al usar la API.

## `keyword` (type: `string`):

Alias opcional para term al usar la API.

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

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

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

Límite opcional de productos disponibles a guardar y cobrar. Si se omite, se aplica únicamente maxPages.

## `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.

## `proxyAttempts` (type: `integer`):

Cantidad de sesiones/proxies distintos a intentar si Unimarc devuelve timeout, 403 o una respuesta no JSON. Con el proxy residencial predeterminado se agrega un único respaldo directo al final.

## `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",
  "maxPages": 2,
  "pageSize": 50,
  "delaySecs": 0,
  "retries": 3,
  "timeoutSecs": 45,
  "proxyAttempts": 3,
  "orderBy": "",
  "promotionsOnly": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CL"
  }
}
```

# Actor output Schema

## `status` (type: `string`):

success o no_results. Bloqueos y cambios del contrato hacen fallar el run.

## `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",
    "maxPages": 2
};

// 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",
    "maxPages": 2,
}

# 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(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 '{
  "term": "leche",
  "maxPages": 2
}' |
apify call scraperschile/unimarc --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scraperschile/unimarc"
        }
    }
}
```

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/DmYkQqw8S2rVSgnmA/builds/sHt1JDSTuFzsCq00t/openapi.json
