{
  "openapi": "3.0.1",
  "info": {
    "title": "Quinto Andar API com monitoramento",
    "description": "Coleta e monitora imóveis do QuintoAndar. Suporta aluguel e compra, paginação completa, modo rápido/completo, monitoramento de mudanças de preço e disponibilidade.",
    "version": "1.0",
    "x-build-id": "GKSFWZS0bgRf18gZX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/leadercorp~quintoandar-monitor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-leadercorp-quintoandar-monitor",
        "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/leadercorp~quintoandar-monitor/runs": {
      "post": {
        "operationId": "runs-sync-leadercorp-quintoandar-monitor",
        "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/leadercorp~quintoandar-monitor/run-sync": {
      "post": {
        "operationId": "run-sync-leadercorp-quintoandar-monitor",
        "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": {
          "urlBusca": {
            "title": "URL de busca",
            "type": "string",
            "description": "URL completa do QuintoAndar (ex: https://www.quintoandar.com.br/alugar/imovel/sao-paulo-sp-brasil). Use este campo OU os filtros abaixo."
          },
          "tipoOperacao": {
            "title": "Tipo de operação",
            "enum": [
              "aluguel",
              "compra"
            ],
            "type": "string",
            "description": "Aluguel ou compra",
            "default": "aluguel"
          },
          "cidade": {
            "title": "Cidade",
            "type": "string",
            "description": "Nome da cidade (ex: São Paulo, Rio de Janeiro, Campinas, Curitiba, Brasília)"
          },
          "bairro": {
            "title": "Bairro",
            "type": "string",
            "description": "Nome do bairro (ex: Pinheiros, Consolação, Moema)"
          },
          "tipoImovel": {
            "title": "Tipo de imóvel",
            "enum": [
              "apartamento",
              "casa",
              "casacondominio",
              "kitnet"
            ],
            "type": "string",
            "description": "Filtrar por tipo de imóvel"
          },
          "precoMin": {
            "title": "Preço mínimo (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Valor mínimo de aluguel ou venda em reais"
          },
          "precoMax": {
            "title": "Preço máximo (R$)",
            "minimum": 0,
            "type": "integer",
            "description": "Valor máximo de aluguel ou venda em reais"
          },
          "areaMin": {
            "title": "Área mínima (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Área mínima do imóvel em metros quadrados"
          },
          "areaMax": {
            "title": "Área máxima (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Área máxima do imóvel em metros quadrados"
          },
          "quartos": {
            "title": "Quartos (mínimo)",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Número mínimo de quartos"
          },
          "banheiros": {
            "title": "Banheiros (mínimo)",
            "minimum": 1,
            "type": "integer",
            "description": "Número mínimo de banheiros"
          },
          "vagas": {
            "title": "Vagas de garagem (mínimo)",
            "minimum": 0,
            "type": "integer",
            "description": "Número mínimo de vagas de garagem"
          },
          "suites": {
            "title": "Suítes (mínimo)",
            "minimum": 0,
            "type": "integer",
            "description": "Número mínimo de suítes"
          },
          "mobiliado": {
            "title": "Mobiliado",
            "enum": [
              "sim",
              "nao"
            ],
            "type": "string",
            "description": "Filtrar por imóveis mobiliados ou não"
          },
          "aceitaPets": {
            "title": "Aceita pets",
            "enum": [
              "sim",
              "nao"
            ],
            "type": "string",
            "description": "Filtrar por imóveis que aceitam animais de estimação"
          },
          "pertoMetro": {
            "title": "Próximo ao metrô",
            "enum": [
              "sim",
              "nao"
            ],
            "type": "string",
            "description": "Filtrar por imóveis próximos a estações de metrô ou trem"
          },
          "disponibilidade": {
            "title": "Disponibilidade",
            "enum": [
              "imediata",
              "em_breve"
            ],
            "type": "string",
            "description": "Filtrar por disponibilidade imediata ou em breve"
          },
          "modo": {
            "title": "Modo de execução",
            "enum": [
              "rapido",
              "completo"
            ],
            "type": "string",
            "description": "rapido: apenas listagem (alta performance) | completo: inclui detalhes do imóvel",
            "default": "rapido"
          },
          "maxItems": {
            "title": "Máximo de imóveis",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Limite de imóveis a coletar por execução",
            "default": 200
          },
          "monitoramentoAtivo": {
            "title": "Ativar monitoramento",
            "type": "boolean",
            "description": "Se ativo, compara com a execução anterior e detecta imóveis novos, com preço alterado e removidos",
            "default": false
          },
          "monitoramentoChave": {
            "title": "Chave de monitoramento (opcional)",
            "type": "string",
            "description": "Identificador único para esta busca. Deixe em branco para usar o slug da URL automaticamente."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}