# Ultracasas Bolivia Scraper (`qoqa/ultracasas-bolivia-scraper`) Actor

Scrape real estate listings from UltraCasas.com, Bolivia's second largest property portal. Extract prices (USD & BOB), locations, GPS coordinates, photos, agent contacts, and amenities. Supports venta, alquiler, and anticretico listings across all 9 Bolivian departments.

- **URL**: https://apify.com/qoqa/ultracasas-bolivia-scraper.md
- **Developed by:** [Qo Qa](https://apify.com/qoqa) (community)
- **Categories:** Real estate, E-commerce
- **Features:** Limited permissions
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

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

## UltraCasas Bolivia Scraper

Scrape real estate listings from [UltraCasas.com](https://www.ultracasas.com), Bolivia's second largest property portal. Extract property data, build agent directories, and monitor new listings.

**Scroll down for Spanish version**

***

### Why UltraCasas Bolivia?

UltraCasas is a major player in Bolivia's real estate market:

- **Thousands of active listings** across all departments
- **Premium listings** with verified agents (Elite & Plus tiers)
- Unique **anticretico** listings (Bolivia-exclusive rental system)

#### Use Cases

- **Market Analysis** — Track property prices and trends across Bolivian cities
- **Investment Research** — Find undervalued properties or emerging neighborhoods
- **Lead Generation** — Build agent directories with contact info and listing counts
- **New Listing Alerts** — Monitor for new properties matching your criteria
- **Price Comparison** — Compare listings across UltraCasas and InfoCasas
- **AI/ML Training** — Build datasets for property valuation models

***

### Features

#### Data Extraction

- Property details: prices, bedrooms, bathrooms, area, amenities, GPS coordinates
- **Dual currency**: Automatic conversion between USD and Bolivianos (BOB)
- **All transaction types**: Sale, rent, and anticretico
- **All property types**: Houses, apartments, land, commercial, offices, warehouses
- **All 9 departments**: Santa Cruz, La Paz, Cochabamba, Tarija, and more
- Agent info with WhatsApp contacts and verification status
- Full photo galleries (up to 30+ images per listing)

#### Output Modes

**Property Listings** (default)
Extract detailed property data with prices, features, photos, and agent contacts.

**Agent Directory**
Aggregate unique agents/sellers with listing counts and sample properties. Perfect for lead generation and market research.

#### Lead Classification

Each listing includes `contactType` to identify the seller:

- `agency` — Real estate agency or franchise (Century 21, RE/MAX, etc.)
- `individual` — Private owner or independent seller
- `unknown` — Unable to determine

#### Monitor Mode

Track new listings over time:

- **State persistence** — Remembers your last run to detect new properties
- **Days filter** — Or just get listings from the last N days
- Perfect for alerts and notifications

#### Image Storage

Download and store property photos in Apify Key-Value Store for offline access.

***

### Cost

- **Compute**: ~$0.10 per 1,000 listings
- **Speed**: Fast extraction from embedded data
- **Reliability**: 99%+ success rate

***

### Input

| Field | Type | Description |
|-------|------|-------------|
| `operation` | string | `venta`, `alquiler`, or `anticretico` |
| `propertyType` | string | `inmuebles`, `casas`, `departamentos`, `terrenos`, etc. |
| `department` | string | `santa-cruz`, `la-paz`, `cochabamba`, etc. |
| `zone` | string | Zone name (e.g., `equipetrol`, `sirari`) |
| `minPrice` / `maxPrice` | number | Price range in USD |
| `minArea` / `maxArea` | number | Area range in m² |
| `bedrooms` / `bathrooms` | number | Minimum rooms |
| `maxResults` | number | Max listings to extract (default: 100) |
| `mode` | string | `listings` or `agents` |
| `includeDetails` | boolean | Visit each property page for complete data |
| `monitorMode.enabled` | boolean | Only return new listings since last run |
| `monitorMode.sinceDays` | number | Get listings from last N days |

#### Example: Property Search

```json
{
  "operation": "venta",
  "propertyType": "casas",
  "department": "santa-cruz",
  "minPrice": 100000,
  "maxPrice": 500000,
  "bedrooms": 3,
  "maxResults": 50
}
```

#### Example: Agent Directory

```json
{
  "operation": "venta",
  "department": "santa-cruz",
  "mode": "agents",
  "maxResults": 200
}
```

#### Example: New Listings Monitor

```json
{
  "operation": "alquiler",
  "department": "la-paz",
  "monitorMode": {
    "enabled": true
  }
}
```

***

### Output

#### Property Listing

```json
{
  "id": "1042793",
  "url": "https://www.ultracasas.com/inmueble/casa-en-venta-sirari/1042793",
  "title": "Hermosa casa en esquina en venta",
  "description": "Casa de 4 dormitorios con piscina...",
  "operation": "venta",
  "propertyType": "Casa",
  "price": {
    "amount": 365000,
    "currency": "USD",
    "amountUSD": 365000,
    "amountBOB": 2540400
  },
  "address": "Calle Los Gomeros",
  "zone": "Sirari",
  "city": "Santa Cruz de la Sierra",
  "department": "Santa Cruz",
  "latitude": -17.762388,
  "longitude": -63.202374,
  "bedrooms": 4,
  "bathrooms": 3,
  "totalArea": 574,
  "builtArea": 450,
  "lotArea": 574,
  "yearBuilt": 2018,
  "condition": "Excelente estado",
  "parkingSpaces": 2,
  "amenities": ["Piscina", "Churrasquera", "Aire Acondicionado"],
  "agent": {
    "id": "12345",
    "name": "Rita Alcazar",
    "fullName": "Lic. Rita Alcazar Century 21",
    "title": "Lic",
    "company": "Century 21",
    "phone": "+59177338471",
    "whatsapp": "+59177338471",
    "verified": true,
    "contactType": "agency"
  },
  "photos": ["https://cdn6.ultracasas.com/dyn/yastaimages/..."],
  "photoCount": 12,
  "publishedAt": "2024-09-18",
  "updatedAt": "2024-12-20",
  "isFeatured": true,
  "listingStats": {
    "relevanceScore": null,
    "highlightLevel": 2,
    "pricePerSqm": 636
  },
  "scrapedAt": "2024-12-27T02:30:00.000Z"
}
```

#### Agent Directory Entry

```json
{
  "id": "12345",
  "name": "Rita Alcazar",
  "fullName": "Lic. Rita Alcazar Century 21",
  "title": "Lic",
  "company": "Century 21",
  "phone": "+59177338471",
  "whatsapp": "+59177338471",
  "verified": true,
  "contactType": "agency",
  "listingCount": 16,
  "sampleListings": [
    {
      "id": "1042793",
      "url": "https://www.ultracasas.com/inmueble/...",
      "title": "Hermosa casa en Sirari",
      "priceUSD": 365000,
      "operation": "venta"
    }
  ],
  "firstSeen": "2024-12-27T02:30:00.000Z",
  "lastSeen": "2024-12-27T02:30:00.000Z"
}
```

***

### Tips

**Maximize data coverage** — Set `maxResults` high (1000+). The scraper handles pagination automatically.

**Target specific zones** — Use `zone` with zone names: `equipetrol`, `sirari`, `urbari`, `calacoto`, `san-miguel`.

**Get complete data** — Enable `includeDetails` to visit each property page. Slower but captures description, all photos, and exact coordinates.

**Build agent lists** — Use `mode: "agents"` to aggregate sellers by listing count. Great for B2B outreach.

**Set up monitoring** — Enable `monitorMode` and schedule runs to get only new listings each time.

***

### What is Anticretico?

A unique Bolivian rental system. Instead of monthly rent, tenants provide a large deposit ($10,000–$100,000 USD) for 1–2 years. The owner uses this money interest-free and returns the full amount when the contract ends.

***

### Integrations

#### JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('YOUR_USERNAME/ultracasas-bolivia-scraper').call({
  operation: 'venta',
  propertyType: 'casas',
  department: 'santa-cruz',
  maxResults: 100,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_TOKEN')

run = client.actor('YOUR_USERNAME/ultracasas-bolivia-scraper').call(run_input={
    'operation': 'venta',
    'propertyType': 'casas',
    'department': 'santa-cruz',
    'maxResults': 100,
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

***

### Changelog

- **v1.1** — Agent directory mode, monitor mode, lead classification, image storage, enhanced agent parsing
- **v1.0** — Initial release

***

### Support

Questions? Open an issue on GitHub or contact via Apify.

***

## Versión en Español

### Scraper de UltraCasas Bolivia

Extrae listados de propiedades de [UltraCasas.com](https://www.ultracasas.com), el segundo portal inmobiliario más grande de Bolivia.

#### Características

- **Precios en USD y Bolivianos** — Conversión automática con tipo de cambio actualizado
- **Venta, alquiler y anticrético** — Todos los tipos de operación
- **Todos los inmuebles** — Casas, departamentos, terrenos, locales, oficinas
- **Los 9 departamentos** — Santa Cruz, La Paz, Cochabamba, y más
- **Datos de agentes** — WhatsApp, teléfono, verificación
- **Fotos completas** — Hasta 30+ imágenes por propiedad

#### Modos de Extracción

**Listados de Propiedades** (por defecto)
Extrae datos detallados de cada propiedad.

**Directorio de Agentes**
Genera un directorio de agentes/vendedores con cantidad de propiedades y datos de contacto. Ideal para generación de leads.

#### Clasificación de Contactos

Cada listado incluye `contactType`:

- `agency` — Inmobiliaria o franquicia (Century 21, RE/MAX, etc.)
- `individual` — Dueño directo o vendedor independiente
- `unknown` — No se pudo determinar

#### Modo Monitor

Detecta propiedades nuevas desde tu última corrida:

- **Guarda estado** — Recuerda la última ejecución para detectar novedades
- **Filtro por días** — O simplemente obtén propiedades de los últimos N días
- Perfecto para alertas y notificaciones

#### Casos de Uso

- **Análisis de mercado** — Seguimiento de precios y tendencias
- **Investigación de inversiones** — Encontrar propiedades subvaloradas
- **Generación de leads** — Obtener contactos de agentes inmobiliarios
- **Alertas de nuevos listados** — Monitorear propiedades que cumplan tus criterios
- **Comparación de precios** — Analizar el mercado boliviano

#### Ejemplo de Entrada

```json
{
  "operation": "venta",
  "propertyType": "casas",
  "department": "santa-cruz",
  "minPrice": 50000,
  "maxPrice": 200000,
  "bedrooms": 2,
  "maxResults": 50
}
```

#### Ejemplo: Directorio de Agentes

```json
{
  "operation": "venta",
  "department": "santa-cruz",
  "mode": "agents",
  "maxResults": 200
}
```

#### ¿Qué es el Anticrético?

Sistema de alquiler único de Bolivia. El inquilino entrega un depósito grande ($10,000–$100,000 USD) por 1–2 años en lugar de pagar alquiler mensual. El propietario devuelve el monto completo al finalizar el contrato.

#### Soporte

¿Preguntas? Contacta vía Apify o GitHub.

# Actor input Schema

## `mode` (type: `string`):

Properties = full listing data. Agents = unique contacts from listings. | Propiedades = datos completos. Agentes = contactos unicos de listados.

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

Buy, rent, or anticretico | Comprar, alquilar, o anticretico

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

Type of property | Tipo de propiedad

## `department` (type: `string`):

Department in Bolivia | Departamento de Bolivia

## `zone` (type: `string`):

Neighborhood, e.g. 'equipetrol' | Barrio, ej: 'equipetrol'

## `minPrice` (type: `integer`):

Minimum price | Precio minimo

## `maxPrice` (type: `integer`):

Maximum price | Precio maximo

## `minArea` (type: `integer`):

Minimum size | Tamano minimo

## `maxArea` (type: `integer`):

Maximum size | Tamano maximo

## `bedrooms` (type: `integer`):

Minimum bedrooms | Minimo de dormitorios

## `bathrooms` (type: `integer`):

Minimum bathrooms | Minimo de banos

## `maxResults` (type: `integer`):

How many listings to process | Cuantas propiedades procesar

## `includeDetails` (type: `boolean`):

Visit each listing page for complete data (slower but recommended) | Visitar cada pagina para datos completos (mas lento pero recomendado)

## `startUrls` (type: `array`):

Override search - scrape specific URLs instead | Ignorar busqueda - extraer URLs especificas

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

Proxy settings | Configuracion de proxy

## `imageStorage` (type: `object`):

Download property photos | Descargar fotos de propiedades

## `monitorMode` (type: `object`):

Track new listings between runs | Detectar nuevas propiedades entre ejecuciones

## Actor input object example

```json
{
  "mode": "listings",
  "operation": "venta",
  "propertyType": "inmuebles",
  "department": "",
  "maxResults": 100,
  "includeDetails": true,
  "startUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "imageStorage": {
    "enabled": false,
    "maxImagesPerListing": 5,
    "downloadInFastMode": false,
    "storeName": "property-images",
    "rateLimitMs": 200
  },
  "monitorMode": {
    "enabled": false
  }
}
```

# Actor output Schema

## `id` (type: `string`):

Unique identifier for the listing or agent

## `url` (type: `string`):

URL of the property listing

## `title` (type: `string`):

Title of the property listing

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

Type of transaction: venta, alquiler, or anticretico

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

Type of property: Casa, Departamento, Terreno, etc.

## `zone` (type: `string`):

Neighborhood or zone name

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

City name

## `department` (type: `string`):

Department/region in Bolivia

## `bedrooms` (type: `string`):

Number of bedrooms

## `bathrooms` (type: `string`):

Number of bathrooms

## `totalArea` (type: `string`):

Total area in square meters

## `scrapedAt` (type: `string`):

Timestamp when the data was scraped

## `name` (type: `string`):

Agent name (Agents mode)

## `phone` (type: `string`):

Phone number

## `whatsapp` (type: `string`):

WhatsApp number

## `email` (type: `string`):

Email address

## `company` (type: `string`):

Company name

## `contactType` (type: `string`):

Type of contact: agency, individual, or unknown

## `listingCount` (type: `string`):

Number of listings by this agent (Agents mode)

# 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 = {
    "startUrls": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    },
    "imageStorage": {
        "enabled": false,
        "maxImagesPerListing": 5,
        "downloadInFastMode": false,
        "storeName": "property-images",
        "rateLimitMs": 200
    },
    "monitorMode": {
        "enabled": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("qoqa/ultracasas-bolivia-scraper").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 = {
    "startUrls": [],
    "proxyConfiguration": { "useApifyProxy": True },
    "imageStorage": {
        "enabled": False,
        "maxImagesPerListing": 5,
        "downloadInFastMode": False,
        "storeName": "property-images",
        "rateLimitMs": 200,
    },
    "monitorMode": { "enabled": False },
}

# Run the Actor and wait for it to finish
run = client.actor("qoqa/ultracasas-bolivia-scraper").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 '{
  "startUrls": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "imageStorage": {
    "enabled": false,
    "maxImagesPerListing": 5,
    "downloadInFastMode": false,
    "storeName": "property-images",
    "rateLimitMs": 200
  },
  "monitorMode": {
    "enabled": false
  }
}' |
apify call qoqa/ultracasas-bolivia-scraper --silent --output-dataset

```

## MCP server setup

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

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/bNtlSGy2keLG4Ks24/builds/Qz0bRAeJm3Ha0tDud/openapi.json
