# Chaves na Mão Scraper: Imóveis à Venda e para Alugar (`automatic/chavesnamao-br-scraper`) Actor

Chaves na Mão property listings for sale and rent anywhere in Brazil: price, condomínio, IPTU, m², bedrooms, parking, full description, map point when the address is public, agency or owner name and phone, CRECI, photos and dates. Up to 10,000 listings per run. Start with {} for a quick sample.

- **URL**: https://apify.com/automatic/chavesnamao-br-scraper.md
- **Developed by:** [Philip Kirkbride](https://apify.com/automatic) (community)
- **Categories:** Real estate
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.65 / 1,000 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/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

## Chaves na Mão Scraper: Imóveis à Venda e para Alugar

Turn any Chaves na Mão search into a clean spreadsheet of **imóveis à venda e para alugar** anywhere in Brazil: apartamentos, casas, casas em condomínio, coberturas, terrenos, salas comerciais, galpões, chácaras and more, from one neighbourhood to a whole state. Type a place like `Pinheiros, São Paulo, SP`, or paste the search link you already built on chavesnamao.com.br with every filter kept, and press Start. Collect **up to 10,000 listings in one run**, saved as they arrive, with no account and no code.

Every listing is one tidy row: price, **condomínio** and **IPTU**, m² (útil and total), quartos, banheiros, suítes, vagas, the **full description**, unit and building features, nearby bus stops, metro, schools and shops, street, number and CEP when the advertiser publishes them, **exact map coordinates** for public addresses, who advertises it (agency or private owner) with the **phone and WhatsApp** the listing shows and the agency's CRECI, photos, and the dates the listing was posted and last changed.

Press Start on the ready-made form for a quick 20-listing sample from Pinheiros, São Paulo.

### Use cases

- **Pricing comps and valuations.** Asking price, price per m², condomínio and IPTU for every comparable in a neighbourhood.
- **Investor deal flow.** Screen new developments (lançamentos) with their price ranges, or resale apartments under a budget, city by city.
- **Agency lead lists and market share.** Which imobiliárias advertise where, with CRECI, profile link and phone on every listing.
- **Direto com o proprietário.** Homes listed by their owners, with the owner's phone and WhatsApp as the listing shows them.
- **New-listing and price-change monitoring.** Turn on monitor mode and schedule a daily run: the first run delivers the current listings, every later run delivers only the properties that are new or changed price since the last one, and you pay only for those.
- **Rental market reports.** Rents with condomínio and IPTU by neighbourhood, ready for Excel, Google Sheets or BI.
- **Maps and location models.** Exact coordinates plus nearby transit and services for distance and accessibility studies.

### What you get

- **Prices in reais:** `price` (asking price for sales, monthly rent for rentals), `priceMax` and `isStartingPrice` for developments sold from a starting price, `condoFee`, `iptu`, `totalMonthlyCost` for rentals (rent + condomínio + IPTU, with `totalMonthlyCostBasis: "computed"`), `pricePerM2` and `prices`.
- **The property:** `propertyType` with `propertyTypeLabel`, `category` (home or commercial use), `areaUseful` and `areaTotal`, `bedrooms`, `bathrooms`, `suites`, `parkingSpaces` (each with `…Min` / `…Max` for developments sold in several sizes), `petsAllowed`, `acceptsTrade`, `unitFeatures`, `buildingFeatures`, `isNewDevelopment` and `developmentStage`.
- **Text:** `title`, the full `description` and the advertiser's `reference` code.
- **Where it is:** `street`, `streetNumber`, `zipCode` (CEP), `neighbourhood`, `city`, `state`, `addressVisibility`, `latitude` and `longitude`, and `nearby` places with their distance in metres.
- **Who advertises it:** `publisherName`, `publisherType` (`agency` or `owner`), `publisherUrl`, `publisherCreci`, `publisherVerified`, the advertiser's `publisherPhone`, `publisherPhones` and `publisherWhatsapp` (agencies and private owners alike), `phoneHiddenOnPage` (`true` when the advertiser keeps the phone button off the listing page), and the agency's Google rating where shown.
- **Photos and dates:** `photos`, `photoCount`, `videoUrl`, `postedAt`, `modifiedAt`.
- **Tracking:** `listingKey`, `id`, `url`, `searchUrl`, `position` and `collectedAt`.
- **Monitor mode only:** `changeType` (`new` or `price_change`), `isBaseline`, `previousPrice`, `priceChangePct`, `firstSeenAt`, `lastSeenAt` (null in a normal run).

Missing values are `null`, never invented zeroes.

### Input

Two ways to say what to search; you can combine them, up to 10 searches per run.

**1. Places (`locations`)** with **Buy or rent** (`operation`: `sale` or `rent`) and a **Property type** (`propertyType`, all types by default). Write the place with its state: `São Paulo, SP`, `Pinheiros, São Paulo, SP`, `Campinas, SP`, or just `MG` for a whole state. A misspelt or unknown place is skipped with a tip on how to write it, and your other searches still run; you pay only for the listings delivered.

**2. Search links (`startUrls`).** Set filters on chavesnamao.com.br and copy the address bar, for example `https://www.chavesnamao.com.br/apartamentos-para-alugar/sp-sao-paulo/pinheiros/?filtro=pmin:2000,pmax:5000,qua:2`. Every filter and the sort order in the link are kept on every page. A link with a setting this Actor cannot reproduce is skipped with a message naming that setting, never searched wider; the run summary lists every skipped search with its reason.

**Filters** (for places; with links they narrow the link further): `priceMin` / `priceMax` in R$, `bedroomsMin`, `bathroomsMin`, `parkingSpacesMin`, `areaMin` / `areaMax`.

**Run size:** `sortBy` (`newest` by default, `relevance`, `lowest-price`, `highest-price`, `smallest-area`, `largest-area`) and `maxResults` (default 100, up to 10,000 for the whole run).

**Monitor (optional):** `onlyNewSinceLastRun`, `includePriceChanges` and `stateKey`; see below.

### Example inputs

Two-bedroom rentals in Pinheiros between R$ 2,000 and R$ 5,000:

```json
{"locations": ["Pinheiros, São Paulo, SP"], "operation": "rent", "propertyType": "apartamentos", "bedroomsMin": 2, "priceMin": 2000, "priceMax": 5000, "maxResults": 300}
```

Houses for sale in three cities, cheapest first:

```json
{"locations": ["Campinas, SP", "Sorocaba, SP", "Jundiaí, SP"], "operation": "sale", "propertyType": "casas", "sortBy": "lowest-price", "maxResults": 3000}
```

A search pasted from the browser:

```json
{"startUrls": [{"url": "https://www.chavesnamao.com.br/coberturas-a-venda/rj-rio-de-janeiro/barra-da-tijuca/"}], "maxResults": 500}
```

### Output example

A real listing from a Pinheiros rental search, with lists and the description shortened.

**Selected fields only.**

```json
{
  "listingKey": "chavesnamao:47475395",
  "id": "47475395",
  "url": "https://www.chavesnamao.com.br/imovel/apartamento-para-alugar-2-quartos-sp-sao-paulo-pinheiros-RS2700/id-47475395/",
  "title": "Apartamento com 2 dormitórios para alugar, 68 m² por R$ 3.705,24/mês - Pinheiros - São Paulo/SP",
  "description": "ÓTIMA OPORTUNIDADE NA ZONA OESTE DE SÃO PAULO! Apartamento com 68 m², localizado no 3º andar, em uma das regiões mais desejadas de São Paulo. O imóvel conta com 2 dormitórios, 1 banheiro, sala, cozinha e lavanderia, …",
  "operation": "rent",
  "propertyType": "apartamentos",
  "propertyTypeLabel": "Apartamento",
  "reference": "AP3052",
  "price": 2700,
  "currency": "BRL",
  "condoFee": 812,
  "iptu": 193,
  "totalMonthlyCost": 3705,
  "totalMonthlyCostBasis": "computed",
  "pricePerM2": 39.71,
  "areaUseful": 68,
  "bedrooms": 2,
  "bathrooms": 1,
  "parkingSpaces": null,
  "petsAllowed": false,
  "unitFeatures": ["Área de serviço", "Cozinha", "Lavanderia", "Piso de cerâmica"],
  "nearby": [{"type": "bus-stop", "name": "Rua Teodoro Sampaio, 637", "distanceM": 60}],
  "street": "Rua Capote Valente",
  "streetNumber": "534",
  "zipCode": "05409-001",
  "neighbourhood": "Pinheiros",
  "city": "São Paulo",
  "state": "SP",
  "addressVisibility": "exact",
  "latitude": -23.557068,
  "longitude": -46.675902,
  "publisherName": "CLAUDIA ETZEL IMÓVEIS",
  "publisherType": "agency",
  "publisherUrl": "https://www.chavesnamao.com.br/imobiliaria/claudia-etzel-imoveis/id-1096236/",
  "photoCount": 16,
  "postedAt": "2026-10-07T00:19:04.000",
  "modifiedAt": "2026-10-16T00:04:03.000",
  "searchUrl": "https://www.chavesnamao.com.br/apartamentos-para-alugar/sp-sao-paulo/pinheiros/?filtro=pmin:2000,pmax:5000,qua:2,or:1",
  "position": 6,
  "collectedAt": "2026-11-15T04:05:00+00:00"
}
```

Download the dataset as JSON, CSV or Excel from the run page, or read it with the Apify API from Python, JavaScript, Zapier, Make or n8n. The **Listings**, **Agencies and owners** and **Location and features** views give ready-made tables.

### Pricing

Pay only for what you get: **$0.80 per 1,000 listings** (less on paid Apify plans, down to $0.65), plus a small start fee of **$0.0025 per GB of memory** for each run (the default 512 MB run is one start event, $0.0025). Listings left out by your filters are not charged. Set **Maximum cost per run** to cap any run; when the cap is reached the run stops cleanly and keeps every listing already saved.

### Monitor new listings and price changes

Save a task with `onlyNewSinceLastRun: true` and a `stateKey` (any name, such as `moema-apartments`), then schedule it, for example every morning. The first run for each search is the **baseline**: every current listing is delivered with `isBaseline: true` and `changeType: "new"`. Later runs deliver only listings not delivered before; with `includePriceChanges: true` they also deliver listings whose price changed, as `changeType: "price_change"` with `previousPrice` and `priceChangePct`. Listings delivered before are skipped and not charged.

```json
{"locations": ["Moema, São Paulo, SP"], "operation": "sale", "propertyType": "apartamentos", "onlyNewSinceLastRun": true, "includePriceChanges": true, "stateKey": "moema-apartments", "maxResults": 3000}
```

Each search keeps its own history, so adding a search gives it its own baseline. Changing a search's filters starts a new baseline for it; changing the order or `maxResults` does not. `maxResults` caps the listings delivered, and anything left out is delivered on the next run. Keep the default newest-first order, and run one job at a time per `stateKey`.

### Run summary

Each run writes an `OUTPUT` record next to the dataset: listings saved, pages read, listings left out by your filters, duplicates skipped, why the run stopped (for example `max-results` or `time-limit`) and one entry per search with Chaves na Mão's own count of matching listings, plus every search that was skipped and why.

### Good to know

- Chaves na Mão shows at most **3,000 listings per search** (100 pages). For bigger exports, add one search per neighbourhood, price band or property type (up to 10 per run); the same listing found twice is saved once.
- Only listings that match your search are returned. When a search runs out, the site goes on to show "similar" listings from nearby places or other types; those are left out.
- Street number, CEP and coordinates come only from advertisers who publish the full address (`addressVisibility: "exact"`); for the others they are `null`, never approximated.
- Phone and WhatsApp come with every listing that carries them, for agencies and private owners alike. When the advertiser keeps the phone button off the listing page, the number is still delivered and `phoneHiddenOnPage` is `true`, so you can respect that choice in your outreach. Owner names are shortened by the site (for example "Felipe F.").
- `postedAt` and `modifiedAt` are in Brazil local time, as the site gives them.
- Each listing row includes up to 5 preview photos in `photos`, while `photoCount` gives the listing's total photo count on the site.
- New-development (lançamentos) search pages cannot be pasted yet; developments still appear in normal sale searches, flagged with `isNewDevelopment`.
- `totalMonthlyCost` is filled for rentals only when rent, condomínio and IPTU are all listed; the site's own total is shortened on the cards, so it is computed from the three amounts.
- Monitor mode watches what the site shows for each search, at most 3,000 listings; a listing that drops out of that window and comes back later is not delivered again. A baseline cut short by `maxResults` carries on, still labelled `isBaseline: true`, on the next run.
- Allow about one minute per 1,000 listings. If the run time limit is reached, the run ends successfully with everything saved so far.

# Actor input Schema

## `locations` (type: `array`):

Places with their state, for example 'São Paulo, SP', 'Pinheiros, São Paulo, SP', 'Campinas, SP' or just 'MG' for a whole state. Up to 10 searches per run (locations plus search links). Leave both lists empty for a quick 20-listing sample.

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

Applies to the locations above. Search links keep their own choice.

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

Applies to the locations above.

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

Paste searches straight from chavesnamao.com.br, filters included, for example https://www.chavesnamao.com.br/apartamentos-para-alugar/sp-sao-paulo/pinheiros/?filtro=pmin:2000,pmax:5000,qua:2. Every filter in the link is kept on every page; a link with a setting this Actor cannot reproduce is skipped with a message naming that setting (never a wider search) and the other searches still run.

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

Asking price for sales, monthly rent for rentals.

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

Asking price for sales, monthly rent for rentals.

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

Only listings with at least this many bedrooms (quartos). Leave empty for any.

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

Only listings with at least this many bathrooms (banheiros). Leave empty for any.

## `parkingSpacesMin` (type: `integer`):

Only listings with at least this many parking spaces (vagas). Leave empty for any.

## `areaMin` (type: `integer`):

Smallest floor area in square metres. Leave empty for any.

## `areaMax` (type: `integer`):

Largest floor area in square metres. Leave empty for any.

## `sortBy` (type: `string`):

For the locations above; search links keep their own order. Newest first suits scheduled runs.

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

Total for the whole run, up to 10,000. Chaves na Mão shows at most 3,000 listings per search, so for more, add searches (one per neighbourhood or price range). Listings are saved as they arrive; allow about one minute per 1,000 listings.

## `onlyNewSinceLastRun` (type: `boolean`):

For scheduled runs. The first run for each search delivers every current listing as the baseline (isBaseline: true); later runs deliver only listings not delivered before, so you pay only for what is new. Requires stateKey. maxResults caps the listings delivered.

## `includePriceChanges` (type: `boolean`):

Works with Deliver only new listings. Also deliver a listing delivered before when its price (asking price for sales, rent for rentals) changed, with previousPrice and priceChangePct.

## `stateKey` (type: `string`):

Required for monitoring: a private name for this monitor, up to 128 characters, such as moema-apartments. Reuse it on every scheduled run. Each search keeps its own history; changing a search's filters starts a new baseline for it, changing the order or maxResults does not. One run at a time per name.

## Actor input object example

```json
{
  "locations": [
    "Pinheiros, São Paulo, SP"
  ],
  "operation": "sale",
  "propertyType": "imoveis",
  "sortBy": "newest",
  "maxResults": 20,
  "onlyNewSinceLastRun": false,
  "includePriceChanges": false
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "locations": [
        "Pinheiros, São Paulo, SP"
    ],
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automatic/chavesnamao-br-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 = {
    "locations": ["Pinheiros, São Paulo, SP"],
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automatic/chavesnamao-br-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 '{
  "locations": [
    "Pinheiros, São Paulo, SP"
  ],
  "maxResults": 20
}' |
apify call automatic/chavesnamao-br-scraper --silent --output-dataset

```

## MCP server setup

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