{
  "openapi": "3.0.1",
  "info": {
    "title": "Chaves na Mão Scraper: Imóveis à Venda e para Alugar",
    "description": "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.",
    "version": "0.1",
    "x-build-id": "aM74WxlVcLZ4FOpNx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automatic~chavesnamao-br-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automatic-chavesnamao-br-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/automatic~chavesnamao-br-scraper/runs": {
      "post": {
        "operationId": "runs-sync-automatic-chavesnamao-br-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/automatic~chavesnamao-br-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-automatic-chavesnamao-br-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": {
          "locations": {
            "title": "Cities or neighbourhoods",
            "maxItems": 10,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "string"
            }
          },
          "operation": {
            "title": "Buy or rent",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Applies to the locations above. Search links keep their own choice.",
            "default": "sale"
          },
          "propertyType": {
            "title": "Property type",
            "enum": [
              "imoveis",
              "apartamentos",
              "casas",
              "casas-em-condominio",
              "coberturas",
              "kitnet",
              "flat",
              "loft",
              "terrenos",
              "terrenos-em-condominio",
              "chacaras",
              "fazendas",
              "sala-comercial",
              "casa-comercial",
              "ponto-comercial",
              "galpao",
              "predio",
              "garagem",
              "terreno-comercial"
            ],
            "type": "string",
            "description": "Applies to the locations above.",
            "default": "imoveis"
          },
          "startUrls": {
            "title": "Chaves na Mão search links",
            "maxItems": 10,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "priceMin": {
            "title": "Minimum price (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Asking price for sales, monthly rent for rentals."
          },
          "priceMax": {
            "title": "Maximum price (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Asking price for sales, monthly rent for rentals."
          },
          "bedroomsMin": {
            "title": "Bedrooms, at least",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Only listings with at least this many bedrooms (quartos). Leave empty for any."
          },
          "bathroomsMin": {
            "title": "Bathrooms, at least",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Only listings with at least this many bathrooms (banheiros). Leave empty for any."
          },
          "parkingSpacesMin": {
            "title": "Parking spaces, at least",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Only listings with at least this many parking spaces (vagas). Leave empty for any."
          },
          "areaMin": {
            "title": "Minimum area (m²)",
            "minimum": 1,
            "type": "integer",
            "description": "Smallest floor area in square metres. Leave empty for any."
          },
          "areaMax": {
            "title": "Maximum area (m²)",
            "minimum": 1,
            "type": "integer",
            "description": "Largest floor area in square metres. Leave empty for any."
          },
          "sortBy": {
            "title": "Order",
            "enum": [
              "newest",
              "relevance",
              "lowest-price",
              "highest-price",
              "smallest-area",
              "largest-area"
            ],
            "type": "string",
            "description": "For the locations above; search links keep their own order. Newest first suits scheduled runs.",
            "default": "newest"
          },
          "maxResults": {
            "title": "Maximum listings",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "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.",
            "default": 100
          },
          "onlyNewSinceLastRun": {
            "title": "Deliver only new listings (monitor)",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "includePriceChanges": {
            "title": "Also deliver price changes",
            "type": "boolean",
            "description": "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.",
            "default": false
          },
          "stateKey": {
            "title": "Monitor name",
            "type": "string",
            "description": "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."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}