# Portal Inmobiliario API - Propiedades en Chile (`scraperschile/portal-inmobiliario-chile-scraper-api`) Actor

API y scraper de Portal Inmobiliario Chile para extraer propiedades en venta y arriendo con precios UF/CLP, comuna, dormitorios, baños, superficie, imágenes y enlaces. Exporta datos para leads, comparables y análisis del mercado inmobiliario chileno.

- **URL**: https://apify.com/scraperschile/portal-inmobiliario-chile-scraper-api.md
- **Developed by:** [Scrapers Chile](https://apify.com/scraperschile) (community)
- **Categories:** Real estate, Lead generation, Automation
- **Stats:** 1 total users, 1 monthly users, 100.0% 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/platform/actors/running/actors-in-store#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

## Portal Inmobiliario Scraper API - Chile Real Estate Data

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

Use it to collect listings from `portalinmobiliario.com` by location, property type, and operation, including searches such as:

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

Also known as: PortalInmobiliario scraper, Portal Inmobiliario crawler, Chile property scraper, Chile real estate scraper, departamentos Chile API, casas en arriendo Chile, propiedades en venta Chile, Apify real estate scraper Chile.

### Popular searches

- Portal Inmobiliario scraper
- Portal Inmobiliario API
- PortalInmobiliario scraper
- PortalInmobiliario API
- Chile real estate scraper
- Chile real estate API
- departamentos en venta Chile
- casas en arriendo Chile
- propiedades en venta Chile
- property listings Chile API

### What does this Portal Inmobiliario scraper do?

The Actor opens Portal Inmobiliario search result pages in a headless browser, follows paginated result URLs, and 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 and houses.
- Properties for sale and rent.
- Location-based searches by commune or city.
- Multi-page extraction with up to 48 listings per result page.
- Residential Chile proxy configuration for more stable cloud runs.
- Fail-closed pagination: if a later page fails after retries or contains incomplete listings, the run fails, keeps the diagnostic in `OUTPUT.errors`, and does not publish or charge partial result rows.
- Structured output for analytics, lead generation, market research, and dashboards.

### What data can you extract?

Each dataset item can include:

| Field | Description |
| --- | --- |
| `listing_id` | Portal Inmobiliario / Mercado Libre listing identifier, when available. |
| `title` | Public listing title. |
| `headline` | Listing category headline, such as apartments for sale. |
| `price_text` | Price exactly as displayed on the site. |
| `currency` | Published currency, for example UF or CLP. |
| `amount` | Published price amount as text. |
| `location` | Address, commune, neighborhood, or visible location text. |
| `attributes` | Bedrooms, bathrooms, usable area, total area, parking, or other visible features. |
| `badges` | Visible labels such as project, discount, promoted, or delivery status. |
| `image_url` | Public image URL when available. |
| `url` | Public listing URL. |
| `page` | Search results page where the listing appeared. |
| `position` | Position inside that result page. |
| `scraped_at` | Extraction timestamp. |
| `source_search_url` | Search URL used for the run. |

The `OUTPUT` key-value record also includes:

- `status`: `success`, `partial`, or `no_results`. `partial` is diagnostic output from a failed run; it is never published as a successful partial dataset. Source blocking and unrecognized page changes also fail the run.
- `errors`: source and pagination diagnostics retained in `OUTPUT` when the run fails.
- `pages`: count and URL metadata for every page that was processed.

Example output:

```json
{
  "listing_id": "MLC-3212985598",
  "title": "Edificio Parque Quinta - Norte Verde",
  "headline": "Departamentos en venta",
  "price_text": "UF 2.911",
  "currency": "UF",
  "amount": "2.911",
  "location": "Santo Domingo 3902, Santiago, Santiago",
  "attributes": ["Estudio a 1 dormitorios", "1 bano", "22 - 40 m2 utiles"],
  "image_url": "https://http2.mlstatic.com/...",
  "url": "https://www.portalinmobiliario.com/MLC-3212985598-...",
  "page": 1,
  "position": 1,
  "search_location": "Santiago",
  "property_type": "Departamentos",
  "operation": "Venta"
}
```

### 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 apartments for sale, houses for rent, UF prices, published discounts, and visible amenities. |
| CRM enrichment | Feed Portal Inmobiliario listing URLs, prices, locations, and attributes into CRM or lead management tools. |
| Dashboards and BI | Export JSON, CSV, Excel, XML, or API data into spreadsheets, warehouses, BI dashboards, and internal reports. |
| Rental analysis | Collect casas en arriendo and departamentos en arriendo by Chilean commune for rent benchmarking. |

### Pricing

The Actor charges **USD 0.003 per property listing saved to the default Dataset**. Apify also applies the configured Actor-start event at USD 0.00005 per GB of assigned memory. A first-page source failure fails visibly without paid result rows. If a later page fails, listings already collected can still be returned and charged, with the page failure recorded in `OUTPUT.errors`.

### Input

For most runs, users should only fill these fields:

- `location`: the normal search term, commune, city, or sector. Examples: `Santiago`, `La Florida`, `Las Condes`, `Providencia`.
- `propertyType`: `departamento` or `casa`.
- `operation`: `comprar` or `arrendar`.
- `maxPages`: how many result pages to scrape.

Do not confuse `location` with `locationSlug`. If you want to search La Florida, write `La Florida` in `location`. Leave `locationSlug` empty unless you already know the exact Portal Inmobiliario URL slug.

| Field | Required | Description |
| --- | --- | --- |
| `location` | Yes | Normal search term, commune, city, or sector. Example: `Santiago`, `La Florida`, `Las Condes`, `Providencia`. |
| `propertyType` | Yes | `departamento` or `casa`. |
| `operation` | Yes | `comprar` for sale listings or `arrendar` for rental listings. |
| `maxPages` | No | Number of result pages to scrape. Each page can contain up to 48 listings. |
| `delaySecs` | No | Advanced. Pause between pages to reduce load on the website. |
| `timeoutSecs` | No | Advanced. Maximum seconds to wait for each results page. |
| `proxyAttempts` | No | Advanced. Number of navigation attempts per results page. Retries rotate residential proxy sessions when available. |
| `failOnNoResults` | No | Defaults to `true` so a confirmed empty search fails visibly. Set it to `false` only when a legitimate search with no listings should finish with `status: no_results`. |
| `locationSlug` | No | Advanced. Exact Portal Inmobiliario URL slug. Leave empty unless you know the slug. Example: `la-florida-metropolitana`, not `La Florida`. |
| `regionSlug` | No | Advanced. Region suffix used in the direct URL. Default: `metropolitana`. |
| `proxyConfiguration` | No | Advanced. Apify Proxy settings. Residential Chile proxy is used by default. |

#### Input examples

Scrape apartments for sale in Santiago:

```json
{
  "location": "Santiago",
  "propertyType": "departamento",
  "operation": "comprar",
  "maxPages": 3
}
```

Scrape houses for rent in Las Condes:

```json
{
  "location": "Las Condes",
  "propertyType": "casa",
  "operation": "arrendar",
  "maxPages": 2
}
```

Use an exact URL slug only when the normal `location` field is not enough:

```json
{
  "location": "La Florida",
  "propertyType": "departamento",
  "operation": "comprar",
  "maxPages": 2
}
```

Advanced exact slug example:

```json
{
  "location": "Valparaiso",
  "locationSlug": "valparaiso-valparaiso",
  "regionSlug": "valparaiso",
  "propertyType": "departamento",
  "operation": "comprar",
  "maxPages": 2
}
```

### How to run the Actor through the API

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_API_TOKEN>")

run = client.actor("scraperschile/portal-inmobiliario-chile-scraper-api").call(
    run_input={
        "location": "Santiago",
        "propertyType": "departamento",
        "operation": "comprar",
        "maxPages": 3,
    }
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["title"], item["price_text"], item["location"])
```

#### cURL

```bash
curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <APIFY_API_TOKEN>' \
  -d '{
    "location": "Santiago",
    "propertyType": "departamento",
    "operation": "comprar",
    "maxPages": 3
  }' \
  'https://api.apify.com/v2/acts/scraperschile~portal-inmobiliario-chile-scraper-api/runs?waitForFinish=60'
```

### Search coverage and pagination

Portal Inmobiliario returns up to 48 listings per search results page. This Actor follows paginated result pages such as `/_Desde_49`, `/_Desde_97`, and later offsets until it reaches the configured `maxPages`, an empty page, or the end of available results.

The Actor automatically converts `location` into the Portal Inmobiliario URL format. For example, `La Florida` becomes a URL like `/venta/departamento/la-florida-metropolitana`.

If the generated URL does not match the exact location used by Portal Inmobiliario, advanced users can pass `locationSlug` manually. This is useful for neighborhoods, regions outside Santiago, or locations whose URL includes extra words. Most users should leave `locationSlug` empty.

### Reliability notes

Portal Inmobiliario is part of the Mercado Libre ecosystem and may show verification flows or change page markup. This Actor is designed for stable headless execution by using direct search result URLs, browser rendering, Chile residential proxy defaults, and structured parsing of visible public listing cards.

The Actor accepts an empty result only when Portal Inmobiliario displays an explicit no-results message. Verification pages, access blocks, generic branded pages, and unrecognized result markup fail the run. By default, even a confirmed empty search fails visibly to protect automated customers from silent empty datasets; set `failOnNoResults` to `false` when emptiness is expected.

For best results:

- Keep `maxPages` reasonable.
- Use Chile residential proxies in Apify cloud.
- Increase `proxyAttempts` when a run hits transient navigation failures.
- Use exact `locationSlug` only for ambiguous communes, neighborhoods, or non-default regions.
- Re-run periodically if you need fresh availability and prices.

### Responsible use

This Actor only extracts public listing information visible on Portal Inmobiliario search pages. It does not log in, bypass private areas, collect credentials, or access non-public data.

Use the data responsibly and in accordance with applicable laws, privacy rules, Portal Inmobiliario terms, and Apify's policies. The Actor is not affiliated with Portal Inmobiliario, Mercado Libre, or any real estate broker.

### FAQ

#### Is this a Portal Inmobiliario API?

It provides API-style access through Apify. You can run the Actor from Apify Console, the Apify API, Python, cURL, Zapier, Make, or scheduled jobs, then download structured Portal Inmobiliario listings from the dataset.

#### Can I scrape all Portal Inmobiliario pages?

You can configure `maxPages` for each search. Use focused searches by location, property type, and operation instead of broad uncontrolled scraping.

#### Can it scrape both apartments and houses?

Yes. Set `propertyType` to `departamento` for apartments or `casa` for houses.

#### Can it scrape sale and rent listings?

Yes. Set `operation` to `comprar` for properties for sale or `arrendar` for rental listings.

#### Why do I sometimes need `locationSlug`?

Portal Inmobiliario URLs are slug-based, but most users do not need to know that. Write the normal commune or city in `location`. Use `locationSlug` only if you know the exact URL part used by Portal Inmobiliario, such as `la-florida-metropolitana`.

# Actor input Schema

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

Escribe el termino normal de busqueda: comuna, ciudad o sector. Ejemplos: Santiago, La Florida, Las Condes, Providencia, Vina del Mar. No escribas URLs ni slugs aqui.

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

Elige si quieres buscar departamentos o casas.

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

Elige si quieres propiedades en venta o en arriendo.

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

Cantidad maxima de paginas de resultados a extraer. Cada pagina puede tener hasta 48 avisos.

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

Pausa en segundos entre paginas. Normalmente puedes dejar el valor por defecto.

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

Segundos maximos para esperar resultados en cada pagina. Normalmente puedes dejar el valor por defecto.

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

Numero maximo de intentos por pagina. Cada reintento usa otra sesion de proxy residencial cuando esta disponible.

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

Recomendado. Hace fallar el run si Portal Inmobiliario confirma cero avisos, evitando datasets vacios silenciosos. Desactivalo solo si una busqueda legitima sin avisos es un resultado esperado.

## `locationSlug` (type: `string`):

Opcional. Dejalo vacio salvo que sepas el slug exacto de Portal Inmobiliario. Si lo completas, reemplaza la Ubicacion normal. Ejemplo correcto: la-florida-metropolitana. Si quieres escribir 'La Florida', usa el campo Ubicacion.

## `regionSlug` (type: `string`):

Sufijo regional usado para construir la URL. Para busquedas en la Region Metropolitana deja metropolitana.

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

El Actor usa proxy residencial de Chile por defecto para mayor estabilidad en Apify cloud. Normalmente no necesitas cambiar esto.

## Actor input object example

```json
{
  "location": "Santiago",
  "propertyType": "departamento",
  "operation": "comprar",
  "maxPages": 1,
  "delaySecs": 1,
  "timeoutSecs": 45,
  "proxyAttempts": 5,
  "failOnNoResults": true,
  "regionSlug": "metropolitana",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "CL"
  }
}
```

# Actor output Schema

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

Estado del scrape: success, partial o no\_results. Los bloqueos y cambios de estructura hacen fallar el run.

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

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

## `errors` (type: `string`):

Errores no fatales encontrados durante la paginacion, si existen.

# 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",
    "locationSlug": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("scraperschile/portal-inmobiliario-chile-scraper-api").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",
    "locationSlug": "",
}

# Run the Actor and wait for it to finish
run = client.actor("scraperschile/portal-inmobiliario-chile-scraper-api").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",
  "locationSlug": ""
}' |
apify call scraperschile/portal-inmobiliario-chile-scraper-api --silent --output-dataset

```

## MCP server setup

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

```

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/xxpplwjTbrvO4cNkG/builds/yaNVUFoopedPQyqQb/openapi.json
