# Urbania Scraper — Peru Property Data & API (`sian.agency/urbania-property-scraper`) Actor

Urbania scraper & real estate data API for one of Peru's biggest property portals (Navent). Sale & rent listings: price in soles + USD, area, rooms, baths, parking, address, GPS, photos, advertiser WhatsApp — clean JSON/CSV. Overview or detail. No API key needed.

- **URL**: https://apify.com/sian.agency/urbania-property-scraper.md
- **Developed by:** [SIÁN OÜ](https://apify.com/sian.agency) (community)
- **Categories:** Real estate, Automation, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 overview listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Urbania Scraper — Peru Property Data & API 🇵🇪🏠

[![SIÁN Agency Store](https://img.shields.io/badge/Store-SI%C3%81N%20Agency-1AE392)](https://apify.com/sian.agency?fpr=sian) [![VivaReal Scraper](https://img.shields.io/badge/Store-VivaReal%20Scraper-009b3a)](https://apify.com/sian.agency/vivareal-property-scraper?fpr=sian) [![Immobiliare Scraper](https://img.shields.io/badge/Store-Immobiliare%20Scraper-009246)](https://apify.com/sian.agency/immobiliare-property-scraper?fpr=sian)

#### 🎉 The fast, no-code Urbania data API — scrape a full property record per listing, prices in soles AND US dollars, no Urbania account or API key required
##### Built for property investors, brokers, proptech teams, and market researchers who need clean Peruvian real-estate data — for sale and for rent — across every district in Peru.

### 📋 Overview

**Pull listings from Urbania — one of Peru's biggest real-estate portals (Navent) — as clean JSON or CSV.** For sale (*venta*) and for rent (*alquiler*), across Lima, Miraflores, San Isidro, Arequipa, Trujillo, Cusco and every district in Peru. Pick the depth that fits the job: a fast, low-cost overview scan for sizing a market, or the full per-property record with the complete description and advertiser WhatsApp.

**Why investors and brokers choose us:**
- ⚡ **Two depths, one actor**: a fast Overview scan for whole-market sweeps, or full Detail records when you need the long description and the advertiser's WhatsApp
- 🔁 **Detail = Overview + more**: every Overview field is on a Detail row too, with the full description and WhatsApp added on top — never less
- 💵💰 **Dual currency**: every listing carries the price in **both soles (PEN) and US dollars (USD)** plus the primary currency — the missing side is completed at the run's live FX rate
- 💰 **Pay-per-result pricing**: only charged for listings actually extracted — Overview and Detail priced separately
- 📐 **Analysis-ready**: price, expenses, area in m², rooms, baths, parking, **price-per-m²** and **GPS coordinates** on every row
- 🎯 **Three ways to search**: by operation + filters, by a pasted Urbania search URL (your filters honored), or by specific listing URLs
- 📞 **Advertiser contact built in**: agency name and **WhatsApp** — instant lead lists
- 🆓 **Free to try**: up to 25 listings per run, no credit card

### ✨ Features

- 🧭 **Overview mode**: a full record per listing straight from the search API — price (PEN + USD), expenses, specs, full location hierarchy, advertiser, photo gallery — ideal for fast market sweeps
- 🔍 **Detail mode**: full per-listing record with the complete long description and the advertiser's WhatsApp phone
- 🗺️ **By place / search URL / listing URL**: pick an operation (sale/rent/transfer/temporary) + sort + filters, paste an Urbania search link, or drop in specific listings
- 🎚️ **Filters**: operation, sort order, price range (PEN or USD), min area, min bedrooms, property type
- 💱 **Dual-currency + price-per-m² + thumbnail** computed on every row for instant comparison
- 📍 **GPS + full location path** (district → city → region → country) on every listing for mapping and territory analysis
- 📞 **Advertiser contact**: agency name and WhatsApp — instant lead lists
- 🧾 **Self-documenting datasets**: every row carries a `metadata` object recording the exact search settings (and FX rate) that produced it
- 📤 **Clean exports**: JSON, CSV, Excel, or the full REST API

### 🎬 Quick Start

Pick a scrape depth, choose how to search, set filters, and run. Results stream to the Apify dataset as clean JSON/CSV.

```bash
curl -X POST "https://api.apify.com/v2/acts/sian.agency~urbania-property-scraper/runs?token=[YOUR_TOKEN]" \
-H 'Content-Type: application/json' \
-d '{"scrapeMode":"overview","searchMode":"byPlace","operation":"sale","maxResults":50}'
````

### 🚀 Getting Started (3 Simple Steps)

#### Step 1: Pick your scrape depth

**Overview** for a fast, full-record scan, or **Detail** for the complete long description and the advertiser's WhatsApp.

#### Step 2: Choose how to search

**By place** (pick the operation like `sale`/`rent` + a sort order + filters), **By search URL** (paste an Urbania search link — filters honored), or **By listing URL** (detail mode — drop in specific listings).

#### Step 3: Set filters & run

Operation, sort, price range, min area, min bedrooms, Max results — then hit **Start**.

**That's it! In under a minute, you'll have:**

- A clean dataset of Peruvian property listings (JSON / CSV / Excel)
- Price in soles **and** US dollars, expenses, size, rooms, GPS, advertiser contact and price-per-m² on every row
- A repeatable, no-code real-estate data feed

### 📥 Input Configuration

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| scrapeMode | string | No | `overview` (fast & cheap) or `detail` (full description + WhatsApp). Default `overview`. |
| searchMode | string | No | `byPlace`, `bySearchUrl`, or `byListingUrl` (detail only). |
| operation | string | No | `sale` (venta), `rent` (alquiler), `transfer` (traspaso) or `temporary` (temporal). Default `sale`. |
| sort | string | No | `relevance`, `low_price`, `high_price`, `more_recent`, `most_visit`, `most_lowered_price`. |
| searchUrls | array | No | Urbania search URLs (bySearchUrl) — on-page filters honored. |
| listingUrls | array | No | Listing URLs (detail / byListingUrl). |
| maxResults | integer | No | Max listings this run. FREE tier capped at 25. |
| minPrice / maxPrice | integer | No | Price range filter. |
| currencyFilter | string | No | Currency the price filters apply to: `PEN` or `USD`. |
| minArea / minRooms | integer | No | Minimum area (m²) / bedrooms. |
| propertyType | string | No | Urbania property-type ID(s) (byPlace). |

**Example — by place:**

```json
{
  "scrapeMode": "overview",
  "searchMode": "byPlace",
  "operation": "sale",
  "sort": "low_price",
  "maxPrice": 500000,
  "currencyFilter": "USD",
  "minArea": 60,
  "maxResults": 200
}
```

**Example — by search URL:**

```json
{
  "scrapeMode": "overview",
  "searchMode": "bySearchUrl",
  "searchUrls": ["https://urbania.pe/buscar/alquiler-de-departamentos-en-lima"],
  "maxResults": 100
}
```

### 📤 Output

Results are saved to the Apify dataset with **40+ fields** including:

| Field | Type | Description |
|-------|------|-------------|
| propertyTitle | string | Listing title |
| url | string | Listing URL |
| operation\_type | string | `Venta`, `Alquiler`, … |
| property\_type | string | Property type (Departamento, Casa, …) |
| price | number | Asking price (primary currency) |
| currency | string | Primary currency (`S/` or `USD`) |
| price\_pen / price\_usd | number | Price in soles AND US dollars (missing side completed via live FX) |
| price\_per\_sqm\_pen | number | Price per m² in soles (computed) |
| expenses | number | Monthly maintenance / common expenses |
| total\_area / covered\_area | number | Area (m²) |
| rooms / bedrooms / bathrooms / parking | number | Specs |
| location\_name / location\_path | string | District + full location hierarchy |
| latitude / longitude | number | GPS |
| publisher | string | Advertiser / agency name |
| whatsapp | string | Advertiser WhatsApp |
| images / thumbnail | array / string | Photo gallery + cover |
| description | string | Listing description (full in detail mode) |

**Example:**

```json
{
  "id": "146213312",
  "propertyTitle": "Bugambilias",
  "url": "https://urbania.pe/inmueble/...-146213312.html",
  "operation_type": "Venta",
  "property_type": "Departamento",
  "price": 217786,
  "currency": "S/",
  "price_pen": 217786,
  "price_usd": 64005,
  "price_per_sqm_pen": null,
  "covered_area": null,
  "location_name": "Jesús María",
  "location_path": "Jesús María > Lima > Lima > Peru",
  "latitude": -12.0694981,
  "longitude": -77.0488401,
  "publisher": "ABRIL GRUPO INMOBILIARIO",
  "whatsapp": "51 945889665",
  "image_count": 8
}
```

### 💼 Use Cases & Examples

#### 1. Market research & price benchmarking

**Analysts sizing a city or district market.**
**Input:** `byPlace` sale, nationwide. **Output:** thousands of listings with price in PEN + USD and price-per-m². **Use:** build a live price index per district.

#### 2. Investment sourcing

**Investors hunting undervalued stock.**
**Input:** `byPlace` + `maxPrice` + `minArea`. **Output:** filtered listings with PEN/m² and GPS. **Use:** rank deals by price-per-m² vs district median.

#### 3. Agency lead generation

**Brokers building a contact list.**
**Input:** Overview scan of a target area. **Output:** `publisher` and `whatsapp` on every row. **Use:** prospecting and competitive coverage.

#### 4. Proptech & valuation data feeds

**Proptech teams powering AVMs and dashboards.**
**Input:** scheduled `bySearchUrl` runs. **Output:** a clean, repeatable Peruvian real-estate data feed. **Use:** feed models without an Urbania API.

#### 5. Rental-yield models

**Investors comparing rent vs sale stock.**
**Input:** `byPlace` rent + sale runs. **Output:** price, expenses and dual-currency on every row. **Use:** compute gross/net yield by district.

#### 6. Comparative market analysis (CMA)

**Appraisers preparing valuations.**
**Input:** Detail mode on a set of comparable listings. **Output:** full description, specs, advertiser. **Use:** defensible CMA inputs.

### 🔗 Integration Examples

#### JavaScript/Node.js

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });

const run = await client.actor('sian.agency/urbania-property-scraper').call({
  scrapeMode: 'overview', searchMode: 'byPlace', operation: 'sale', maxResults: 50,
});

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

#### Python

```python
from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')

run = client.actor('sian.agency/urbania-property-scraper').call(
    run_input={'scrapeMode': 'overview', 'searchMode': 'byPlace', 'operation': 'sale', 'maxResults': 50}
)

for item in client.dataset(run['defaultDatasetId']).iterate_items():
    print(item)
```

#### cURL

```bash
curl -X POST 'https://api.apify.com/v2/acts/sian.agency~urbania-property-scraper/runs?token=YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"scrapeMode":"overview","searchMode":"byPlace","operation":"sale","maxResults":50}'
```

#### Automation Workflows (N8N / Zapier / Make)

1. **Trigger**: Schedule (e.g. daily) or webhook
2. **HTTP Request**: Call the actor API
3. **Process**: Handle the JSON results
4. **Action**: Save to a sheet/DB, notify, or transform

### 📊 Performance & Pricing

#### FREE Tier (Try It Now)

- **25 listings** per run — full feature access, same quality
- No credit card required
- Perfect for testing and small projects

#### PAID Tier (Production Ready)

- **Unlimited** listings per run
- Pay-per-result: only charged for listings actually extracted
- Overview and Detail priced separately so you only pay for the depth you use

🔗 [View current pricing](https://apify.com/sian.agency/urbania-property-scraper?fpr=sian)

### ❓ Frequently Asked Questions

**Q: How many listings can I extract?**
A: FREE tier: 25 per run. PAID tier: unlimited.

**Q: Do I need an Urbania API key?**
A: No. There's no setup and no Urbania account or API key required.

**Q: Are prices in soles or dollars?**
A: Both. Urbania quotes many listings in both currencies; we capture the primary currency plus `price_pen` and `price_usd`, completing the missing side at the run's live exchange rate (stamped on every row).

**Q: What's the difference between Overview and Detail?**
A: Overview is a fast, low-cost scan that already returns a full record per listing (price, specs, location, advertiser, photo gallery). Detail adds the complete long description and the advertiser's WhatsApp — and includes everything Overview returns.

**Q: Can I use my own Urbania search filters?**
A: Yes — paste your search URL in `bySearchUrl` mode and the path + on-page filters are honored.

**Q: What output formats are available?**
A: JSON, CSV, Excel — export directly from the Apify dataset.

**Q: Does it work for both sale and rent?**
A: Yes — set `operation` to `sale` (venta), `rent` (alquiler), `transfer` (traspaso) or `temporary` (temporal).

**Q: Is this legal?**
A: We only extract publicly available data. See the legal note below.

### 🐛 Troubleshooting

**No results returned**

- Try a broader operation/sort or paste a working Urbania search URL instead.
- Loosen filters — an overly tight price/area range can return zero listings.

**Fewer results than expected**

- FREE tier is capped at 25 listings per run. Upgrade to PAID for unlimited, or raise `maxResults`.

### ⚖️ Is it legal to scrape data?

Our actors are ethical and do not extract any private user data, such as email addresses, gender, or location. They only extract what the user has chosen to share publicly. We therefore believe that our actors, when used for ethical purposes by Apify users, are safe.

However, you should be aware that your results could contain personal data. Personal data is protected by the **GDPR** in the European Union, the **Ley N° 29733** (Ley de Protección de Datos Personales) in Peru, and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so. If you're unsure whether your reason is legitimate, consult your lawyers.

You can also read Apify's blog post on the [legality of web scraping](https://blog.apify.com/is-web-scraping-legal/).

*This is an independent tool and is not affiliated with, endorsed by, or sponsored by Urbania, Navent, or their affiliates. "Urbania" is a trademark of its respective owner.*

### 🤝 Support

[![Telegram Support](https://img.shields.io/badge/Telegram-Support%20Group-0088cc?logo=telegram)](https://t.me/+vyh1sRE08sAxMGRi)

**Join our active support community**

- For issues or questions, open an issue from the actor page
- Check the [SIÁN Agency Store](https://apify.com/sian.agency?fpr=sian) for more automation tools
- 📧 <apify@sian-agency.online>

***

**Built by [SIÁN Agency](https://www.sian-agency.online)** | **[More Tools](https://apify.com/sian.agency?fpr=sian)**

# Actor input Schema

## `scrapeMode` (type: `string`):

⚡ **OVERVIEW** — fast, cheap. Pulls a full record per listing straight from the Urbania search API (price in soles + USD, area, rooms, baths, parking, full address, GPS, photos, advertiser, location hierarchy).

🔍 **DETAIL** — same record plus the full long description and the advertiser's WhatsApp phone for a specific listing. Slower and priced higher per result.

**TIP:** Start with Overview — the search API already carries almost every field. Use Detail only when you need the full description / WhatsApp for specific listings.

## `searchMode` (type: `string`):

🧭 How to tell the scraper what to fetch:

- **By place** — pick the operation (sale/rent), a sort order and optional filters.
- **By search URL** — paste an Urbania search-results URL; the path operation and on-page filters in the URL are honored.
- **By listing URL** — Detail mode only: paste Urbania listing URLs to fetch specific properties.

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

🏷️ Listing operation for **By place** searches: **Sale** (venta), **Rent** (alquiler), **Transfer** (traspaso) or **Temporary** (temporal).

## `sort` (type: `string`):

↕️ Result ordering: relevance, lowest/highest price, most recent, most visited, or most price-reduced.

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

🔗 Urbania search-results URLs to scrape. Used when **Search by = By search URL**.

**TIP:** Build any search on urbania.pe (set your area, sale/rent, filters), then copy the URL from the address bar — the operation and on-page filters are honored.

**BULK EDIT:** Click "Bulk edit" to paste many URLs, one per line.

## `listingUrls` (type: `array`):

🆔 **Detail mode only.** Urbania listing URLs (e.g. https://urbania.pe/inmueble/clasificado/...-146979649.html).

**BULK EDIT:** Click "Bulk edit" to paste many URLs, one per line.

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

🔢 Maximum listings to extract this run.

- **FREE tier:** capped at 25 listings per run.
- **PAID tier:** unlimited — set as high as you need.

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

💰 Optional. Minimum price filter (By place mode). Pair with **Currency filter** to set the currency.

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

💰 Optional. Maximum price filter (By place mode). Pair with **Currency filter** to set the currency.

## `currencyFilter` (type: `string`):

💱 Optional. Currency the price filters apply to: PEN (soles) or USD. Urbania returns both currencies on every listing regardless.

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

📐 Optional. Minimum surface area in m² (By place mode).

## `minRooms` (type: `integer`):

🛏️ Optional. Minimum number of bedrooms (By place mode).

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

🏠 Optional. Urbania property-type ID(s) for By place searches (e.g. departamentos, casas). Leave blank for all types.

## Actor input object example

```json
{
  "scrapeMode": "overview",
  "searchMode": "byPlace",
  "operation": "sale",
  "sort": "relevance",
  "searchUrls": [
    "https://urbania.pe/buscar/venta-de-departamentos-en-lima"
  ],
  "listingUrls": [
    "https://urbania.pe/inmueble/clasificado/venta-de-local-comercial-en-villa-el-salvador-lima-146979649.html"
  ],
  "maxResults": 100
}
```

# Actor output Schema

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

Scraped Urbania listings (JSON/CSV/Excel).

# 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("sian.agency/urbania-property-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("sian.agency/urbania-property-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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 sian.agency/urbania-property-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=sian.agency/urbania-property-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Urbania Scraper — Peru Property Data & API",
        "description": "Urbania scraper & real estate data API for one of Peru's biggest property portals (Navent). Sale & rent listings: price in soles + USD, area, rooms, baths, parking, address, GPS, photos, advertiser WhatsApp — clean JSON/CSV. Overview or detail. No API key needed.",
        "version": "1.0",
        "x-build-id": "OBaMgzAgb8kLzPqyX"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/sian.agency~urbania-property-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-sian.agency-urbania-property-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/sian.agency~urbania-property-scraper/runs": {
            "post": {
                "operationId": "runs-sync-sian.agency-urbania-property-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/sian.agency~urbania-property-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-sian.agency-urbania-property-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "scrapeMode": {
                        "title": "⚡ Scrape mode",
                        "enum": [
                            "overview",
                            "detail"
                        ],
                        "type": "string",
                        "description": "⚡ **OVERVIEW** — fast, cheap. Pulls a full record per listing straight from the Urbania search API (price in soles + USD, area, rooms, baths, parking, full address, GPS, photos, advertiser, location hierarchy).\n\n🔍 **DETAIL** — same record plus the full long description and the advertiser's WhatsApp phone for a specific listing. Slower and priced higher per result.\n\n**TIP:** Start with Overview — the search API already carries almost every field. Use Detail only when you need the full description / WhatsApp for specific listings.",
                        "default": "overview"
                    },
                    "searchMode": {
                        "title": "🧭 Search by",
                        "enum": [
                            "byPlace",
                            "bySearchUrl",
                            "byListingUrl"
                        ],
                        "type": "string",
                        "description": "🧭 How to tell the scraper what to fetch:\n\n- **By place** — pick the operation (sale/rent), a sort order and optional filters.\n- **By search URL** — paste an Urbania search-results URL; the path operation and on-page filters in the URL are honored.\n- **By listing URL** — Detail mode only: paste Urbania listing URLs to fetch specific properties.",
                        "default": "byPlace"
                    },
                    "operation": {
                        "title": "🏷️ Operation",
                        "enum": [
                            "sale",
                            "rent",
                            "transfer",
                            "temporary"
                        ],
                        "type": "string",
                        "description": "🏷️ Listing operation for **By place** searches: **Sale** (venta), **Rent** (alquiler), **Transfer** (traspaso) or **Temporary** (temporal).",
                        "default": "sale"
                    },
                    "sort": {
                        "title": "↕️ Sort",
                        "enum": [
                            "relevance",
                            "low_price",
                            "high_price",
                            "more_recent",
                            "most_visit",
                            "most_lowered_price"
                        ],
                        "type": "string",
                        "description": "↕️ Result ordering: relevance, lowest/highest price, most recent, most visited, or most price-reduced.",
                        "default": "relevance"
                    },
                    "searchUrls": {
                        "title": "🔗 Search URLs",
                        "type": "array",
                        "description": "🔗 Urbania search-results URLs to scrape. Used when **Search by = By search URL**.\n\n**TIP:** Build any search on urbania.pe (set your area, sale/rent, filters), then copy the URL from the address bar — the operation and on-page filters are honored.\n\n**BULK EDIT:** Click \"Bulk edit\" to paste many URLs, one per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "listingUrls": {
                        "title": "🆔 Listing URLs",
                        "type": "array",
                        "description": "🆔 **Detail mode only.** Urbania listing URLs (e.g. https://urbania.pe/inmueble/clasificado/...-146979649.html).\n\n**BULK EDIT:** Click \"Bulk edit\" to paste many URLs, one per line.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "🔢 Max results",
                        "minimum": 1,
                        "type": "integer",
                        "description": "🔢 Maximum listings to extract this run.\n\n- **FREE tier:** capped at 25 listings per run.\n- **PAID tier:** unlimited — set as high as you need.",
                        "default": 100
                    },
                    "minPrice": {
                        "title": "💰 Min price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "💰 Optional. Minimum price filter (By place mode). Pair with **Currency filter** to set the currency."
                    },
                    "maxPrice": {
                        "title": "💰 Max price",
                        "minimum": 0,
                        "type": "integer",
                        "description": "💰 Optional. Maximum price filter (By place mode). Pair with **Currency filter** to set the currency."
                    },
                    "currencyFilter": {
                        "title": "💱 Currency filter",
                        "enum": [
                            "PEN",
                            "USD"
                        ],
                        "type": "string",
                        "description": "💱 Optional. Currency the price filters apply to: PEN (soles) or USD. Urbania returns both currencies on every listing regardless."
                    },
                    "minArea": {
                        "title": "📐 Min area (m²)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "📐 Optional. Minimum surface area in m² (By place mode)."
                    },
                    "minRooms": {
                        "title": "🛏️ Min bedrooms",
                        "minimum": 0,
                        "type": "integer",
                        "description": "🛏️ Optional. Minimum number of bedrooms (By place mode)."
                    },
                    "propertyType": {
                        "title": "🏠 Property type ID",
                        "type": "string",
                        "description": "🏠 Optional. Urbania property-type ID(s) for By place searches (e.g. departamentos, casas). Leave blank for all types."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
