# PCFactory (`scraperschile/pcfactory`) Actor

Scraper rapido de PCFactory Chile para extraer productos, precios efectivo/transferencia, normal, referencia y BancoEstado, stock, categorias, marcas, imagenes y URLs desde pcfactory.cl. Usa el backend JSON publico del sitio para monitoreo de precios, retail intelligence y analisis ecommerce.

- **URL**: https://apify.com/scraperschile/pcfactory.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

from $0.20 / 1,000 producto extraidos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

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

## PCFactory Scraper

Extrae productos publicos desde [PCFactory.cl](https://www.pcfactory.cl/) usando el mismo backend JSON que alimenta el listado de busqueda del sitio. El Actor esta pensado para monitoreo de precios, inteligencia retail, comparacion de catalogo y seguimiento de disponibilidad en Chile.

### Que datos extrae

- ID/SKU de producto.
- Nombre, marca y categoria.
- `pcfactory_precio_efectivo`, `pcfactory_precio_normal`, `pcfactory_precio_referencia` y `pcfactory_precio_banco_estado`.
- `precio_principal` y porcentaje de descuento calculado.
- Stock reportado por PCFactory.
- URL publica del producto e imagen principal.
- Indicadores `digital`, `outlet`, promocion y disponibilidad.
- Payload crudo `raw_product` para trazabilidad.

### Fuente usada

El sitio renderiza el catalogo mediante un widget Modyo/Vue. Este Actor consulta directamente:

```text
GET https://api.pcfactory.cl/pcfactory-services-catalogo/v1/catalogo/productos
GET https://api.pcfactory.cl/pcfactory-services-catalogo/v1/catalogo/productos/query
GET https://api.pcfactory.cl/api-dex-catalog/v1/catalog/category/PCF
````

La paginacion del backend es cero-basada (`page=0`, `page=1`, etc.) y el limite efectivo observado por solicitud es de 48 productos.

### Inputs principales

- `term`: busqueda de producto, marca o texto libre. Ejemplos: `notebook`, `monitor`, `ssd`.
- `startUrl`: URL de busqueda o categoria. Si contiene `?search=`, el Actor usa ese termino cuando `term` esta vacio.
- `categoryUrl`: URL de categoria de PCFactory. El Actor la resuelve contra el arbol de categorias.
- `categoryIds`: IDs de categoria para listar una categoria directamente.
- `maxItems`, `maxPages`, `pageSize`: limites para controlar costo y duracion.
- `sort`: `recommended`, `price_asc` o `price_desc`.
- `failOnNoResults`: permite fallar la corrida si no se obtienen productos.

### Ejemplo de input

```json
{
  "term": "notebook",
  "maxItems": 100,
  "maxPages": 3,
  "pageSize": 48,
  "sort": "recommended",
  "concurrency": 4,
  "failOnNoResults": false
}
```

### Ejemplo de output

```json
{
  "search_term": "notebook",
  "product_id": "56365",
  "sku": "56365",
  "name": "Notebook Ideapad Slim 3 Intel Core i5-13420H 8GB RAM 512GB SSD 15.3\" Touch Windows 11 Home 83K1004WCL",
  "brand": "Lenovo",
  "currency": "CLP",
  "pcfactory_precio_efectivo": 629990,
  "pcfactory_precio_normal": 649490,
  "pcfactory_precio_referencia": 869990,
  "pcfactory_precio_banco_estado": null,
  "precio_principal": 629990,
  "discount_percentage": 27.59,
  "stock_text": "+100",
  "category": "Notebooks",
  "url": "https://www.pcfactory.cl/producto/56365-lenovo-notebook-ideapad-slim-3-intel-core-i5-13420h-8gb-ram-512gb-ssd-15-3-touch-windows-11-home-83k1004wcl",
  "image": "https://assets.pcfactory.cl/public/foto/56365/1_200.jpg"
}
```

### Casos de uso

- Monitoreo de precios de notebooks, componentes, celulares y accesorios.
- Comparacion de catalogo contra otros retailers chilenos.
- Seguimiento de stock por busqueda o categoria.
- Auditoria de promociones y precios de referencia.

### Buenas practicas

- Usa `maxItems` y `maxPages` para corridas de prueba.
- Mantiene `pageSize` en 48 para aprovechar el limite real del backend.
- Usa `price_asc` o `price_desc` solo cuando necesites ordenar por precio.
- Guarda `raw_product` si necesitas auditar cambios del contrato de PCFactory.

### Limitaciones conocidas

- El stock se entrega como texto agregado, por ejemplo `+100`; el Actor infiere un minimo numerico cuando puede.
- Los precios dependen del contrato publico actual de PCFactory y pueden cambiar sin aviso.
- El Actor no agrega productos al carro ni consulta informacion privada de usuario.

### Keywords

PCFactory scraper, PCFactory Chile API, precios PCFactory, productos PCFactory, stock PCFactory, ecommerce Chile, monitoreo de precios Chile, retail intelligence Chile.

# Actor input Schema

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

Producto, marca o texto a buscar en PCFactory.cl. Ejemplos reales: notebook, monitor, teclado mecanico, ssd, iphone.

## `startUrl` (type: `string`):

URL opcional de busqueda o categoria de PCFactory. Si contiene ?search=, el Actor extrae ese termino cuando term esta vacio.

## `categoryUrl` (type: `string`):

URL opcional de categoria, por ejemplo https://www.pcfactory.cl/categoria/computadores-y-tablets/notebooks/notebooks. El Actor la resuelve contra el arbol oficial de categorias.

## `categoryIds` (type: `array`):

IDs de categorias PCFactory para listar una categoria sin resolver categoryUrl. Ejemplo: 425 para Notebooks.

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

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

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

Tamano de pagina solicitado al backend de PCFactory. El contrato actual devuelve hasta 48 productos por solicitud.

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

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

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

Ordenamiento compatible con el backend publico de PCFactory.

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

Cantidad de paginas JSON procesadas en paralelo. Baja este valor si PCFactory responde lento o limita solicitudes.

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

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

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

Tiempo maximo en segundos para consultar el endpoint JSON de PCFactory.

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

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

## Actor input object example

```json
{
  "term": "notebook",
  "startUrl": "https://www.pcfactory.cl/busqueda-avanzada?search=notebook",
  "maxItems": 100,
  "pageSize": 48,
  "sort": "recommended",
  "concurrency": 4,
  "retries": 3,
  "timeoutSecs": 30,
  "failOnNoResults": false
}
```

# Actor output Schema

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

Items del dataset con nombre, marca, precios PCFactory, descuento, disponibilidad, 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": "notebook",
    "startUrl": "https://www.pcfactory.cl/busqueda-avanzada?search=notebook",
    "maxItems": 100,
    "pageSize": 48,
    "concurrency": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperschile/pcfactory").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": "notebook",
    "startUrl": "https://www.pcfactory.cl/busqueda-avanzada?search=notebook",
    "maxItems": 100,
    "pageSize": 48,
    "concurrency": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("scraperschile/pcfactory").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": "notebook",
  "startUrl": "https://www.pcfactory.cl/busqueda-avanzada?search=notebook",
  "maxItems": 100,
  "pageSize": 48,
  "concurrency": 4
}' |
apify call scraperschile/pcfactory --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "PCFactory",
        "description": "Scraper rapido de PCFactory Chile para extraer productos, precios efectivo/transferencia, normal, referencia y BancoEstado, stock, categorias, marcas, imagenes y URLs desde pcfactory.cl. Usa el backend JSON publico del sitio para monitoreo de precios, retail intelligence y analisis ecommerce.",
        "version": "0.1",
        "x-build-id": "tdztdGzNAeTJWiw3M"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scraperschile~pcfactory/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scraperschile-pcfactory",
                "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~pcfactory/runs": {
            "post": {
                "operationId": "runs-sync-scraperschile-pcfactory",
                "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~pcfactory/run-sync": {
            "post": {
                "operationId": "run-sync-scraperschile-pcfactory",
                "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",
                "properties": {
                    "term": {
                        "title": "Termino de busqueda",
                        "type": "string",
                        "description": "Producto, marca o texto a buscar en PCFactory.cl. Ejemplos reales: notebook, monitor, teclado mecanico, ssd, iphone."
                    },
                    "startUrl": {
                        "title": "URL inicial",
                        "type": "string",
                        "description": "URL opcional de busqueda o categoria de PCFactory. Si contiene ?search=, el Actor extrae ese termino cuando term esta vacio."
                    },
                    "categoryUrl": {
                        "title": "URL de categoria",
                        "type": "string",
                        "description": "URL opcional de categoria, por ejemplo https://www.pcfactory.cl/categoria/computadores-y-tablets/notebooks/notebooks. El Actor la resuelve contra el arbol oficial de categorias."
                    },
                    "categoryIds": {
                        "title": "IDs de categoria",
                        "type": "array",
                        "description": "IDs de categorias PCFactory para listar una categoria sin resolver categoryUrl. Ejemplo: 425 para Notebooks.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "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
                    },
                    "pageSize": {
                        "title": "Productos por pagina",
                        "minimum": 1,
                        "maximum": 48,
                        "type": "integer",
                        "description": "Tamano de pagina solicitado al backend de PCFactory. El contrato actual devuelve hasta 48 productos por solicitud.",
                        "default": 48
                    },
                    "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."
                    },
                    "sort": {
                        "title": "Ordenamiento",
                        "enum": [
                            "recommended",
                            "price_asc",
                            "price_desc"
                        ],
                        "type": "string",
                        "description": "Ordenamiento compatible con el backend publico de PCFactory.",
                        "default": "recommended"
                    },
                    "concurrency": {
                        "title": "Concurrencia",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Cantidad de paginas JSON procesadas en paralelo. Baja este valor si PCFactory responde lento o limita solicitudes.",
                        "default": 4
                    },
                    "retries": {
                        "title": "Reintentos",
                        "minimum": 1,
                        "maximum": 8,
                        "type": "integer",
                        "description": "Cantidad de reintentos por pagina si PCFactory 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 el endpoint JSON de PCFactory.",
                        "default": 30
                    },
                    "failOnNoResults": {
                        "title": "Fallar si no hay resultados",
                        "type": "boolean",
                        "description": "Si esta activo, la ejecucion falla cuando PCFactory 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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
