# A Cuenta Chile (`scraperschile/acuenta-cl`) Actor

Scraper rapido de A Cuenta Chile para extraer productos, precios, promociones, disponibilidad, categorias, imagenes y URLs desde acuenta.cl. Usa el HTML Next.js publico con React Flight para monitoreo de precios, retail intelligence y analisis ecommerce.

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

## A Cuenta Scraper - Productos, precios y promociones de A Cuenta.cl

Extrae productos publicos desde [A Cuenta.cl](https://www.acuenta.cl/) a partir de un termino de busqueda. El Actor recorre la paginacion disponible, deduplica productos y entrega un dataset listo para monitoreo de precios, retail intelligence, analisis de ecommerce y comparacion del mercado chileno.

### Que hace este Actor

- Busca productos en A Cuenta Chile por termino, por ejemplo `leche`, `arroz`, `aceite`, `bebida` o `detergente`.
- Usa HTTP directo contra el HTML Next.js publico de `https://www.acuenta.cl/search?name=<termino>`.
- Extrae los datos estructurados embebidos en React Flight dentro de `self.__next_f.push`.
- Recorre paginas con `currentPage`, respeta `maxItems`, `maxPages` y `concurrency`.
- Guarda filas normalizadas en el dataset y un resumen completo en `OUTPUT`.

### Datos que extrae

Cada fila representa un producto encontrado en A Cuenta:

- Termino buscado y fecha de extraccion.
- ID, SKU, EAN y URL publica.
- Nombre, marca, categorias y ruta de categoria.
- Precio A Cuenta, precio anterior y precio por unidad.
- Promociones, tags, disponibilidad, stock y limites de cantidad.
- Imagen principal, galeria de imagenes y `raw_product` para trazabilidad completa.

### Columnas de precio

| Campo | Significado |
| --- | --- |
| `acuenta_precio` | Precio final reportado por A Cuenta en `price`. |
| `acuenta_precio_anterior` | Precio anterior reportado en `previousPrice` cuando existe. |
| `precio_principal` | Precio principal normalizado para comparacion entre retailers. |
| `precio_por_unidad` | Texto de precio por unidad reportado por el sitio. |
| `promotion`, `promotions` | Promociones observadas en el payload publico. |

### Input

```json
{
  "term": "leche",
  "maxItems": 100,
  "maxPages": 2,
  "concurrency": 4,
  "failOnNoResults": false
}
````

#### Parametros principales

- `term`: termino de busqueda requerido.
- `maxItems`: maximo de productos a guardar. Recomendado para pruebas y control de costos.
- `maxPages`: limite opcional de paginas.
- `concurrency`: paginas consultadas en paralelo despues de la primera.
- `failOnNoResults`: si debe fallar cuando no hay resultados.

### Output de ejemplo

```json
{
  "search_term": "leche",
  "sku": "3091",
  "name": "Leche Natural Entera Caja 1 L Lider",
  "brand": "Lider",
  "currency": "CLP",
  "acuenta_precio": 990,
  "acuenta_precio_anterior": 1090,
  "precio_por_unidad": "$990 x L",
  "category": "Leches Liquidas",
  "url": "https://www.acuenta.cl/p/leche-natural-entera-caja-1-l-lider-3091",
  "page": 1,
  "position": 1
}
```

El registro `OUTPUT` incluye `status`, `search_term`, `total_results_reported`, `total_products_scraped`, `pages_scraped`, paginas consultadas, limites, warnings, errores y productos agregados.

### Casos de uso

- Monitoreo de precios de A Cuenta Chile.
- Comparacion de precios entre A Cuenta, Lider, Jumbo, Tottus, Santa Isabel y otros supermercados.
- Alertas de cambios de precio, descuentos y promociones.
- Analisis de categorias de supermercado, marcas propias y disponibilidad.
- Retail intelligence, ecommerce analytics, catalogos, BI y estudios de mercado chileno.

### Buenas practicas

- Para pruebas rapidas usa `maxItems` entre 20 y 100.
- Para ejecuciones completas deja `maxPages` vacio y usa un `maxItems` acorde al presupuesto.
- Si el sitio responde lento, baja `concurrency` a 1 o 2.
- Conserva `raw_product` si necesitas auditar cambios de contrato, promociones o precios.

### Limitaciones conocidas

- A Cuenta puede cambiar el formato de React Flight o su paginacion. Si eso ocurre, el Actor devuelve errores claros y conserva el contexto en `OUTPUT`.
- La disponibilidad regional detallada puede depender de comuna/zona seleccionada por el sitio; este Actor extrae el catalogo publico visible desde la busqueda general.
- El sitio actualmente devuelve paginas de 50 productos desde el HTML publico; el control de alcance se hace con `maxItems` y `maxPages`.

### Pricing

Este Actor usa Pay per event. Cobra USD 0.0003 por cada bloque o fraccion de hasta 100 productos guardados en el dataset mediante el evento primario `results-100`, equivalente a USD 0.003 por mil resultados en bloques completos. El usuario final paga tambien el uso de plataforma de Apify.

### Keywords

A Cuenta scraper, A Cuenta Chile scraper, acuenta.cl scraper, A Cuenta productos, A Cuenta precios, A Cuenta promociones, supermercado Chile scraper, ecommerce Chile, monitoreo de precios, retail intelligence Chile, Apify A Cuenta.

# Actor input Schema

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

Producto, marca o texto a buscar en A Cuenta.cl. Ejemplos reales: leche, arroz, aceite, bebida, detergente.

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

Limite opcional de productos a guardar. Util para pruebas rapidas, presupuestos controlados, smoke tests o monitoreos acotados.

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

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

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

Cantidad de paginas procesadas en paralelo despues de la primera. Baja este valor si A Cuenta responde lento o limita solicitudes.

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

Cantidad de reintentos por pagina si A Cuenta demora, corta o rechaza una solicitud temporalmente.

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

Tiempo maximo en segundos para consultar una pagina HTML de A Cuenta.

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

Si esta activo, la ejecucion falla cuando A Cuenta no devuelve productos. Si esta apagado, guarda OUTPUT con estado no\_results y dataset vacio.

## Actor input object example

```json
{
  "term": "leche",
  "maxItems": 100,
  "concurrency": 4,
  "retries": 3,
  "timeoutSecs": 30,
  "failOnNoResults": false
}
```

# Actor output Schema

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

Items del dataset con nombre, marca, precios A Cuenta, promociones, categoria, URL e imagen.

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

Registro OUTPUT con estado, paginas recorridas, limites aplicados, warnings, errores 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": "leche",
    "maxItems": 100,
    "concurrency": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperschile/acuenta-cl").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",
    "maxItems": 100,
    "concurrency": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("scraperschile/acuenta-cl").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",
  "maxItems": 100,
  "concurrency": 4
}' |
apify call scraperschile/acuenta-cl --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "A Cuenta Chile",
        "description": "Scraper rapido de A Cuenta Chile para extraer productos, precios, promociones, disponibilidad, categorias, imagenes y URLs desde acuenta.cl. Usa el HTML Next.js publico con React Flight para monitoreo de precios, retail intelligence y analisis ecommerce.",
        "version": "0.1",
        "x-build-id": "CKpcWYLgWaHisnvox"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraperschile~acuenta-cl/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraperschile-acuenta-cl",
                "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~acuenta-cl/runs": {
            "post": {
                "operationId": "runs-sync-scraperschile-acuenta-cl",
                "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~acuenta-cl/run-sync": {
            "post": {
                "operationId": "run-sync-scraperschile-acuenta-cl",
                "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 A Cuenta.cl. Ejemplos reales: leche, arroz, aceite, bebida, detergente."
                    },
                    "maxItems": {
                        "title": "Maximo de productos",
                        "minimum": 1,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Limite opcional de productos a guardar. Util para pruebas rapidas, presupuestos controlados, smoke tests o monitoreos acotados.",
                        "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."
                    },
                    "concurrency": {
                        "title": "Concurrencia",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Cantidad de paginas procesadas en paralelo despues de la primera. Baja este valor si A Cuenta responde lento o limita solicitudes.",
                        "default": 4
                    },
                    "retries": {
                        "title": "Reintentos",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Cantidad de reintentos por pagina si A Cuenta demora, corta o rechaza una solicitud temporalmente.",
                        "default": 3
                    },
                    "timeoutSecs": {
                        "title": "Timeout por solicitud",
                        "minimum": 5,
                        "maximum": 120,
                        "type": "integer",
                        "description": "Tiempo maximo en segundos para consultar una pagina HTML de A Cuenta.",
                        "default": 30
                    },
                    "failOnNoResults": {
                        "title": "Fallar si no hay resultados",
                        "type": "boolean",
                        "description": "Si esta activo, la ejecucion falla cuando A Cuenta no devuelve productos. Si esta apagado, guarda OUTPUT con estado no_results y dataset vacio.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
