# Inmuebles24 Monitor (`datamech/inmuebles24-monitor`) Actor

Extrae avisos de Inmuebles24 México: precio, m², recámaras, ubicación y agencia. Corre en horario programado y detecta bajadas de precio entre corridas.

- **URL**: https://apify.com/datamech/inmuebles24-monitor.md
- **Developed by:** [Fer](https://apify.com/datamech) (community)
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.80 / 1,000 results

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?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Inmuebles24 Monitor

Extrae avisos de Inmuebles24 México: precio, m², recámaras, baños, ubicación,
agencia y más. Corre el actor en un horario programado (Scheduler) y detecta
**bajadas de precio** entre corridas automáticamente.

### Qué hace

- Acepta **URLs de búsqueda** de Inmuebles24 (recorre la paginación) o **URLs
  directas de avisos**.
- Extrae de cada aviso: título, precio, moneda, m² totales y construidos,
  recámaras, baños, estacionamientos, dirección, ubicación, descripción,
  fotos, agencia, fecha de publicación y visualizaciones.
- Guarda un snapshot de precios: cada corrida agrega `previousPrice`,
  `priceChanged` y `priceDropPercent` comparando con la corrida anterior.
- Filtros opcionales: precio mínimo/máximo y recámaras mínimas.

### Entrada

| Campo | Descripción |
|---|---|
| `searchUrls` | URLs de búsqueda (ej. `https://www.inmuebles24.com/departamentos-en-venta-en-culiacan.html`) |
| `propertyUrls` | URLs directas de avisos |
| `maxItemsPerSearch` | Avisos por búsqueda (1–100, default 30) |
| `maxPages` | Páginas máximas por búsqueda (default 3) |
| `minPrice` / `maxPrice` | Filtro de precio |
| `minBedrooms` | Recámaras mínimas |
| `compareWithPreviousRun` | Detectar cambios de precio entre corridas (default sí) |
| `proxyConfiguration` | **Recomendado:** proxies residenciales de Apify (el sitio usa protección Cloudflare) |

### Salida (dataset)

Cada item incluye: `url`, `listingId`, `title`, `price`, `currency`,
`operation`, `propertyType`, `totalAreaM2`, `builtAreaM2`, `bedrooms`,
`bathrooms`, `parkingSpaces`, `address`, `location`, `description`,
`photoCount`, `thumbnail`, `agencyName`, `publishedText`, `views`,
`previousPrice`, `priceChanged`, `priceDropPercent`, `checkedAt`.

### Monitoreo automático

1. Corre el actor una vez para crear el snapshot inicial de precios.
2. Crea un **Scheduler** en Apify Console que lo ejecute cada día/semana.
3. Filtra el dataset por `priceDropPercent > 0` para ver solo las propiedades
   que bajaron de precio.

### Ejemplo de entrada

```json
{
  "searchUrls": ["https://www.inmuebles24.com/departamentos-en-venta-en-culiacan.html"],
  "maxItemsPerSearch": 30,
  "maxPages": 2,
  "compareWithPreviousRun": true
}
```

# Actor input Schema

## `compareWithPreviousRun` (type: `boolean`):

Compara precios con la corrida anterior y marca bajadas (previousPrice, priceChanged, priceDropPercent).

## `maxItemsPerSearch` (type: `integer`):

Avisos a extraer por búsqueda (1-100).

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

Páginas máximas por búsqueda (cada página trae ~30 avisos).

## `maxPrice` (type: `number`):

Solo avisos con precio menor o igual a este monto.

## `minBedrooms` (type: `integer`):

Solo avisos con al menos este número de recámaras.

## `minPrice` (type: `number`):

Solo avisos con precio mayor o igual a este monto.

## `propertyUrls` (type: `array`):

URLs directas de avisos de Inmuebles24 (fichas de propiedad).

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

Se recomienda usar proxies residenciales de Apify: Inmuebles24 usa protección Cloudflare.

## `searchUrls` (type: `array`):

URLs de búsqueda de Inmuebles24 (ej. https://www.inmuebles24.com/departamentos-en-venta-en-culiacan.html). El actor recorre la paginación y extrae cada aviso.

## `useResidentialProxy` (type: `boolean`):

Usar proxies residenciales de Apify. Apágalo para conexión directa (útil si el sitio bloquea las IPs del proxy).

## `debugDumpHtml` (type: `boolean`):

Guarda el HTML crudo de la primera página de búsqueda en el KV store para diagnóstico.

## `crawlerType` (type: `string`):

browser: Chrome real (más compatible, más tráfico). http: cliente HTTP ligero, ~90% menos tráfico — el sitio es server-rendered y no necesita JavaScript.

## Actor input object example

```json
{
  "compareWithPreviousRun": true,
  "maxItemsPerSearch": 30,
  "maxPages": 3,
  "minBedrooms": 0,
  "useResidentialProxy": true,
  "debugDumpHtml": false,
  "crawlerType": "browser"
}
```

# Actor output Schema

## `avisos` (type: `string`):

No description

## `bajadasDePrecio` (type: `string`):

No description

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

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

# Run the Actor and wait for it to finish
run = client.actor("datamech/inmuebles24-monitor").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 '{}' |
apify call datamech/inmuebles24-monitor --silent --output-dataset

```

## MCP server setup

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

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/CkclrIVYlFqdAhVUQ/builds/mQwh41FdjYaEm667a/openapi.json
