{
  "openapi": "3.0.1",
  "info": {
    "title": "FincaRaiz Colombia Scraper — Delta Mode + Estrato Filter",
    "description": "Extract Colombia real estate listings with price/m², stratum filter (1-6),\nWhatsApp flag, and incremental delta to detect new listings and price changes.",
    "version": "1.0",
    "x-build-id": "KnimUvYqzEfrRYZdR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/don.eich~fincaraiz-colombia-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-don.eich-fincaraiz-colombia-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/don.eich~fincaraiz-colombia-scraper/runs": {
      "post": {
        "operationId": "runs-sync-don.eich-fincaraiz-colombia-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/don.eich~fincaraiz-colombia-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-don.eich-fincaraiz-colombia-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": "Modo de operación",
            "enum": [
              "searchAndScrape",
              "monitorDelta",
              "scrapeUrls"
            ],
            "type": "string",
            "description": "searchAndScrape: busca con filtros y extrae propiedades. monitorDelta: compara con corrida anterior y emite solo NEW/UPDATED/REMOVED. scrapeUrls: scrapes URLs específicas provistas.",
            "default": "searchAndScrape"
          },
          "operationType": {
            "title": "Tipo de operación",
            "enum": [
              "sale",
              "rent",
              "both",
              "projects"
            ],
            "type": "string",
            "description": "Tipo de operación a filtrar.",
            "default": "sale"
          },
          "propertyTypes": {
            "title": "Tipos de inmueble",
            "type": "array",
            "description": "Tipos de inmueble a incluir. Dejar vacío para todos.",
            "items": {
              "type": "string",
              "enum": [
                "apartamentos",
                "casas",
                "apartaestudios",
                "casas-campestres",
                "lotes",
                "bodegas",
                "oficinas",
                "locales",
                "fincas",
                "consultorios",
                "parqueaderos",
                "habitaciones",
                "edificios"
              ]
            },
            "default": []
          },
          "cities": {
            "title": "Ciudades",
            "type": "array",
            "description": "Lista de slugs de ciudad (ej: bogota-dc, medellin). Dejar vacío para todo el país. Usar el slug que aparece en la URL de FincaRaiz.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "stratum": {
            "title": "Estrato socioeconómico",
            "type": "array",
            "description": "Filtro por estrato socioeconómico (1-6). Múltiple selección. Dejar vacío para todos. Se traduce a ?stratum[]=N en la URL de búsqueda.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6"
              ]
            },
            "default": []
          },
          "priceMin": {
            "title": "Precio mínimo (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "Precio mínimo en COP (pesos colombianos). Ej: 200000000 para $200M COP."
          },
          "priceMax": {
            "title": "Precio máximo (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "Precio máximo en COP. Ej: 600000000 para $600M COP."
          },
          "bedroomsMin": {
            "title": "Habitaciones mínimas",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Número mínimo de habitaciones (dormitorios). Se mapea al path filter de FincaRaiz (ej: /2-o-mas-habitaciones)."
          },
          "areaMin": {
            "title": "Área mínima (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Área mínima en metros cuadrados."
          },
          "areaMax": {
            "title": "Área máxima (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Área máxima en metros cuadrados."
          },
          "constructionState": {
            "title": "Estado de construcción",
            "enum": [
              "",
              "nuevos",
              "sobre-planos",
              "en-construccion",
              "usados"
            ],
            "type": "string",
            "description": "Estado de la construcción. Se mapea al path filter de FincaRaiz.",
            "default": ""
          },
          "startUrls": {
            "title": "URLs de inicio",
            "type": "array",
            "description": "Solo en modo scrapeUrls: lista de URLs de FincaRaiz (propiedades individuales o páginas de búsqueda). En modos searchAndScrape y monitorDelta este campo es ignorado.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Máximo de resultados",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Número máximo de propiedades a retornar. El actor para cuando llega a este límite. No tiene efecto en modo monitorDelta (emite todos los cambios detectados).",
            "default": 100
          },
          "includeDetails": {
            "title": "Incluir detalle completo",
            "type": "boolean",
            "description": "Si es true, visita la página de cada propiedad para obtener campos completos: estrato, cuota de administración, amenidades, ficha técnica, todas las fotos, datos del anunciante incluyendo WhatsApp. Aumenta el tiempo de ejecución y el costo. Si es false, retorna solo los campos disponibles en el listing de búsqueda (~30 campos).",
            "default": false
          },
          "sectionAdvanced": {
            "title": "Opciones avanzadas",
            "type": "boolean",
            "description": "Proxy, concurrencia, modo delta y configuración de almacenamiento.",
            "default": false
          },
          "deltaEmitFilter": {
            "title": "Filtro de emisión delta",
            "enum": [
              "changes",
              "new",
              "updated",
              "removed",
              "all"
            ],
            "type": "string",
            "description": "Solo en modo monitorDelta: qué tipos de registros emitir al dataset. 'changes' es el default: emite todo lo que cambió, omite UNCHANGED. Usar 'all' para exportar snapshot completo con status.",
            "default": "changes"
          },
          "deltaStoreId": {
            "title": "ID del store delta",
            "type": "string",
            "description": "Solo en modo monitorDelta: ID o nombre del named Key-Value Store donde persiste el estado entre corridas. Por defecto el actor genera un nombre a partir de los parámetros de búsqueda (ej: FINCARAIZ-DELTA-venta-apartamentos-bogota-dc). Especificar manualmente si querés controlar qué store se usa.",
            "default": ""
          },
          "proxyConfiguration": {
            "title": "Configuración de proxy",
            "type": "object",
            "description": "Configuración de proxy. FincaRaiz no requiere proxy para volúmenes bajos. Para runs masivos (>10k requests/día) activar Apify Proxy con grupos residenciales colombianos.",
            "default": {
              "useApifyProxy": false
            }
          },
          "maxConcurrency": {
            "title": "Concurrencia máxima",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Requests concurrentes máximos. El default de 6 es seguro para evitar rate limiting. No aumentar por encima de 10 sin proxy residencial.",
            "default": 6
          },
          "requestDelayMs": {
            "title": "Delay entre requests (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Pausa en milisegundos entre requests al mismo dominio. Default 500ms es suficiente con maxConcurrency=6.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}