# Ripley (`scraperschile/ripley`) Actor

Scraper de Ripley Chile para extraer productos, precios, descuentos, marcas, disponibilidad, vendedores, imagenes y URLs desde simple.ripley.cl. Ideal para monitoreo de precios, retail intelligence, comparacion de productos y analisis del mercado chileno.

- **URL**: https://apify.com/scraperschile/ripley.md
- **Developed by:** [Scrapers Chile](https://apify.com/scraperschile) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 0.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

## Ripley Chile Scraper

Extrae productos publicos desde la busqueda de [simple.ripley.cl](https://simple.ripley.cl/) y entrega un dataset listo para monitoreo de precios, retail intelligence, comparacion de productos y analisis del ecommerce chileno.

El Actor recibe un termino de busqueda, consulta la busqueda real de Ripley, recorre la paginacion disponible y guarda cada producto con campos normalizados y datos crudos para trazabilidad.

### Que hace

- Busca productos por termino, marca o categoria comercial.
- Recorre la paginacion completa cuando hay mas resultados.
- Extrae precios actuales, precios normales, precio tarjeta, descuentos y disponibilidad.
- Incluye marca, vendedor, marketplace, categoria, URL, imagen, EAN, modelo y posicion.
- Guarda el producto original serializado en `raw_product` para auditoria y analisis avanzado.
- Usa una sesion Playwright liviana para activar el backend JSON de Ripley cuando Cloudflare bloquea el HTTP directo.

### Casos de uso

- Monitoreo de precios de Ripley Chile por palabra clave.
- Seguimiento de descuentos, precio normal, precio oferta y precio con tarjeta.
- Comparacion de precios contra Falabella, Paris, Lider, Jumbo, Tottus u otros retailers.
- Retail intelligence para categorias como tecnologia, electrohogar, moda, hogar y belleza.
- Construccion de catalogos ecommerce, dashboards de disponibilidad y alertas de cambios de precio.
- Analisis de vendedores marketplace y participacion de marcas en resultados de busqueda.

### Input

Ejemplo minimo:

```json
{
  "term": "televisor"
}
````

Ejemplo recomendado para prueba rapida:

```json
{
  "term": "notebook",
  "maxItems": 100,
  "concurrency": 4
}
```

Ejemplo con paginacion acotada:

```json
{
  "term": "zapatillas mujer",
  "maxPages": 3,
  "pageSize": 48,
  "sort": "relevance_desc"
}
```

Campos disponibles:

- `term`: termino de busqueda principal.
- `maxItems`: limite de productos a guardar.
- `maxPages`: limite de paginas a recorrer.
- `pageSize`: productos por pagina. Ripley fija este valor en 48.
- `concurrency`: paginas procesadas en paralelo. Bajar a 1 o 2 si el sitio bloquea.
- `sort`: ordenamiento. Por defecto `relevance_desc`.
- `retries`: reintentos por pagina.
- `timeoutSecs`: timeout por pagina.
- `failOnNoResults`: si esta activo, falla cuando no hay resultados.
- `proxyConfiguration`: proxy opcional. En Apify se usa Residential CL por defecto.

### Output

Cada item del dataset representa un producto de Ripley:

```json
{
  "product_id": "2000406105451P",
  "name": "SMART TV SAMSUNG QLED 4K UHD 50 Q7FA VISION AI",
  "brand": "SAMSUNG",
  "price": 279990,
  "normal_price": 529990,
  "card_price": null,
  "discount_amount": 250000,
  "discount_percentage": 47,
  "currency": "CLP",
  "is_available": true,
  "availability": "available",
  "category": "Televisor",
  "category_code": "R040302000000",
  "seller_name": "Shop Ecsa",
  "is_marketplace": false,
  "url": "https://simple.ripley.cl/smart-tv-samsung-qled-4k-uhd-50-q7fa-vision-ai-2000406105451p",
  "image": "https://rimage.ripley.cl/home.ripley/Attachment/WOP/1/2000406105451/full_image-2000406105451",
  "raw_product": "{...}"
}
```

Tambien se guarda un registro `OUTPUT` en Key-Value Store con:

- estado de la ejecucion;
- paginas recorridas;
- total reportado por Ripley;
- metadata de busqueda, categorias y filtros;
- productos crudos agregados.

### Como funciona

Ripley expone los resultados mediante `POST /api/v2/search`. El endpoint directo desde HTTP desnudo puede ser bloqueado por Cloudflare, por eso el Actor abre paginas de busqueda reales y captura el JSON que el propio sitio genera. No extrae datos desde tarjetas HTML: el parseo principal viene del contrato JSON de Ripley.

Este enfoque mantiene el scraper mas estable que un DOM scraper tradicional y permite paginar mas alla de la primera pagina.

### Limitaciones conocidas

- Ripley puede ajustar su proteccion Cloudflare, sus nombres de campos o su contrato `/api/v2/search`.
- Algunos productos no informan categoria descriptiva; en esos casos se conserva `category_code`, `ripley_category_id` y el producto crudo.
- La disponibilidad puede cambiar por ubicacion, stock, despacho o reglas internas de Ripley.
- Para extracciones grandes conviene mantener `concurrency` entre 2 y 4 y usar proxy residencial chileno.

### Beneficios

- Dataset listo para BI, hojas de calculo, comparadores y alertas.
- Campos normalizados para analisis rapido.
- Datos crudos para auditoria, debugging y enriquecimiento posterior.
- Pensado para precios y productos del mercado chileno.
- Configurado para Apify con schema, README, metadata SEO y monetizacion por resultado.

### Uso responsable

Este Actor trabaja con informacion publica de productos. No inicia sesion, no recolecta credenciales y no intenta acceder a datos privados. Ajusta limites y concurrencia segun el volumen necesario.

# Actor input Schema

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

Producto, marca o texto a buscar en Ripley.cl. Ejemplos: televisor, notebook, zapatillas mujer, perfume.

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

Limite opcional de productos a guardar. Util para pruebas rapidas o ejecuciones controladas.

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

Limite opcional de paginas a recorrer. Si se omite, el Actor recorre toda la paginacion disponible o hasta alcanzar maxItems.

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

Cantidad de productos por pagina del flujo publico de Ripley. El sitio fija este valor en 48.

## `concurrency` (type: `integer`):

Cantidad de paginas de Ripley procesadas en paralelo. Baja este valor si el sitio bloquea la extraccion.

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

Ordenamiento aceptado por Ripley. Por defecto usa relevance\_desc.

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

Cantidad de reintentos por pagina si Ripley demora, corta o bloquea una solicitud.

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

Tiempo maximo en segundos para que cada pagina entregue el JSON de busqueda.

## `failOnNoResults` (type: `boolean`):

Si esta activo, la ejecucion falla cuando Ripley no devuelve productos. Si esta apagado, guarda OUTPUT con estado no\_results.

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

Configuracion opcional de proxy. En Apify se usa Residential CL por defecto para mejorar estabilidad contra bloqueos.

## Actor input object example

```json
{
  "term": "televisor",
  "maxItems": 100,
  "pageSize": 48,
  "concurrency": 4,
  "sort": "relevance_desc",
  "retries": 3,
  "timeoutSecs": 45,
  "failOnNoResults": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CL"
  }
}
```

# Actor output Schema

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

Items del dataset por defecto con nombre, marca, precios, descuento, disponibilidad, vendedor, URL e imagen.

## `summary` (type: `string`):

Registro OUTPUT con estado, paginas recorridas, metadata de busqueda y productos crudos agregados.

# 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": "televisor",
    "maxItems": 100,
    "concurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "CL"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperschile/ripley").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": "televisor",
    "maxItems": 100,
    "concurrency": 4,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "CL",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scraperschile/ripley").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": "televisor",
  "maxItems": 100,
  "concurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CL"
  }
}' |
apify call scraperschile/ripley --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Ripley",
        "description": "Scraper de Ripley Chile para extraer productos, precios, descuentos, marcas, disponibilidad, vendedores, imagenes y URLs desde simple.ripley.cl. Ideal para monitoreo de precios, retail intelligence, comparacion de productos y analisis del mercado chileno.",
        "version": "0.1",
        "x-build-id": "hVFzcRufbBsYQk5xm"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraperschile~ripley/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraperschile-ripley",
                "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~ripley/runs": {
            "post": {
                "operationId": "runs-sync-scraperschile-ripley",
                "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~ripley/run-sync": {
            "post": {
                "operationId": "run-sync-scraperschile-ripley",
                "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": "Termino de busqueda",
                        "type": "string",
                        "description": "Producto, marca o texto a buscar en Ripley.cl. Ejemplos: televisor, notebook, zapatillas mujer, perfume."
                    },
                    "maxItems": {
                        "title": "Maximo de productos",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Limite opcional de productos a guardar. Util para pruebas rapidas o ejecuciones controladas.",
                        "default": 100
                    },
                    "maxPages": {
                        "title": "Maximo de paginas",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Limite opcional de paginas a recorrer. Si se omite, el Actor recorre toda la paginacion disponible o hasta alcanzar maxItems."
                    },
                    "pageSize": {
                        "title": "Productos por pagina",
                        "minimum": 48,
                        "maximum": 48,
                        "type": "integer",
                        "description": "Cantidad de productos por pagina del flujo publico de Ripley. El sitio fija este valor en 48.",
                        "default": 48
                    },
                    "concurrency": {
                        "title": "Concurrencia",
                        "minimum": 1,
                        "maximum": 6,
                        "type": "integer",
                        "description": "Cantidad de paginas de Ripley procesadas en paralelo. Baja este valor si el sitio bloquea la extraccion.",
                        "default": 4
                    },
                    "sort": {
                        "title": "Ordenamiento",
                        "enum": [
                            "relevance_desc",
                            "price_asc",
                            "price_desc",
                            "newest_desc"
                        ],
                        "type": "string",
                        "description": "Ordenamiento aceptado por Ripley. Por defecto usa relevance_desc.",
                        "default": "relevance_desc"
                    },
                    "retries": {
                        "title": "Reintentos",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Cantidad de reintentos por pagina si Ripley demora, corta o bloquea una solicitud.",
                        "default": 3
                    },
                    "timeoutSecs": {
                        "title": "Timeout",
                        "minimum": 10,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Tiempo maximo en segundos para que cada pagina entregue el JSON de busqueda.",
                        "default": 45
                    },
                    "failOnNoResults": {
                        "title": "Fallar si no hay resultados",
                        "type": "boolean",
                        "description": "Si esta activo, la ejecucion falla cuando Ripley no devuelve productos. Si esta apagado, guarda OUTPUT con estado no_results.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy",
                        "type": "object",
                        "description": "Configuracion opcional de proxy. En Apify se usa Residential CL por defecto para mejorar estabilidad contra bloqueos."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
