{
  "openapi": "3.0.1",
  "info": {
    "title": "ZAP Imóveis Scraper",
    "description": "Scrape ZAP Imóveis, Brazil's premium real estate portal (QuintoAndar Group): property listings, commercial real estate (sala, galpão, conjunto), lançamentos and 200K+ imobiliária profiles. Get price, condomínio, IPTU, CRECI, agency, building class, sem fiador and FGTS data.",
    "version": "0.0",
    "x-build-id": "A4KZTtcreeNJYdmqC"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/haketa~zapimoveis-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-haketa-zapimoveis-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/haketa~zapimoveis-scraper/runs": {
      "post": {
        "operationId": "runs-sync-haketa-zapimoveis-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/haketa~zapimoveis-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-haketa-zapimoveis-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": {
          "mode": {
            "title": "Scrape Mode",
            "enum": [
              "listings",
              "agencies"
            ],
            "type": "string",
            "description": "What to scrape. 'listings' = property search (residential, commercial, lançamentos). 'agencies' = imobiliária directory profiles (CRECI-J, CNPJ, portfolio stats).",
            "default": "listings"
          },
          "portal": {
            "title": "Portal",
            "enum": [
              "ZAP",
              "VIVA_REAL"
            ],
            "type": "string",
            "description": "ZAP and VivaReal share the same Glue API backend. Switch to scrape VivaReal via the same actor. Default: ZAP.",
            "default": "ZAP"
          },
          "business": {
            "title": "Business Type",
            "uniqueItems": true,
            "type": "array",
            "description": "Transaction type. SALE = venda. RENTAL = aluguel. Empty = both.",
            "items": {
              "type": "string",
              "enum": [
                "SALE",
                "RENTAL"
              ],
              "enumTitles": [
                "Sale (Venda)",
                "Rental (Aluguel)"
              ]
            }
          },
          "listingType": {
            "title": "Listing Type",
            "uniqueItems": true,
            "type": "array",
            "description": "USED = standard resale/rental inventory. DEVELOPMENT = lançamentos (new developer projects, Cyrela/EZTec/Tegra etc).",
            "items": {
              "type": "string",
              "enum": [
                "USED",
                "DEVELOPMENT"
              ],
              "enumTitles": [
                "Used (Padrão)",
                "Development (Lançamentos)"
              ]
            }
          },
          "usageTypes": {
            "title": "Usage Types",
            "uniqueItems": true,
            "type": "array",
            "description": "RESIDENTIAL = apartamento/casa/cobertura etc. COMMERCIAL = sala comercial/galpão/conjunto comercial/loja (ZAP's strong vertical).",
            "items": {
              "type": "string",
              "enum": [
                "RESIDENTIAL",
                "COMMERCIAL"
              ],
              "enumTitles": [
                "Residential",
                "Commercial (CRE)"
              ]
            }
          },
          "unitTypes": {
            "title": "Unit Types",
            "type": "array",
            "description": "Property type filter. Use ZAP's UnitType enum. Common: APARTMENT, HOME, CONDOMINIUM, PENTHOUSE, FLAT, KITNET, FARM, OFFICE, COMMERCIAL_BUILDING, COMMERCIAL_PROPERTY, BUSINESS, WAREHOUSE_SHED, GARAGE, LAND_LOT.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States (UF)",
            "type": "array",
            "description": "Brazilian state codes (2-letter UF). Examples: SP, RJ, MG, RS, PR, SC, BA, DF, GO, PE, CE, ES.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Cities",
            "type": "array",
            "description": "City names in ZAP's URL slug format (lowercase, hyphenated, no accents). Examples: 'sao-paulo', 'rio-de-janeiro', 'belo-horizonte', 'porto-alegre', 'curitiba', 'florianopolis', 'salvador', 'brasilia', 'recife', 'fortaleza'. Leave empty for state-wide search.",
            "items": {
              "type": "string"
            }
          },
          "neighborhoods": {
            "title": "Neighborhoods (Bairros)",
            "type": "array",
            "description": "Neighborhood slugs to filter. Examples: 'pinheiros', 'itaim-bibi', 'vila-olimpia', 'faria-lima', 'jardins', 'moema', 'copacabana', 'ipanema', 'leblon', 'barra-da-tijuca'. Requires single city.",
            "items": {
              "type": "string"
            }
          },
          "minPrice": {
            "title": "Min Price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in Brazilian Reais. 0 = no minimum.",
            "default": 0
          },
          "maxPrice": {
            "title": "Max Price (BRL)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in Brazilian Reais. 0 = no maximum.",
            "default": 0
          },
          "minArea": {
            "title": "Min Area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum usable area in square meters. 0 = no minimum.",
            "default": 0
          },
          "maxArea": {
            "title": "Max Area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum usable area in square meters. 0 = no maximum.",
            "default": 0
          },
          "minBedrooms": {
            "title": "Min Bedrooms (Quartos)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum bedroom count. 0 = no filter.",
            "default": 0
          },
          "minParkingSpaces": {
            "title": "Min Parking Spaces (Vagas)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum parking space count. 0 = no filter.",
            "default": 0
          },
          "semFiador": {
            "title": "Sem Fiador (No Guarantor)",
            "type": "boolean",
            "description": "Filter rental listings that don't require a fiador (guarantor). ZAP's modern rental segment — competes with QuintoAndar/Loft model.",
            "default": false
          },
          "sortBy": {
            "title": "Sort Order",
            "enum": [
              "relevance",
              "newest",
              "lowest_price",
              "highest_price",
              "lowest_area",
              "highest_area"
            ],
            "type": "string",
            "description": "Result ordering.",
            "default": "relevance"
          },
          "agencyIds": {
            "title": "Agency IDs (Agencies Mode)",
            "type": "array",
            "description": "Explicit list of imobiliária IDs to crawl in 'agencies' mode. Examples: '231067' (Brasil Brokers Copacabana), '233859' (Brasil Brokers Ipanema), '122847' (VivaReal). Ignored in 'listings' mode.",
            "items": {
              "type": "string"
            }
          },
          "agencyIdRangeStart": {
            "title": "Agency ID Range Start",
            "minimum": 0,
            "type": "integer",
            "description": "Start of sequential agency ID range to crawl (agencies mode). Useful for discovering new agencies. 0 = disabled.",
            "default": 0
          },
          "agencyIdRangeEnd": {
            "title": "Agency ID Range End",
            "minimum": 0,
            "type": "integer",
            "description": "End of sequential agency ID range. Must be > start. ZAP agency IDs range up to ~850000. 0 = disabled.",
            "default": 0
          },
          "fetchAgencyListings": {
            "title": "Fetch Agency Listings",
            "type": "boolean",
            "description": "In agencies mode, also fetch the agency's listings portfolio (slower). When false, only profile metadata is saved.",
            "default": false
          },
          "maxListings": {
            "title": "Max Total Listings/Records",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum total records to scrape across all tasks. Set 0 for unlimited.",
            "default": 200
          },
          "maxPages": {
            "title": "Max Pages per Search",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum pages per task (each task = state/city/business combination). Each page returns up to 24 listings.",
            "default": 20
          },
          "pageSize": {
            "title": "Page Size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Listings per API call. ZAP default is 24. Max recommended: 36.",
            "default": 24
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Brazilian residential proxy STRONGLY recommended. ZAP is fronted by Cloudflare and DC IPs get blocked fast. Use Apify Proxy with RESIDENTIAL group and BR country, or supply your own BR residential proxies."
          },
          "requestDelay": {
            "title": "Request Delay (ms)",
            "minimum": 0,
            "maximum": 15000,
            "type": "integer",
            "description": "Delay between requests in milliseconds. Increase if hitting Cloudflare challenges.",
            "default": 800
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Parallel tasks. Keep low (1-2) to avoid Cloudflare rate limits.",
            "default": 1
          },
          "maxRetries": {
            "title": "Max Retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retry attempts per failed request (Cloudflare 403/503 errors).",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}