# Chileautos Scraper - Autos Nuevos y Usados (`scraperschile/chileautos`) Actor

Scraper de Chileautos para obtener avisos de vehículos nuevos y usados con marca, modelo, año, precio, kilometraje, región, vendedor, imágenes y enlaces. Exporta a JSON, CSV, Excel o API para comparar stock y analizar el mercado automotor de Chile.

- **URL**: https://apify.com/scraperschile/chileautos.md
- **Developed by:** [Scrapers Chile](https://apify.com/scraperschile) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Stats:** 16 total users, 4 monthly users, 97.1% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 results

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

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Chileautos Scraper - Autos usados y nuevos en Chile

Extrae avisos publicos de Chileautos.cl para recolectar precios, inventario y datos de mercado de autos usados y nuevos en Chile. El actor permite partir desde una URL exacta de resultados o construir la busqueda con filtros como tipo de vehiculo, condicion, marca, modelo, region, ciudad/comuna, carroceria, vendedor, ano, precio y kilometraje.

Es util para monitoreo de precios, analisis de inventario automotriz, comparacion de concesionarios, seguimiento de marcas y modelos, investigacion de mercado y enriquecimiento de catalogos. No esta afiliado a Chileautos.

El `OUTPUT` informa `status: success` o `status: no_results`. El actor solo acepta un dataset vacío cuando Chileautos entrega un marcador explícito de cero avisos; una respuesta HTTP 200 sin avisos ni ese marcador hace fallar la ejecución.

### Que datos extrae

- ID del aviso y URL del detalle.
- Titulo, marca, modelo, version y ano.
- Precio publicado y moneda.
- Kilometraje, transmision, combustible, carroceria y condicion.
- Region, ciudad/comuna y ubicacion del aviso.
- Tipo de vendedor, nombre del vendedor y datos comerciales disponibles.
- Imagen principal, pagina de resultados y posicion del aviso.

### Inputs principales

- `startUrl`: URL exacta de resultados. Si se informa, el actor no construye una URL desde filtros.
- `vehicleType`: `autos`, `motos` o `camiones`.
- `condition`: `usado`, `nuevo` o `todos`.
- `make` / `model`: marca y modelo.
- `region` / `city`: ubicacion.
- `bodyType`: carroceria.
- `sellerType`: `particular`, `automotora` o `todos`.
- `yearFrom`, `yearTo`, `priceFrom`, `priceTo`, `kmFrom`, `kmTo`: filtros de rango.
- `maxPages`: paginas a recorrer.
- `unblockerProxyUrl`: opcional. Solo se usa como fallback si la ruta de datos de Chileautos no responde y el actor necesita probar el navegador.

### Ejemplo de input

```json
{
  "vehicleType": "autos",
  "condition": "usado",
  "make": "toyota",
  "model": "corolla",
  "region": "metropolitana de santiago",
  "maxPages": 2
}
```

### Output

El dataset incluye campos relevantes para analisis automotriz: ID del aviso, titulo, marca, modelo, ano, precio, kilometraje, ubicacion, vendedor, condicion, combustible, transmision, carroceria, imagen, URL, pagina y posicion.

### Nota operativa

El actor usa primero la ruta estructurada de busqueda de Chileautos, que evita abrir la pagina protegida por DataDome y permite entregar resultados en Apify sin configurar proxy. Si esa ruta cambia o falla, el actor mantiene un fallback con navegador/proxy y guarda `BLOCKED_PAGE`, `BLOCKED_PAGE_HTML` y `BLOCKED_PAGE_SCREENSHOT` cuando Chileautos devuelve un bloqueo.

# Actor input Schema

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

Opcional. URL de resultados de Chileautos. Si se informa, tiene prioridad sobre todos los filtros.

## `vehicleType` (type: `string`):

Categoria principal de vehiculo a buscar.

## `condition` (type: `string`):

Selecciona si quieres vehiculos usados, nuevos o ambos.

## `make` (type: `string`):

Ej: toyota, chevrolet, suzuki.

## `model` (type: `string`):

Opcional. Ej: corolla, swift.

## `region` (type: `string`):

Opcional. Ej: metropolitana de santiago, valparaiso, biobio.

## `city` (type: `string`):

Opcional. Ej: santiago, las condes, concepcion.

## `bodyType` (type: `string`):

Tipo de carroceria del vehiculo.

## `sellerType` (type: `string`):

Tipo de vendedor publicado en Chileautos.

## `yearFrom` (type: `integer`):

Ano minimo del vehiculo.

## `yearTo` (type: `integer`):

Ano maximo del vehiculo.

## `priceFrom` (type: `integer`):

Precio minimo en pesos chilenos.

## `priceTo` (type: `integer`):

Precio maximo en pesos chilenos.

## `kmFrom` (type: `integer`):

Kilometraje minimo.

## `kmTo` (type: `integer`):

Kilometraje maximo.

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

Limite de paginas a extraer.

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

Pausa en segundos entre paginas para reducir carga sobre el sitio.

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

Tiempo maximo en segundos para esperar cada pagina.

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

Cantidad de sesiones proxy distintas a probar solo si la ruta de datos falla y el actor debe usar el fallback con navegador.

## `unblockerProxyUrl` (type: `string`):

Opcional. Solo se usa como fallback si la ruta de datos de Chileautos no responde. Puede usar placeholders {session} o {attempt}. Tambien se puede definir como secret env CHILEAUTOS\_UNBLOCKER\_PROXY\_URL.

## `blockHeavyResources` (type: `boolean`):

Bloquea imagenes, media y fonts durante navegacion para reducir costo.

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

Fallback. Normalmente no se necesita proxy porque el actor usa primero la ruta estructurada de busqueda.

## Actor input object example

```json
{
  "vehicleType": "autos",
  "condition": "usado",
  "bodyType": "",
  "sellerType": "todos",
  "maxPages": 1,
  "delaySecs": 1,
  "timeoutSecs": 45,
  "proxyAttempts": 3,
  "blockHeavyResources": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CL"
  }
}
```

# Actor output Schema

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

success o no\_results. Bloqueos y cambios del contrato hacen fallar el run.

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

Items del dataset por defecto con precio, kilometraje, ubicacion y URL del aviso.

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

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

# Run the Actor and wait for it to finish
run = client.actor("scraperschile/chileautos").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "unblockerProxyUrl": ""
}' |
apify call scraperschile/chileautos --silent --output-dataset

```

## MCP server setup

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

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/JJBSgaBt03KYOY6M6/builds/FwUkb9FchTlCSRAI5/openapi.json
