# Zap Imóveis scraper (`avorio/zap-imoveis-scraper`) Actor

Scrapes real estate listings from Zap Imóveis (Brazilian real estate platform)

- **URL**: https://apify.com/avorio/zap-imoveis-scraper.md
- **Developed by:** [Avorio](https://apify.com/avorio) (community)
- **Categories:** Real estate
- **Stats:** 187 total users, 0 monthly users, 100.0% runs succeeded, 13 bookmarks
- **User rating**: 1.00 out of 5 stars

## Pricing

Pay per usage

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

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Zap Imóveis Scraper

This scraper extracts detailed real estate listings from **Zap Imóveis**, allowing you to set multiple filters to refine your search. Supported filters include listing type (rentals or sales), city, state, price range, usable area range, unit type, usage (residential or commercial), and number of bedrooms. The scraper returns a structured, machine-readable dataset.

### Input Format

The input should be provided as a JSON object with the following structure:

```json
{
  "type": "RENTAL",
  "city": "São Paulo",
  "state": "São Paulo",
  "page": 1,
  "priceMin": 1000,
  "priceMax": 3000,
  "usableAreaMin": 50,
  "usableAreaMax": 200,
  "unitType": "APARTMENT",
  "unitUsage": "RESIDENTIAL",
  "bedrooms": ["1", "2"]
}
```

#### Input Fields

- **type** *(string, required)*: Type of listing.
  - **Options:** `"RENTAL"` (for rental listings), `"SALE"` (for properties for sale)
  - **Default:** `"RENTAL"`

- **city** *(string, required)*: The name of the city.
  - **Example:** `"São Paulo"`

- **state** *(string, required)*: The name of the state.
  - **Example:** `"São Paulo"`

- **page** *(integer, optional)*: The page number to start scraping from. The scraper will load data from this page onward.
  - **Default:** `1`
  - **Example:** `2`

- **priceMin** *(integer, optional)*: Minimum price range.
  - **Example:** `1000` for minimum monthly rent of 1000.

- **priceMax** *(integer, optional)*: Maximum price range.
  - **Example:** `3000` for maximum monthly rent of 3000.

- **usableAreaMin** *(integer, optional)*: Minimum usable area in square meters.
  - **Example:** `50` for at least 50 sqm.

- **usableAreaMax** *(integer, optional)*: Maximum usable area in square meters.
  - **Example:** `200` for up to 200 sqm.

- **unitType** *(string, optional)*: Type of property unit.
  - **Options:** `"ALLOTMENT_LAND"`, `"APARTMENT"`, `"BUILDING"`, `"BUSINESS"`, `"FARM"`, `"HOME"`, `"HOTEL"`, `"OFFICE"`, `"SHED_DEPOSIT_WAREHOUSE"`
  - **Example:** `"APARTMENT"`

- **unitUsage** *(string, optional)*: Intended usage of the unit.
  - **Options:** `"RESIDENTIAL"`, `"COMMERCIAL"`
  - **Default:** `"RESIDENTIAL"`
  - **Example:** `"COMMERCIAL"`

- **bedrooms** *(array of strings, optional)*: Number of bedrooms to filter by.
  - **Options:** `"1"`, `"2"`, `"3"`, `"4"` (where `"4"` represents 4 or more)
  - **Example:** `["1", "2"]` to filter properties with either 1 or 2 bedrooms.

### Example

The following example retrieves property listings for sale in Curitiba, Paraná, starting from page 1, priced between 500,000 and 1,000,000, with a usable area between 80 and 150 sqm, filtering only for residential apartments with 2 or 3 bedrooms:

```json
{
  "type": "SALE",
  "city": "Curitiba",
  "state": "Paraná",
  "page": 1,
  "priceMin": 500000,
  "priceMax": 1000000,
  "usableAreaMin": 80,
  "usableAreaMax": 150,
  "unitType": "APARTMENT",
  "unitUsage": "RESIDENTIAL",
  "bedrooms": ["2", "3"]
}
```

This setup will return a dataset of properties that match the specified criteria, enabling more targeted and refined searches.

### Output

Output will consist of an vector of JSON objects with the following keys:

- `listing`: probably where the information you are looking for is. Information related to the property (area, amenities, price, etc);
- `account` and `accountLink`: information related to the real estate agent (contact information and name);
- `link`: slug and metadata information;
- `medias`: vector of images for the listing.

More details on the output can be found in the example to follow.

#### Example Output

```json
[
  {
    "listing": {
      "contractType": "REAL_ESTATE",
      "sourceId": "69a675d7-73ee-37b6-be8c-99498907a04e",
      "displayAddressType": "ALL",
      "amenities": [
        "GYM",
        "BARBECUE_GRILL",
        "GOURMET_SPACE",
        "POOL",
        "PLAYGROUND",
        "PARTY_HALL",
        "DISABLED_ACCESS",
        "BICYCLES_PLACE",
        "COWORKING",
        "SPA",
        "ELEVATOR",
        "CONCIERGE_24H",
        "GATED_COMMUNITY",
        "ELECTRONIC_GATE",
        "PETS_ALLOWED",
        "AIR_CONDITIONING",
        "FURNISHED"
      ],
      "usableAreas": [
        107
      ],
      "constructionStatus": "ConstructionStatus_NONE",
      "listingType": "USED",
      "description": "O apartamento no bairro Centro tem 107 metros quadrados com 3 quartos sendo 2 suites e 2 banheiros Possui área de fitness, espaço gourmet, área verde de jardim, parquinho com diferentes brinquedos, salão para festas e eventos. Vai lhe possibilitar curtir os dias mais quentes na piscina, praticar diversos esportes na quadra poliesportiva, todo o conforto do ar condicionado nos dias mais quentes.Churrasqueira para você aproveitar nos momentos de descontração. Elevador que garante o transporte das suas malas e compras. Encontra-se em um condomínio protegido por muros. É mobiliado.",
      "title": "Apartamento para alugar tem 107 metros quadrados com 3 quartos em Centro - Curitiba - PR",
      "stamps": [],
      "createdAt": "2024-10-11T21:29:34.969+00:00",
      "floors": [],
      "unitTypes": [
        "APARTMENT"
      ],
      "nonActivationReason": "NonActivationReason_NONE",
      "providerId": "",
      "propertyType": "UNIT",
      "unitSubTypes": [],
      "unitsOnTheFloor": 0,
      "legacyId": "",
      "id": "2748770504",
      "portal": "GRUPOZAP",
      "unitFloor": 10,
      "parkingSpaces": [
        2
      ],
      "updatedAt": "2024-10-11T23:06:57.247+00:00",
      "address": {
        "city": "Curitiba",
        "neighborhood": "Centro",
        "street": "Rua Mariano Torres",
        "streetNumber": "(redacted)",
        "point": {
          "lat": -25.431307,
          "lon": -49.261889,
          "source": "GOOGLE"
        },
        "stateAcronym": "PR"
      },
      "suites": [
        2
      ],
      "publicationType": "PREMIUM",
      "externalId": "1F4528C3",
      "bathrooms": [
        2
      ],
      "usageTypes": [
        "RESIDENTIAL"
      ],
      "totalAreas": [],
      "advertiserId": "d5193cc8-51ff-2b76-7b59-652159b5361b",
      "advertiserContact": {
        "chat": "",
        "phones": [
          "(redacted)"
        ]
      },
      "whatsappNumber": "(redacted)",
      "bedrooms": [
        3
      ],
      "acceptExchange": false,
      "pricingInfos": [
        {
          "businessType": "RENTAL",
          "yearlyIptu": 0,
          "price": 2700,
          "monthlyCondoFee": 800,
          "rentalInfo": {
            "period": "MONTHLY",
            "warranties": [
              "SECURITY_DEPOSIT"
            ],
            "monthlyRentalTotalPrice": 3500
          }
        }
      ],
      "showPrice": true,
      "resale": false,
      "buildings": 0,
      "capacityLimit": [],
      "status": "ACTIVE"
    },
    "account": {
      "id": "d5193cc8-51ff-2b76-7b59-652159b5361b",
      "name": "(redacted)",
      "licenseNumber": "",
      "showAddress": false,
      "legacyVivarealId": 845504,
      "legacyZapId": 0,
      "createdDate": "2024-10-11T21:17:43Z",
      "tier": "platinum"
    },
    "medias": [
      {
        "id": "41502485957c3def43b5ed59695674de",
        "url": "https://resizedimgs.zapimoveis.com.br/{action}/{width}x{height}/named.images.sp/41502485957c3def43b5ed59695674de/{description}.webp",
        "type": "IMAGE"
      },
      [...] (redacted)
    ],
    "accountLink": {
      "name": "(redacted)",
      "href": "/imobiliaria/(number)/",
      "rel": "",
      "data": {}
    },
    "link": {
      "name": "Apartamento com 3 Quartos para alugar, 107m²",
      "href": "/imovel/aluguel-apartamento-3-quartos-mobiliado-centro-curitiba-107m2-id-(redacted)/",
      "rel": "",
      "data": {
        "city": "Curitiba",
        "neighborhood": "Centro",
        "state": "",
        "street": "Rua Mariano Torres",
        "streetNumber": "(redacted)",
        "zone": ""
      }
    }
  }
]
```

# Actor input Schema

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

Select listing types

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

City (e.g. Curitiba, São Paulo, etc)

## `state` (type: `string`):

State (e.g. Paraná, São Paulo, etc)

## `page` (type: `integer`):

Page number

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

Minimum price range

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

Maximum price range

## `usableAreaMin` (type: `integer`):

Minimum usable area in square meters

## `usableAreaMax` (type: `integer`):

Maximum usable area in square meters

## `unitType` (type: `string`):

Type of units to filter

## `unitUsage` (type: `string`):

Usage type of the unit

## `bedrooms` (type: `array`):

Number of bedrooms

## Actor input object example

```json
{
  "type": "RENTAL",
  "city": "São Paulo",
  "state": "São Paulo",
  "page": 0,
  "unitUsage": "RESIDENTIAL"
}
```

# 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("avorio/zap-imoveis-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("avorio/zap-imoveis-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 '{}' |
apify call avorio/zap-imoveis-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,avorio/zap-imoveis-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/1WyG7WWJM9Qjhmh1y/builds/sIpSa1VCYhOdQGrxQ/openapi.json
