# TOC TOC Chile API - Propiedades Venta y Arriendo (`scraperschile/toctoc`) Actor

API y scraper de TOC TOC Chile para extraer propiedades en venta y arriendo con precios UF/CLP, comuna, dormitorios, baños, superficie, imágenes y enlaces. Exporta información para leads, comparables, seguimiento de oferta y análisis inmobiliario.

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

## Pricing

from $5.00 / 1,000 aviso 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/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

## TOC TOC Chile Scraper API

Use this **TOC TOC scraper API** to extract public Chile real estate listings from [toctoc.com](https://www.toctoc.com/). The Actor exports structured property data for apartments and houses for sale or rent, including UF/CLP prices, locations, bedrooms, bathrooms, surface details, images, listing URLs, and paginated search results.

Use it to collect listings from TOC TOC by location, property type, and operation:

- departamentos en venta en Santiago
- casas en arriendo en Las Condes
- departamentos en arriendo en Providencia
- casas en venta en Nunoa
- Chile real estate listings, property prices, and housing market data

Also known as: TOCTOC scraper, TOC TOC API, Chile property scraper, Chile real estate scraper, departamentos Chile API, casas en arriendo Chile, propiedades en venta Chile, Apify real estate scraper Chile.

### What does this TOC TOC scraper do?

The Actor reads TOC TOC's public SEO result pages and the JSON pagination endpoint used by those pages, then saves each public property listing to the Apify Dataset. Results can be downloaded as JSON, CSV, Excel, XML, RSS, or accessed through the Apify API.

It supports:

- Apartments, houses, and mixed house/apartment searches.
- Properties for sale and rent.
- Location-based searches by commune, `commune, region`, region slug, official Chilean region name, or TOC TOC search URL.
- Multi-page extraction with up to 20 listings per TOC TOC SEO page.
- JSON extraction from `__NEXT_DATA__` and `/gw-lista-seo/propiedades`, with the older browser flow kept as fallback.
- Residential Chile proxy configuration for more stable cloud runs.
- Raw TOC TOC property objects in `raw_property` for traceability.

### What data can you extract?

Each dataset item can include:

| Field | Description |
| --- | --- |
| `listing_id` | TOC TOC property identifier. |
| `title` | Public listing title or project name. |
| `price_text` | Price normalized as readable text. |
| `price_uf_min`, `price_uf_max` | UF price range when available. |
| `price_clp_min`, `price_clp_max` | CLP price range when available. |
| `operation` | Sale or rent. |
| `property_type` | Apartment, house, or other property type returned by TOC TOC. |
| `status` | New or used when it can be inferred. |
| `commune`, `region`, `location` | Published location fields. |
| `bedrooms_min`, `bedrooms_max` | Bedroom range. |
| `bathrooms_min`, `bathrooms_max` | Bathroom range. |
| `usable_area_m2_min`, `usable_area_m2_max` | Usable area range. |
| `total_area_m2_min`, `total_area_m2_max` | Total area range. |
| `latitude`, `longitude` | Coordinates when TOC TOC returns them. |
| `image_url` | Public image URL when available. |
| `url` | Public listing URL. |
| `page`, `position` | Result position metadata. |
| `raw_property` | Original property object returned by TOC TOC. |

Example output:

```json
{
  "listing_id": "3141513",
  "title": "Diagonal Vicuna",
  "url": "https://www.toctoc.com/propiedades/compranuevo/departamento/santiago/diagonal-vicuna/3141513",
  "operation": "Venta",
  "property_type": "Departamento",
  "status": "Nuevo",
  "location": "Santiago",
  "price_text": "UF 3.109",
  "price_uf_min": 3109,
  "bedrooms_min": 1,
  "bedrooms_max": 2,
  "bathrooms_min": 1,
  "bathrooms_max": 2,
  "usable_area_m2_min": 31,
  "usable_area_m2_max": 59.07
}
```

### Input

For most runs, use:

- `location`: normal location text or a TOC TOC search URL, such as `Santiago`, `Santiago, Region Metropolitana`, `Las Condes`, `Vina del Mar, Region de Valparaiso`, `Region Metropolitana de Santiago`, or `https://www.toctoc.com/venta/departamento/metropolitana/santiago`.
- `propertyType`: `departamento`, `casa`, or `casa-departamento`; API aliases such as `apartamento`, `dpto`, `house`, and `casa-o-departamento` are also accepted.
- `operation`: `comprar` for sale listings or `arrendar` for rental listings; API aliases such as `venta`, `alquiler`, and `renta` are also accepted.
- `maxItems`: maximum properties to save.
- `maxPages`: maximum TOC TOC SEO pages, where each page contains up to 20 results.

```json
{
  "location": "Santiago",
  "propertyType": "departamento",
  "operation": "comprar",
  "maxItems": 100,
  "maxPages": 4
}
```

Advanced users can pass `locationId` if they already know the TOC TOC polygon ID. The current SEO extraction path does not require it, but it is still accepted for fallback compatibility.

### Typical use cases

| Use case | How this Actor helps |
| --- | --- |
| Real estate market research in Chile | Track asking prices, UF/CLP values, locations, property types, and visible features across communes. |
| Lead generation | Build structured datasets of public property ads for brokerage, sales, and real estate prospecting workflows. |
| Competitor monitoring | Monitor listings by neighborhood, property type, operation, project, seller, or commune. |
| Pricing intelligence | Compare sale and rental prices, UF ranges, and visible property attributes. |
| Dashboards and BI | Export JSON, CSV, Excel, XML, or API data into spreadsheets, warehouses, BI dashboards, and internal reports. |

### Reliability notes

TOC TOC has changed its older search contract, so this Actor now prioritizes the public SEO pages and their JSON pagination endpoint. If that source is unavailable, it can fall back to the older browser-based flow. It does not log in, bypass private areas, collect credentials, or access non-public data.

For best results:

- Keep `maxItems` reasonable.
- Use Chile residential proxies in Apify cloud.
- Prefer commune names in `location` for narrow searches, `commune, region` when the commune may be ambiguous, or official region names for broad regional inventory.
- Use `locationId` only when you know the exact TOC TOC polygon ID and need fallback compatibility.

### Responsible use

This Actor only extracts public listing information visible on TOC TOC search pages. Use the data responsibly and in accordance with applicable laws, privacy rules, TOC TOC terms, and Apify's policies. The Actor is not affiliated with TOC TOC or any real estate broker.

# Actor input Schema

## `location` (type: `string`):

Comuna, ciudad, barrio, region, nombre oficial de region o URL de busqueda de TOC TOC. Ejemplos: Santiago, Las Condes, Providencia, Nunoa, Vina del Mar, Santiago, Region Metropolitana, Region Metropolitana de Santiago, Region de Valparaiso.

## `propertyType` (type: `string`):

Tipo de propiedad a buscar en TOC TOC. Tambien acepta alias de API como apartamento, dpto, house o casa-o-departamento.

## `operation` (type: `string`):

Elige si quieres propiedades en venta o arriendo. Tambien acepta alias de API como venta, alquiler o renta.

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

Limite de propiedades a guardar. Util para pruebas rapidas, presupuestos controlados o monitoreos acotados.

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

Limite opcional de paginas SEO de TOC TOC. Cada pagina devuelve hasta 20 resultados.

## `locationId` (type: `integer`):

Opcional. ID de poligono de TOC TOC si ya lo conoces. Se conserva para compatibilidad con el fallback browser antiguo; la extraccion SEO normal no lo necesita.

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

Segundos maximos para cargar la pagina publica de resultados y capturar el JSON.

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

Pausa en segundos entre paginas de resultados.

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

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

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

El Actor usa proxy residencial de Chile por defecto en Apify cloud para mayor estabilidad.

## Actor input object example

```json
{
  "location": "Santiago",
  "propertyType": "departamento",
  "operation": "comprar",
  "maxItems": 100,
  "maxPages": 4,
  "timeoutSecs": 60,
  "delaySecs": 0.5,
  "failOnNoResults": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CL"
  }
}
```

# Actor output Schema

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

Dataset items with normalized TOC TOC property listings.

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

OUTPUT key-value record with status, totals, warnings, errors, pages, and raw listing collection.

# 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 = {
    "location": "Santiago",
    "maxItems": 100,
    "maxPages": 4
};

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

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

```

## MCP server setup

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

```

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/uY6rE6BMoGsjLh303/builds/F2QUd7jQwUv7YTdp2/openapi.json
