# Adondevivir Peru Property Listings Scraper (`automatic/adondevivir-pe-scraper`) Actor

Build sale and rental shortlists from Adondevivir (adondevivir.com, Peru). Compare asking prices in source currencies, including PEN, areas and locations; export listing links and stable IDs for inventory monitoring. Coverage depends on the listing.

- **URL**: https://apify.com/automatic/adondevivir-pe-scraper.md
- **Developed by:** [Philip Kirkbride](https://apify.com/automatic) (community)
- **Categories:** Real estate, Lead generation
- **Security:** Limited permissions
- **Stats:** 4 total users, 0 monthly users, 96.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 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

## Adondevivir Peru Property Listings Scraper

Build sale and rental shortlists from **Adondevivir, Peru** (`adondevivir.com`). Compare asking prices, measured areas and locations, then export listing links and stable IDs for inventory monitoring. Prices retain the source currency, including **PEN** and **USD**. This record searches Peru only.

### Quick Start

Start with a small rental search:

```json
{"portal":"adondevivir","operation":"rental","propertyType":"departamentos","location":"miraflores","maxPages":2,"maxResults":10}
```

An empty input searches apartments for sale across Peru, with a **3-page budget** and a **50-result cap**. These are limits, not promised result counts. Narrow the location or property type before increasing them.

### Use cases

- **Sale and rental shortlists:** compare asking prices and measured property characteristics without confusing a development with an individual unit.
- **Inventory monitoring:** compare separate runs using `listingKey`; collection time is not a publication date or proof of a price change.
- **District comparisons:** group by source-labelled locations, keep currencies separate and distinguish total, built and covered areas.

These are possible uses, not claims of customer adoption, complete market coverage or confirmed availability.

### What it returns

- **Identity:** `id`, `listingKey`, `url` and `name` (the listing title). Join and deduplicate by `listingKey`, not the bare ID.
- **Prices:** `price` and `currency` retain the primary displayed asking price. `prices` preserves source amounts and currencies for the same offer, with each entry's `operation`. No exchange rate is inferred. `isStartingPrice` marks a starting price when identifiable; it is not an exact unit quote.
- **Property or development:** `postingType` and `isDevelopment` distinguish source posting kinds. A development can describe several units; it does not establish which individual units are available.
- **Measurements:** `areaM2`, `bedrooms`, `bathrooms`, `rooms` and `parkings` are optional. `areaM2Min` / `areaM2Max` and `bedroomsMin` / `bedroomsMax` preserve ranges. For ranged projects, scalar `areaM2` and `bedrooms` are `null`, not an upper bound disguised as one unit.
- **Distinct areas:** `totalAreaM2`, `builtAreaM2` and `coveredAreaM2` keep source-labelled measurements separate. One measurement is not substituted for another.
- **Area comparisons:** `pricePerM2` is numeric only when a finite positive price and an exact measured area describe the same offer. Read `pricePerM2Currency`, `pricePerM2AreaBasis` and `pricePerM2AreaM2` with it. It is `null` for projects or ambiguous price/area combinations; a project minimum price is never divided by its maximum area.
- **Location:** `address`, `streetAddress` and `addressVisibility` reflect the location precision actually supplied. `locationHierarchy` retains source names; `locationDetails` retains typed names and IDs; `normalizedLocation` provides `country`, `region`, `province`, `city` and `district` only where the source supports that mapping. Repeated place names do not establish missing administrative levels.
- **Optional listing information:** `imageUrl`, `photos`, `features`, `description`, `publisher`, `publisherName`, `publisherPhone`, `publisherUrl`, `logoUrl`, `expensesAmount`, `expensesCurrency`, `antiquity`, `hasVideo`, `hasTour`, `status` and `postingCode`. Description and detail coverage is **not guaranteed** and is often absent. Contacts are returned only as usable public values; otherwise they are `null`. No hidden contact or exact-address coverage is promised.
- **Dates and scope:** `collectedAt` is the actual UTC run observation time. `modifiedAt` is a source modification value when supplied; `postedAt` is a source publication date when supplied. Neither is inferred from collection time. `operation`, `propertyType` and `location` describe the requested search scope; `queryProvenance` identifies the canonical public search URL(s). `portal`, `country` and `source` identify Adondevivir / PE / adondevivir.com.

Unavailable optional values remain `null`, not invented zeroes or empty contact placeholders. Collections can be empty where there are no usable entries. A listing may have no quoted price. Asking prices, addresses and status can change; verify the listing before making a decision.

### Input

| Input | Default / accepted values | Meaning |
| --- | --- | --- |
| `portal` | `adondevivir` only | Fixed record identity; a different portal is rejected. |
| `operation` | `sale`; or `rental` | Sale / venta or rent / alquiler. |
| `propertyType` | `departamentos`; also `casas`, `terrenos`, `oficinas`, `locales-comerciales` | Apartments, houses, land, offices or retail. PH is not supported on this record. |
| `location` | empty | Peru location slug, for example `miraflores` or `santiago-de-surco`. Spaces become hyphens; accents are folded. Empty searches the whole country. Unknown locations fail rather than returning unrelated scope. |
| `priceMin`, `priceMax` | omitted | Positive integer budget bounds applied by the **source search**; minimum must not exceed maximum. |
| `currency` | omitted; `PEN` or `USD` with budget bounds | With bounds, omitted currency means PEN. Currency-only input is rejected. This is **not output conversion**. |
| `startUrls` | `[]`; up to 10 | Optional Adondevivir public listing-search URLs instead of scalar search settings. See the batch example below. |
| `bedroomsMin`, `bedroomsMax` | omitted | Integer bedroom bounds, zero or greater. |
| `bathroomsMin`, `bathroomsMax` | omitted | Integer bathroom bounds, zero or greater. |
| `areaMinM2`, `areaMaxM2` | omitted | Finite, strictly positive area bounds in square metres. |
| `areaBasis` | `total`; or `built`, `covered` | Measured area to use for the area filters; it does not choose the output price-per-area basis. |
| `includeDevelopments` | `true` | Set `false` to exclude development/project postings. |
| `maxPages` | `3`; from `1` to `20` | One **global page budget** across the batch, not a fresh budget for each URL. |
| `maxResults` | `50`; from `1` to `200` | One global cap on unique matching listings. |

Bedroom, bathroom, area and development filters are applied **after reading listings, before saving or charging for results**. Requested measurement filters exclude missing, ambiguous or ranged values; ranges do not qualify as one exact unit. Every minimum must be at most its matching maximum. Filtering may leave fewer results than requested within the page budget.

Budget bounds use the source's search semantics. The first displayed amount can have a different currency from the budget, especially on dual-currency listings. Do not re-check a PEN budget by comparing it directly with a displayed USD amount, or assume every displayed amount was converted to the selected currency. Use `prices` and its operation labels for comparisons; no foreign-exchange conversion is provided.

`keyword`, `sort`, `includeDetails` and structured `searches` inputs are not supported and are rejected. There is **no newest-first guarantee** and no detail-page completeness guarantee.

### Example queries

**Source-applied rental budget, in PEN:**

```json
{"portal":"adondevivir","operation":"rental","propertyType":"departamentos","location":"miraflores","priceMin":1500,"priceMax":4500,"currency":"PEN","maxPages":3,"maxResults":20}
```

**Individual-property shortlist using measured area and bedroom filters:**

```json
{"portal":"adondevivir","operation":"sale","propertyType":"departamentos","location":"santiago-de-surco","bedroomsMin":2,"bathroomsMin":2,"areaMinM2":90,"areaBasis":"total","includeDevelopments":false,"maxPages":3,"maxResults":20}
```

**Two overlapping rental searches, one global budget:**

```json
{"portal":"adondevivir","startUrls":["https://www.adondevivir.com/departamentos-en-alquiler-en-miraflores.html",{"url":"https://www.adondevivir.com/departamentos-en-alquiler.html"}],"includeDevelopments":false,"maxPages":3,"maxResults":50}
```

Use HTTPS public Adondevivir listing-search URLs, not listing-detail pages or another website. URL strings and objects containing `url` are accepted. Only supported property, operation, location, pagination and budget facets are accepted; unrecognized controls, custom ports and embedded credentials are rejected. Tracking, keyword and sort controls are not accepted.

With `startUrls`, preferably omit scalar `operation`, `propertyType`, `location`, price bounds and `currency`. The form's injected `operation: sale`, `propertyType: departamentos` and empty location defaults are allowed; URLs supply the actual search scope. Supplied nondefault scalar predicates must agree exactly with every URL; conflicting values are rejected rather than overriding URL scope. Measurement filters, development exclusion and global limits can still be combined with URLs. Overlapping searches return each `listingKey` only once. Later searches can remain unvisited if the global page or result cap is reached.

### Output example

Dated reference: [captured-source example, 2026-10-14](examples/captured-source-rental-2026-10-14.json).

```json
{
  "id": "142329947",
  "listingKey": "adondevivir.com:142329947",
  "url": "https://www.adondevivir.com/propiedades/clasificado/alclapin-alquilo-moderno-flat-amoblado-o-sin-muebles-de-92-142329947.html",
  "name": "Alquilo Moderno Flat Amoblado o Sin Muebles de 92 m², 3 Habitaciones y 2 Cocheras Lineal",
  "price": 3800.0,
  "currency": "PEN",
  "areaM2": 92.0,
  "rooms": null,
  "bedrooms": 3,
  "bathrooms": 2,
  "parkings": 2,
  "address": "calle mendiburu 260",
  "publisher": null,
  "postedAt": null,
  "imageUrl": "https://img10.naventcdn.com/avisos/111/00/04/67/34/64/360x266/1634241053.jpg",
  "description": "Se alquila con muebles O sin muebles. Visitas al. Este moderno departamento, cuenta con 3 habitaciones, 2 baños, ubicado en un 4to piso, totalmente amoblado, equipado y súper iluminado. $1, 150 a tratar. Distribución:1 habitación principal con closet y baño incorporado. 1 habitación secundaria con closet. 1 habitación secundaria con closet. Baño completo de visita. Sala con balcón y con mueble, tv. Comedor de 6 sillas. Amplia cocina abierta con muebles altos y bajos. Cocina y campana empotrada. Área de lavandería con lavaseca. Gas Natural. Seguridad 24/7 horas. 2 cocheras lineal. Antigüedad:de 6 años. Mantenimiento:S/. 450 aprox. Áreas comunes. Área de parrilla. Ubicación:Se encuentra en la cdra 2 de la Calle Mendiburu, a unos minutos del Óvalo Gutierrez, a supermercados, restaurantes, bancos, colegios, etc. agente A cargo ivvy zea.",
  "publisherName": "INMOBILIARIA",
  "publisherPhone": null,
  "publisherUrl": "https://www.adondevivir.com/inmobiliarias/inmobiliaria_102376973-inmuebles.html",
  "logoUrl": "https://img10.naventcdn.com/empresas/111/00/51/04/90/95/130x70/logo_inmobiliaria_1789585847011.jpg",
  "photos": null,
  "streetAddress": "calle mendiburu 260",
  "addressVisibility": "EXACT",
  "locationHierarchy": [
    "Miraflores",
    "Lima",
    "Peru"
  ],
  "expensesAmount": null,
  "expensesCurrency": null,
  "features": {
    "Superficie total": {
      "value": "92",
      "measure": "m²",
      "minValue": null,
      "maxValue": null
    },
    "Superficie techada": {
      "value": "92",
      "measure": "m²",
      "minValue": null,
      "maxValue": null
    },
    "Dormitorios": "3",
    "Baños": "2",
    "Estacionamientos": "2",
    "Antigüedad": "6"
  },
  "antiquity": null,
  "hasVideo": null,
  "hasTour": null,
  "status": null,
  "postingCode": null,
  "modifiedAt": null,
  "postingType": "PROPERTY",
  "isDevelopment": false,
  "isStartingPrice": false,
  "totalAreaM2": 92.0,
  "builtAreaM2": null,
  "coveredAreaM2": 92.0,
  "areaM2Min": 92.0,
  "areaM2Max": 92.0,
  "bedroomsMin": 3,
  "bedroomsMax": 3,
  "prices": [
    {
      "amount": 3800.0,
      "currency": "PEN",
      "operation": "rental"
    }
  ],
  "pricePerM2": 41.30434782608695,
  "pricePerM2Currency": "PEN",
  "pricePerM2AreaBasis": "totalAreaM2",
  "pricePerM2AreaM2": 92.0,
  "locationDetails": [
    {
      "id": "V1-D-119497",
      "name": "Miraflores",
      "type": "ZONA"
    },
    {
      "id": "V1-C-3129",
      "name": "Lima",
      "type": "CIUDAD"
    },
    {
      "id": "V1-B-368",
      "name": "Lima",
      "type": "PROVINCIA"
    },
    {
      "id": "V1-A-11",
      "name": "Peru",
      "type": "PAIS"
    }
  ],
  "normalizedLocation": {
    "country": "Peru",
    "region": null,
    "province": "Lima",
    "city": "Lima",
    "district": "Miraflores"
  },
  "operation": "rental",
  "propertyType": "departamentos",
  "location": "miraflores",
  "portal": "adondevivir",
  "country": "PE",
  "source": "adondevivir.com",
  "collectedAt": "2026-10-15T00:13:23.506519+00:00",
  "queryProvenance": [
    {
      "searchIndex": 0,
      "operation": "rental",
      "propertyType": "departamentos",
      "location": "miraflores",
      "priceMin": null,
      "priceMax": null,
      "currency": null,
      "searchUrl": "https://www.adondevivir.com/departamentos-en-alquiler-en-miraflores.html",
      "matchedPages": [
        1
      ]
    }
  ]
}
```

This complete record is a dated reference captured from the source on 2026-10-14; it is not a production cloud-run claim. Its `collectedAt` is the reference extraction time, not a fresh source fetch. The capture date and original source hashes are retained in the [example provenance](examples/captured-source-rental-2026-10-14.provenance.json). Source `modifiedAt` and `postedAt`, when present, describe different events.

### Pricing recipes

Frozen Actor-event tariff at **512 MB**: **$0.0004 per saved result + $0.00005 per start**, in USD. The following are arithmetic scenarios, not observed bills or guaranteed yields:

| Scenario | Starts | Saved results | Actor-event calculation | Actor-event subtotal (USD) |
| --- | ---: | ---: | --- | ---: |
| Small trial | 1 | 10 | `1 * 0.00005 + 10 * 0.0004` | $0.00405 |
| Shortlist | 1 | 50 | `1 * 0.00005 + 50 * 0.0004` | $0.02005 |
| Maximum result cap | 1 | 200 | `1 * 0.00005 + 200 * 0.0004` | $0.08005 |
| Daily shortlist, 30 starts | 30 | 1500 | `30 * 0.00005 + 1500 * 0.0004` | $0.60150 |

For the 50-result scenario, set `maxResults: 50` and choose a page budget, for example `maxPages: 3`. Fifty is a target subject to source availability and filtering. For the daily scenario, 1500 assumes 50 saved results on each of 30 separate starts. Deduplication is per run; the same listing saved again in a later run is another result. The start event is included even if no result is saved. These subtotals exclude unrelated account-plan charges and any separately billed services; they are not a total account-cost estimate.

### Inicio rapido en espanol

Este Actor busca solo en **Adondevivir, Peru**. Para empezar con alquileres en Miraflores:

```json
{"operation":"rental","propertyType":"departamentos","location":"miraflores","maxPages":2,"maxResults":10}
```

- **Venta** = `sale`; **alquiler** = `rental`; **departamentos**, **casas**, **terrenos**, **oficinas** y **locales-comerciales** son los tipos disponibles.
- El presupuesto se aplica en la busqueda de origen: `priceMin`, `priceMax` y `currency` (`PEN` o `USD`). Si hay limites y se omite la moneda, se usa PEN. La moneda mostrada en cada aviso no se convierte.
- `bedroomsMin` = dormitorios minimos; `bathroomsMin` = banos minimos; `areaMinM2` = superficie minima en m2. `areaBasis` distingue superficie total, construida y cubierta. Los datos ausentes o rangos no cumplen un filtro de medida exacta.
- `includeDevelopments: false` excluye proyectos. Un precio "desde" no es una cotizacion de una unidad concreta.
- Por defecto: hasta 3 paginas y 50 resultados; limites maximos: 20 paginas y 200 resultados por ejecucion, compartidos entre todas las URLs. No se garantiza llegar a esa cantidad.
- Los contactos y las descripciones pueden ser `null`. Revise el aviso original; los precios y la disponibilidad pueden cambiar.

### FAQ

**Is this a complete export of Peru's housing market?** No. Only available public listings within the requested search and budgets are considered. Duplicate, unavailable or unverifiable listings and requested filters can reduce coverage.

**Is a capped run complete?** No. The run's `SUMMARY` distinguishes coverage: `complete` means every requested source search was exhausted; `truncated` means a global result, page or request budget stopped traversal. A SUCCEEDED run can still be honestly truncated, and an unvisited batch search is not complete. Filters can reduce the count further.

**What happens if a later page fails or changes scope?** A blocked, unreadable or off-scope fetched page fails the run. Results are held until all fetched-scope checks succeed, so earlier pages are not released as a paid partial dataset. Optional missing fields alone are not a page failure. Reaching a configured cap is different from a fetch or scope failure.

**Can a failed run contain saved results?** Collection and validation failures happen before saving. A failure while saving is different: some records may already have been accepted. `SUMMARY.phase` is then `PUBLICATION_UNCERTAIN` and `emitted` is `null`; inspect the dataset before restarting. An unusually large result buffer or an item/charge limit below the buffered count is rejected before saving, rather than silently splitting or clipping the requested results. Lower `maxResults` or choose a compatible run limit.

**How fresh is a listing?** `collectedAt` records when it was observed, not when it was created, verified available or last changed. Source ordering is not guaranteed to be newest-first.

For help, use this Actor's issue/support option and include the run ID and requested search, without private credentials or personal contact data.

# Actor input Schema

## `portal` (type: `string`):

This record searches only Adondevivir (adondevivir.com, Peru). Omit this input or use adondevivir; a different portal is rejected.

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

Listing operation to search: sale or rental. With startUrls, leave this at sale; each URL supplies its own operation.

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

Property type to search on Adondevivir in Peru. Choose one of this record's supported property types.

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

Optional Peru location slug, for example "miraflores" or "santiago-de-surco". Spaces become hyphens and accents are folded. Empty searches the whole country. An unknown or changed location scope fails the run instead of returning unrelated listings.

## `priceMin` (type: `integer`):

Optional positive integer lower budget applied by the source search, in currency (PEN if omitted). Not a comparison against the first displayed price. Must not exceed priceMax.

## `priceMax` (type: `integer`):

Optional positive integer upper budget applied by the source search, in currency (PEN if omitted). Not a comparison against the first displayed price. Must be at least priceMin.

## `currency` (type: `string`):

PEN or USD for supplied price bounds only; omit with no bounds. PEN is used when bounds are set without currency. Currency-only input is rejected. Returned prices keep their source currencies; no conversion is performed.

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

Up to 10 HTTPS public Adondevivir listing-search URLs, as a URL string or {"url": "..."} object. Empty uses ordinary inputs. Nondefault scalar operation/propertyType, location, price bounds or currency must agree exactly with every URL; conflicting values are rejected. Leave operation=sale and propertyType=departamentos (including form defaults). Only supported property, operation, location, pagination and budget facets are accepted; arbitrary query controls and other sites are rejected. Page/result caps are global across the batch; duplicates are returned once.

## `bedroomsMin` (type: `integer`):

Optional minimum bedrooms, zero or greater. Applied after reading listings, before results are saved. Missing or ranged bedroom values are excluded. Must not exceed bedroomsMax.

## `bedroomsMax` (type: `integer`):

Optional maximum bedrooms, zero or greater. Applied after reading listings, before results are saved. Missing or ranged bedroom values are excluded. Must be at least bedroomsMin.

## `bathroomsMin` (type: `integer`):

Optional minimum bathrooms, zero or greater. Applied after reading listings, before results are saved. Missing or ambiguous bathroom values are excluded. Must not exceed bathroomsMax.

## `bathroomsMax` (type: `integer`):

Optional maximum bathrooms, zero or greater. Applied after reading listings, before results are saved. Missing or ambiguous bathroom values are excluded. Must be at least bathroomsMin.

## `areaMinM2` (type: `number`):

Optional finite positive minimum area in square metres (strictly greater than zero). Uses areaBasis. Applied after reading listings; missing, ambiguous or ranged measurements are excluded. Must not exceed areaMaxM2.

## `areaMaxM2` (type: `number`):

Optional finite positive maximum area in square metres (strictly greater than zero). Uses areaBasis. Applied after reading listings; missing, ambiguous or ranged measurements are excluded. Must be at least areaMinM2.

## `areaBasis` (type: `string`):

Select total, built or covered source-labelled area for areaMinM2/areaMaxM2. Measurements are not substituted for one another. This does not select the pricePerM2 calculation basis; read that output's companions.

## `includeDevelopments` (type: `boolean`):

Include development/project postings by default. Set false to exclude developments after reading listings, before results are saved. Projects are not individual-unit availability; their prices may be starting prices and their measurements may be ranges.

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

Global search-page budget, 1 to 20 (default 3), shared across all search URLs. Reaching the budget may leave searches unvisited. A page does not guarantee a fixed number of usable matches.

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

Global cap on unique matching listings, 1 to 200 (default 50). A target, not a guaranteed count; availability, page budget and post-read filters can reduce the result count.

## `requestDelaySecs` (type: `number`):

Delay between search-page requests, from 0.5 to 10 seconds (default 1).

## Actor input object example

```json
{
  "portal": "adondevivir",
  "operation": "sale",
  "propertyType": "departamentos",
  "location": "",
  "startUrls": [],
  "areaBasis": "total",
  "includeDevelopments": true,
  "maxPages": 3,
  "maxResults": 50,
  "requestDelaySecs": 1
}
```

# Actor output Schema

## `results` (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 = {
    "portal": "adondevivir",
    "operation": "sale",
    "propertyType": "departamentos",
    "location": "",
    "startUrls": [],
    "areaBasis": "total",
    "includeDevelopments": true,
    "maxPages": 3,
    "maxResults": 50,
    "requestDelaySecs": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("automatic/adondevivir-pe-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 = {
    "portal": "adondevivir",
    "operation": "sale",
    "propertyType": "departamentos",
    "location": "",
    "startUrls": [],
    "areaBasis": "total",
    "includeDevelopments": True,
    "maxPages": 3,
    "maxResults": 50,
    "requestDelaySecs": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("automatic/adondevivir-pe-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 '{
  "portal": "adondevivir",
  "operation": "sale",
  "propertyType": "departamentos",
  "location": "",
  "startUrls": [],
  "areaBasis": "total",
  "includeDevelopments": true,
  "maxPages": 3,
  "maxResults": 50,
  "requestDelaySecs": 1
}' |
apify call automatic/adondevivir-pe-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,automatic/adondevivir-pe-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/A1gdcuA0UV3j9WUWC/builds/lqUDcnlzgpvfbqT3z/openapi.json
