{
  "openapi": "3.0.1",
  "info": {
    "title": "Metrocuadrado Scraper — Colombia Real Estate Listings",
    "description": "Scrape Metrocuadrado property listings across Colombia with full pricing, price-per-m², area, rooms, stratum, photos, GPS, nearby places, agent phone & WhatsApp, multi-city & neighborhood filtering, price/area filters, and incremental NEW/UPDATED/EXPIRED tracking.",
    "version": "0.1",
    "x-build-id": "ELTcSU5L5mVNSWZFs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/blackfalcondata~metrocuadrado-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-blackfalcondata-metrocuadrado-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/blackfalcondata~metrocuadrado-scraper/runs": {
      "post": {
        "operationId": "runs-sync-blackfalcondata-metrocuadrado-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/blackfalcondata~metrocuadrado-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-blackfalcondata-metrocuadrado-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": {
          "operation": {
            "title": "🔁 Operation",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Sale or rental listings.",
            "default": "sale"
          },
          "propertyTypes": {
            "title": "🏠 Property Types",
            "type": "array",
            "description": "One or more property typologies. Each is scanned independently.",
            "items": {
              "type": "string",
              "enum": [
                "apartamento",
                "casa",
                "oficina",
                "local",
                "bodega",
                "consultorio",
                "lote",
                "finca",
                "edificio"
              ],
              "enumTitles": [
                "Apartment",
                "House",
                "Office",
                "Commercial premises",
                "Warehouse",
                "Medical office",
                "Land/Plot",
                "Farm/Estate",
                "Apartment building"
              ]
            },
            "default": [
              "apartamento"
            ]
          },
          "cities": {
            "title": "🏙️ Cities",
            "type": "array",
            "description": "City slug(s), e.g. \"bogota\", \"medellin\", \"cali\". Accents/spaces are normalized. Leave empty if you only use Start URLs.",
            "items": {
              "type": "string"
            }
          },
          "neighborhoods": {
            "title": "📍 Neighborhoods (optional)",
            "type": "array",
            "description": "Neighborhood slug(s) to narrow the search within the chosen cities, e.g. \"chico\", \"el-poblado\".",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "🔗 Start URLs",
            "type": "array",
            "description": "Paste Metrocuadrado search-result URLs (e.g. https://www.metrocuadrado.com/apartamentos/venta/bogota/chico/) to scrape those exact searches. Each URL's operation, property type, city and neighborhood are read from the URL; the filters below still apply.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "⚙️ Scrape mode",
            "enum": [
              "listings",
              "agencies"
            ],
            "type": "string",
            "description": "Listings (default) or Agencies — aggregate the companies behind the listings (id, owner type, listing volume, contact phone, areas served) for lead generation.",
            "default": "listings"
          },
          "maxResults": {
            "title": "💯 Max Results",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum records to return (0 = full coverage). In agencies mode this caps the number of companies.",
            "default": 50
          },
          "minPrice": {
            "title": "💰 Min Price (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum listing price."
          },
          "maxPrice": {
            "title": "💰 Max Price (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum listing price."
          },
          "minAreaM2": {
            "title": "📐 Min Area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum floor area in square metres."
          },
          "maxAreaM2": {
            "title": "📐 Max Area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum floor area in square metres."
          },
          "rooms": {
            "title": "🛏️ Bedrooms",
            "type": "array",
            "description": "Filter by number of bedrooms (any of the selected counts).",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5"
              ],
              "enumTitles": [
                "1",
                "2",
                "3",
                "4",
                "5+"
              ]
            }
          },
          "bathrooms": {
            "title": "🛁 Bathrooms",
            "type": "array",
            "description": "Filter by number of bathrooms.",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ],
              "enumTitles": [
                "1",
                "2",
                "3",
                "4+"
              ]
            }
          },
          "garages": {
            "title": "🚗 Garages",
            "type": "array",
            "description": "Filter by number of garages/parking spaces.",
            "items": {
              "type": "string",
              "enum": [
                "0",
                "1",
                "2",
                "3"
              ],
              "enumTitles": [
                "0",
                "1",
                "2",
                "3+"
              ]
            }
          },
          "stratum": {
            "title": "🏷️ Stratum (estrato)",
            "type": "array",
            "description": "Filter by socioeconomic stratum (1–6).",
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6"
              ],
              "enumTitles": [
                "1",
                "2",
                "3",
                "4",
                "5",
                "6"
              ]
            }
          },
          "propertyState": {
            "title": "🔨 Condition",
            "type": "array",
            "description": "New or used.",
            "items": {
              "type": "string",
              "enum": [
                "Nuevo",
                "Usado"
              ],
              "enumTitles": [
                "New",
                "Used"
              ]
            }
          },
          "centerLat": {
            "title": "🧭 Center Latitude",
            "type": "string",
            "description": "Optional radius filter — center latitude (decimal, e.g. 4.6097 for Bogotá). Combine with Center Longitude + Radius to keep only listings within the radius."
          },
          "centerLng": {
            "title": "🧭 Center Longitude",
            "type": "string",
            "description": "Radius filter — center longitude (decimal, e.g. -74.0817)."
          },
          "radiusKm": {
            "title": "📏 Radius (km)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only listings within this many kilometres of the center point. Requires Center Latitude + Center Longitude; listings without coordinates are kept."
          },
          "descriptionMaxLength": {
            "title": "✂️ Description Max Length",
            "minimum": 0,
            "type": "integer",
            "description": "Truncate description to this many characters. 0 = no truncation.",
            "default": 0
          },
          "compact": {
            "title": "📦 Compact Output",
            "type": "boolean",
            "description": "Output only core fields (for AI-agent/MCP workflows).",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "🧹 Exclude Empty Fields",
            "type": "boolean",
            "description": "Drop null, empty-string, and empty-array fields from each record before output. Smaller, cleaner payloads for AI agents and dashboards.",
            "default": false
          },
          "incrementalMode": {
            "title": "♻️ Incremental Mode",
            "type": "boolean",
            "description": "Track new/changed/expired listings across runs. Requires a State Key.",
            "default": false
          },
          "stateKey": {
            "title": "🔑 State Key",
            "type": "string",
            "description": "Stable identifier for this tracking universe (e.g. \"co-bogota-sale-apartamento\")."
          },
          "emitUnchanged": {
            "title": "♻️ Emit Unchanged Records",
            "type": "boolean",
            "description": "When incremental, also emit listings that have not changed.",
            "default": false
          },
          "emitExpired": {
            "title": "⚰️ Emit Expired Records",
            "type": "boolean",
            "description": "When incremental, also emit listings no longer found.",
            "default": false
          },
          "skipReposts": {
            "title": "🚫 Skip Reposts",
            "type": "boolean",
            "description": "When incremental, skip listings that are reposts of previously seen (now expired) listings.",
            "default": false
          },
          "telegramToken": {
            "title": "🔑 Telegram Bot Token",
            "type": "string",
            "description": "Telegram bot token (from @BotFather). Required for Telegram notifications."
          },
          "telegramChatId": {
            "title": "💬 Telegram Chat ID",
            "type": "string",
            "description": "Telegram chat or channel ID where alerts are sent."
          },
          "discordWebhookUrl": {
            "title": "🎮 Discord Webhook URL",
            "type": "string",
            "description": "Discord incoming webhook URL."
          },
          "slackWebhookUrl": {
            "title": "💼 Slack Webhook URL",
            "type": "string",
            "description": "Slack incoming webhook URL."
          },
          "whatsappPhoneNumberId": {
            "title": "📱 WhatsApp Phone Number ID",
            "type": "string",
            "description": "WhatsApp Business phone number ID from Meta Business Manager."
          },
          "whatsappAccessToken": {
            "title": "🔐 WhatsApp Access Token",
            "type": "string",
            "description": "Meta Cloud API access token with whatsapp_business_messaging scope."
          },
          "whatsappTo": {
            "title": "📨 WhatsApp Recipient",
            "type": "string",
            "description": "Recipient phone number in E.164 format (e.g. +573001234567)."
          },
          "webhookUrl": {
            "title": "🪝 Generic Webhook URL",
            "type": "string",
            "description": "Universal escape hatch for n8n / Make / Zapier / custom HTTP backends. Receives a JSON POST per run."
          },
          "webhookHeaders": {
            "title": "🪝 Webhook Headers (optional)",
            "type": "object",
            "description": "Additional HTTP headers sent with the generic webhook POST."
          },
          "notificationLimit": {
            "title": "📊 Max Listings Per Notification",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of listings included in each notification message (1–20).",
            "default": 5
          },
          "notifyOnlyChanges": {
            "title": "🔄 Notify Only New/Updated",
            "type": "boolean",
            "description": "When Incremental Mode is on, only notify for NEW and UPDATED listings.",
            "default": false
          },
          "appConnector": {
            "title": "📤 Send results to a connected app",
            "type": "string",
            "description": "Optional. Pick a connected app under Settings → API & Integrations to receive your results (including contact details where available). A run-summary is written to the connected app; support is best-effort as Apify expands its connector catalog."
          },
          "mcpIssueTeam": {
            "title": "🏷️ Issue tracker team",
            "type": "string",
            "description": "Only when the connected app is an issue tracker: the team (name or ID) the summary issue is created under, if that app requires one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}