# KW Portugal Scraper (`dadhalfdev/kw-portugal-scraper`) Actor

Scrape Keller Williams Portugal homes. Use location, price, rooms, property type, and sort, or paste a search URL — the URL wins when set.

- **URL**: https://apify.com/dadhalfdev/kw-portugal-scraper.md
- **Developed by:** [Marco Rodrigues](https://apify.com/dadhalfdev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## 🏠 KW Portugal Scraper

Want [KW Portugal](https://www.kwportugal.pt/pt/imoveis) homes in a spreadsheet? This scraper makes it easy.

Use **structured filters** — better for AI agents — **or** paste an **`input_url`**. When `input_url` is set it overrides the filters.

Keller Williams Portugal lists homes for sale and rent: the price, rooms, size, parish, photos, and the agency on each card.

### 💡 Perfect for...

- **Sale and rent comps:** Price in euro, rooms, bathrooms, and square meters for a district or parish.
- **Area sweeps:** Lisboa, Sintra, Porto, and the other places the site can search.
- **Listing detail:** Business, typology, energy class, photo count, agent, and agency.
- **🤖 AI Agents:** Power Claude, Cursor, Codex, the Hermes Agent, and OpenClaw workflows with live KW Portugal results.
- **📚 RAG Systems:** Feed the useful fields into retrieval pipelines.
- **🔗 AI Workflows:** Plug into LangChain, AutoGPT, CrewAI, and similar stacks.

### ✨ Why you'll love this scraper

- 🔗 **Input URL or Filters:** Paste a KW Portugal search page, or set the filters below. `input_url` always wins when set.
- 🎯 **Website-Matched Filters:** Location, business, property type, rooms, bathrooms, price, area, pool, parking, terrace, lift, luxury, and sort.
- 🌐 **Home rows:** The price, rooms, size, parish, photos, and agency shown on the listing.

### 📦 What's inside the data?

`id`, `url`, `reference`, `title`, `price`, `currency`, `business`, `property_type`, `subtype`, `typology`, `district`, `municipality`, `parish`, `rooms`, `bathrooms`, `parking`, `area_m2`, `land_area_m2`, `energy_class`, `floor`, `luxury`, `photos`, `photo_count`, `listed_at`, `agent`, `agency`

### 🚀 Quick start

**Option A:** paste `https://www.kwportugal.pt/pt/imoveis`.
**Option B:** set location, business, property type, rooms, price, and sort, then set `max_results`.

**Input Example (filters):**

```json
{
  "location": "Sintra",
  "business": "venda",
  "property_type": "apartamento",
  "rooms": 1,
  "price_max": 300000,
  "sort": "newest",
  "max_results": 100
}
```

**Input Example (URL):**

```json
{
  "input_url": "https://www.kwportugal.pt/pt/imoveis",
  "max_results": 100
}
```

**Output Example:**

```json
{
  "id": "84998",
  "url": "https://www.kwportugal.pt/pt/Imovel/Venda/Apartamento/Lisboa/Sintra/Agualva-e-Mira-Sintra/84998/KWPT-042145",
  "reference": "KWPT-042145",
  "title": "T1 em Agualva",
  "price": 236000,
  "currency": "EUR",
  "business": "Venda",
  "property_type": "Apartamento",
  "subtype": null,
  "typology": "T1",
  "district": "Lisboa",
  "municipality": "Sintra",
  "parish": "Agualva e Mira-Sintra",
  "rooms": 1,
  "bathrooms": 1,
  "parking": 0,
  "area_m2": 49,
  "land_area_m2": null,
  "energy_class": null,
  "floor": null,
  "luxury": false,
  "photos": [],
  "photo_count": 1,
  "listed_at": "2026-11-14T12:00:02",
  "agent": null,
  "agency": null
}
```

**Output fields:**

| Field | Description |
|-------|-------------|
| `id` | Listing id. |
| `url` | Public property page. |
| `reference` | KW reference. |
| `title` | Title on the listing. |
| `price` | Sale or rent price. Rent uses the rent amount. |
| `currency` | `EUR` when a price is shown. |
| `business` | Venda, Arrendamento, or Trespasse. |
| `property_type` | Apartamento, moradia, terreno, and the other types. |
| `subtype` | More specific type when the listing has one. |
| `typology` | T0, T1, T2, and similar. |
| `district` | District. |
| `municipality` | Municipality. |
| `parish` | Parish. |
| `rooms` | Rooms. |
| `bathrooms` | Bathrooms. |
| `parking` | Parking places. |
| `area_m2` | Built area in square meters. |
| `land_area_m2` | Land area in square meters. |
| `energy_class` | Energy class. |
| `floor` | Floor. |
| `luxury` | Whether the listing is marked luxury. |
| `photos` | Photo URLs. |
| `photo_count` | How many photos the listing has. |
| `listed_at` | When the listing was created, as an ISO date. |
| `agent` | Agent name. |
| `agency` | Agency name. |

A search with no matching homes finishes successfully and leaves the dataset empty.

### 📋 Input reference

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `input_url` | string | No | - | KW Portugal search page. Overrides every filter. |
| `location` | string | No | - | District, municipality, or parish, such as Lisboa or Sintra. Blank is all of Portugal. |
| `business` | string | No | - | venda, arrendamento, or trespasse. Blank is every business. |
| `property_type` | string | No | - | Apartamento, moradia, terreno, loja, escritório, armazém, garagem, prédio, or arrecadação. Blank is every type. |
| `rooms` | integer | No | - | Minimum number of rooms. |
| `bathrooms` | integer | No | - | Minimum number of bathrooms. |
| `price_min` | integer | No | - | Lowest price in euro. |
| `price_max` | integer | No | - | Highest price in euro. |
| `area_min` | integer | No | - | Smallest built area in square meters. |
| `area_max` | integer | No | - | Largest built area in square meters. |
| `pool` | boolean | No | false | Only homes with a pool. |
| `parking` | boolean | No | false | Only homes with parking. |
| `terrace` | boolean | No | false | Only homes with a terrace. |
| `lift` | boolean | No | false | Only homes with a lift. |
| `luxury` | boolean | No | false | Only luxury homes. |
| `sort` | string | No | newest | newest, oldest, price-asc, price-desc, area-asc, area-desc, rooms-asc, or rooms-desc. |
| `max_results` | integer | No | `50` | How many rows to return (1-2000). |

### 🔧 Custom scrapers and agents

If you need a custom web scraper, or custom AI agents and workflows, contact me through [tuik.ai](https://www.tuik.ai). We help businesses cut costs and time by up to 10x.

# Actor input Schema

## `input_url` (type: `string`):

Paste a KW Portugal search page. Overrides every filter when set.

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

District, municipality, or parish, such as Lisboa, Sintra, or Agualva. Leave blank for all of Portugal.

## `business` (type: `string`):

venda, arrendamento, or trespasse. Leave blank for every business.

## `property_type` (type: `string`):

Apartamento, moradia, terreno, loja, escritório, armazém, garagem, prédio, or arrecadação. Leave blank for every type.

## `rooms` (type: `integer`):

Keep homes with at least this many rooms.

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

Keep homes with at least this many bathrooms.

## `price_min` (type: `integer`):

Price at or above this amount in euro.

## `price_max` (type: `integer`):

Price at or below this amount in euro.

## `area_min` (type: `integer`):

Built area at or above this size.

## `area_max` (type: `integer`):

Built area at or below this size.

## `pool` (type: `boolean`):

Only homes with a pool.

## `parking` (type: `boolean`):

Only homes with parking.

## `terrace` (type: `boolean`):

Only homes with a terrace.

## `lift` (type: `boolean`):

Only homes with a lift.

## `luxury` (type: `boolean`):

Only luxury homes.

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

newest, oldest, price-asc, price-desc, area-asc, area-desc, rooms-asc, or rooms-desc.

## `max_results` (type: `integer`):

Maximum rows to return (1–2000).

## Actor input object example

```json
{
  "sort": "newest",
  "max_results": 10
}
```

# Actor output Schema

## `overview` (type: `string`):

Table view of scraped homes using the dataset overview view.

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

All scraped homes from the default dataset without view transformation.

# 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 = {
    "max_results": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("dadhalfdev/kw-portugal-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 = { "max_results": 10 }

# Run the Actor and wait for it to finish
run = client.actor("dadhalfdev/kw-portugal-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 '{
  "max_results": 10
}' |
apify call dadhalfdev/kw-portugal-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dadhalfdev/kw-portugal-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/eDiPbMdTLFoKro3xA/builds/Orxc0fOf2sxSnXTYb/openapi.json
