{
  "openapi": "3.0.1",
  "info": {
    "title": "Metrocuadrado Scraper — Colombia Property Data & API",
    "description": "Metrocuadrado scraper & real estate data API for Colombia's #1 property portal. Sale (venta) & rent (arriendo) listings: price (COP), admin fee, stratum, size, rooms, baths, garages, GPS, neighbourhood, amenities, photos — clean JSON/CSV. Fast overview or full detail. No API key needed.",
    "version": "1.0",
    "x-build-id": "j2j6lzJUgA6PiXhdv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~metrocuadrado-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-metrocuadrado-property-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/sian.agency~metrocuadrado-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-metrocuadrado-property-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/sian.agency~metrocuadrado-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-metrocuadrado-property-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": {
          "scrapeMode": {
            "title": "⚡ Scrape mode",
            "enum": [
              "overview",
              "detail"
            ],
            "type": "string",
            "description": "⚡ **OVERVIEW** — fast, cheap. Pulls the search-list fields straight from Metrocuadrado's search API (price in COP, admin fee, size, rooms, baths, garages, stratum, neighbourhood, city, photos).\n\n🔍 **DETAIL** — full fields per listing (real GPS, build age, agent name & profile, video, full amenity list, hi-res photos). Each detail record is enriched with the overview fields too, so you always get a complete row. Slower and priced higher per result.\n\n**TIP:** Start with Overview — upgrade to Detail only when you need GPS, the agent, or the full feature list.",
            "default": "overview"
          },
          "searchMode": {
            "title": "🧭 Search by",
            "enum": [
              "byPlace",
              "bySearchUrl",
              "byListingUrl"
            ],
            "type": "string",
            "description": "🧭 How to tell the scraper what to fetch:\n\n- **By place** — pick the property type, contract (sale/rent) and optionally a city/neighbourhood. Combine with the filters below.\n- **By search URL** — paste a metrocuadrado.com search-results URL; the property type, contract and location are honored.\n- **By listing URL/ID** — Detail mode only: paste listing URLs or bare IDs (e.g. 20625-M5964176) to fetch specific properties.",
            "default": "byPlace"
          },
          "propertyTypes": {
            "title": "🏘️ Property type",
            "enum": [
              "casas-apartamentos",
              "apartamento",
              "casa",
              "apartamento-casa"
            ],
            "type": "string",
            "description": "🏘️ Which property types to include in a **By place** search. Default covers houses + apartments (the common case).",
            "default": "casas-apartamentos"
          },
          "business": {
            "title": "🏷️ Contract",
            "enum": [
              "venta",
              "arriendo",
              "arriendo-venta"
            ],
            "type": "string",
            "description": "🏷️ **Sale** (venta), **Rent** (arriendo) or **both**. Applies to By place searches.",
            "default": "venta"
          },
          "places": {
            "title": "📍 City slugs (optional)",
            "type": "array",
            "description": "📍 Metrocuadrado city slugs, e.g. \"bogota\", \"medellin\", \"cali\". Used when **Search by = By place**. Leave empty to search all of Colombia.\n\n**TIP:** Add several — each city is searched in turn until **Max results** is reached.",
            "items": {
              "type": "string"
            }
          },
          "neighborhood": {
            "title": "🏙️ Neighbourhood slug (optional)",
            "type": "string",
            "description": "🏙️ Optional neighbourhood slug to narrow a By place search (e.g. \"chapinero\"). Combine with a single city."
          },
          "searchUrls": {
            "title": "🔗 Search URLs",
            "type": "array",
            "description": "🔗 metrocuadrado.com search-results URLs to scrape. Used when **Search by = By search URL**.\n\n**TIP:** Build any search on metrocuadrado.com (pick property type, sale/rent, city), then copy the URL from the address bar.\n\n**BULK EDIT:** Click \"Bulk edit\" to paste many URLs, one per line.",
            "items": {
              "type": "string"
            }
          },
          "listingUrls": {
            "title": "🆔 Listing URLs or IDs",
            "type": "array",
            "description": "🆔 **Detail mode only.** metrocuadrado.com listing URLs or bare IDs (e.g. 20625-M5964176).\n\n**BULK EDIT:** Click \"Bulk edit\" to paste many URLs/IDs, one per line.",
            "items": {
              "type": "string"
            }
          },
          "maxResults": {
            "title": "🔢 Max results",
            "minimum": 1,
            "type": "integer",
            "description": "🔢 Maximum listings to extract this run.\n\n- **FREE tier:** capped at 25 listings per run.\n- **PAID tier:** unlimited — set as high as you need (up to the portal's 10,000-listing depth cap per search).",
            "default": 100
          },
          "minPrice": {
            "title": "💵 Min price (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "💵 Optional. Minimum price filter in Colombian pesos (By place mode)."
          },
          "maxPrice": {
            "title": "💵 Max price (COP)",
            "minimum": 0,
            "type": "integer",
            "description": "💵 Optional. Maximum price filter in Colombian pesos (By place mode)."
          },
          "minRooms": {
            "title": "🛏️ Min rooms",
            "minimum": 0,
            "type": "integer",
            "description": "🛏️ Optional. Minimum number of rooms (By place mode)."
          },
          "minBathrooms": {
            "title": "🚿 Min bathrooms",
            "minimum": 0,
            "type": "integer",
            "description": "🚿 Optional. Minimum number of bathrooms (By place mode)."
          },
          "minArea": {
            "title": "📐 Min area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "📐 Optional. Minimum area in m² (By place mode)."
          },
          "maxArea": {
            "title": "📐 Max area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "📐 Optional. Maximum area in m² (By place mode)."
          },
          "sort": {
            "title": "↕️ Sort (optional)",
            "type": "string",
            "description": "↕️ Optional sort key passed through verbatim to the search (e.g. a value copied from a metrocuadrado.com search URL)."
          },
          "proxyCountry": {
            "title": "🌐 Proxy country (optional)",
            "enum": [
              "",
              "CO"
            ],
            "type": "string",
            "description": "🌐 Leave empty to run **direct** (no proxy — the default, fastest & cheapest). Set to \"CO\" to route through a Colombian residential proxy, only needed to keep the listing-detail geo check happy on very large runs.",
            "default": ""
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}