{
  "openapi": "3.0.1",
  "info": {
    "title": "TocToc Scraper: Chile Real Estate Listings",
    "description": "Scrape TocToc Chile real estate (propiedades) without a browser. Type Santiago, Providencia or Las Condes. Extract UF, CLP and USD prices, price/m² vs comuna, cheap/fair/expensive labels, rental yield, gastos comunes, days on market, a MARKET_REPORT, and monitor mode. Export JSON, CSV or Excel.",
    "version": "0.1",
    "x-build-id": "yUKJWWUIF17zN46Ve"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kareninatech~toctoc-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kareninatech-toctoc-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/kareninatech~toctoc-scraper/runs": {
      "post": {
        "operationId": "runs-sync-kareninatech-toctoc-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/kareninatech~toctoc-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-kareninatech-toctoc-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": [
              "venta",
              "arriendo"
            ],
            "type": "string",
            "description": "Buy (venta) or rent (arriendo).",
            "default": "venta"
          },
          "property_type": {
            "title": "Property type",
            "enum": [
              "departamento",
              "casa",
              "oficina",
              "local-comercial",
              "bodega",
              "estacionamiento",
              "parcela",
              "terreno",
              "campo-agricola",
              "lugar-vacacional",
              "terreno-industrial"
            ],
            "type": "string",
            "description": "Type of property, for example apartment, house or land. Leave empty for all types.",
            "default": "departamento"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "A place name as you would type it: Santiago, Providencia, Las Condes, Ñuñoa, Viña del Mar, Valparaíso, Concepción… For the whole Metropolitan Region type 'Metropolitana'. For the whole country type 'Chile' (do not leave this field empty — an omitted value is filled with the default, Santiago).",
            "default": "Santiago"
          },
          "locations": {
            "title": "More locations",
            "type": "array",
            "description": "Extra places to search in the same run. max_items is split between all searches.",
            "items": {
              "type": "string"
            }
          },
          "search_url": {
            "title": "TocToc search URL (optional)",
            "type": "string",
            "description": "Paste a search page from toctoc.com with your filters already set. When you use URLs, the filters above are ignored."
          },
          "start_urls": {
            "title": "More search URLs",
            "type": "array",
            "description": "Optional extra search or listing URLs from the same site. Leave empty to use the filters above.",
            "items": {
              "type": "string"
            }
          },
          "price_unit": {
            "title": "Price unit",
            "enum": [
              "uf",
              "clp"
            ],
            "type": "string",
            "description": "Unit for the min/max price filters. Sale prices in Chile are usually in UF; rents are often in CLP.",
            "default": "uf"
          },
          "min_price": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum price in the unit chosen above (UF or CLP), for example 2000. Leave empty for no minimum."
          },
          "max_price": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum price in the unit chosen above. When the unit is UF, this is also applied on the site as a 'hasta X UF' search when possible."
          },
          "min_m2": {
            "title": "Min area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum useful area (minimum size for new projects)."
          },
          "max_m2": {
            "title": "Max area (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum useful area in square metres, for example 150. Leave empty for no maximum."
          },
          "min_bedrooms": {
            "title": "Min bedrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "At least this many bedrooms. Use 0 for a studio."
          },
          "min_bathrooms": {
            "title": "Min bathrooms",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Minimum number of bathrooms, for example 1. Leave empty for no minimum."
          },
          "seller_type": {
            "title": "Seller type",
            "enum": [
              "",
              "particular",
              "corredora",
              "inmobiliaria"
            ],
            "type": "string",
            "description": "Only private owners, agencies (corredoras) or developers (inmobiliarias). Listings where TocToc does not show the advertiser type are excluded when you choose one.",
            "default": ""
          },
          "condition": {
            "title": "Condition",
            "enum": [
              "",
              "nuevo",
              "usado"
            ],
            "type": "string",
            "description": "New projects (Venta Nuevo) or used homes (Venta Usado). Empty = both.",
            "default": ""
          },
          "sort": {
            "title": "Sort",
            "enum": [
              "",
              "relevance",
              "newest",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order of the saved rows (applied after download). Public TocToc pages always return the site's default order first; this only sorts what was collected.",
            "default": ""
          },
          "max_items": {
            "title": "Max listings",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum listings to save (split between searches). Each public results page has up to 260 listings. For more than 260, the Actor also reads public bedroom, used and price-cap pages of the same search.",
            "default": 42
          },
          "max_pages": {
            "title": "Max pages per search",
            "minimum": 1,
            "maximum": 80,
            "type": "integer",
            "description": "Maximum public pages to fetch per search (the first page plus facet pages). Leave empty to decide automatically from max_items."
          },
          "compare_with_zone": {
            "title": "Compare price per m² with the comuna",
            "type": "boolean",
            "description": "Add a zone median, the % vs that median, and a cheap/fair/expensive deal label. New projects are left out of the comparison because their price is a starting price.",
            "default": true
          },
          "min_zone_peers": {
            "title": "Min listings in a zone",
            "minimum": 3,
            "maximum": 50,
            "type": "integer",
            "description": "A barrio, comuna or region needs at least this many comparable listings before it is used as the median.",
            "default": 5
          },
          "estimate_rental_yield": {
            "title": "Estimate rental yield",
            "type": "boolean",
            "description": "For sale listings, read a rental page of the same search and estimate monthly rent and gross yield.",
            "default": true
          },
          "yield_sample_pages": {
            "title": "Rent sample pages",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many rental pages to read (each has up to 260 rentals). 1 is enough for most runs.",
            "default": 1
          },
          "stale_days": {
            "title": "Stale after (days)",
            "minimum": 7,
            "maximum": 1000,
            "type": "integer",
            "description": "Listings this many days old (or older) are flagged as stale.",
            "default": 90
          },
          "include_description": {
            "title": "Include description",
            "type": "boolean",
            "description": "Save the listing description. Turn off for a smaller dataset.",
            "default": true
          },
          "include_images": {
            "title": "Include image URLs",
            "type": "boolean",
            "description": "Save all photo URLs. Turn off for a smaller dataset (the main image is always saved).",
            "default": true
          },
          "monitor_mode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Only save new and price-changed listings (and removed ones if you turn that on). Schedule the Actor to run regularly.",
            "default": false
          },
          "monitor_key": {
            "title": "Monitor name",
            "type": "string",
            "description": "Name for this watch list (so different searches do not share history). Letters, numbers and hyphens."
          },
          "emit_removed": {
            "title": "Report removed listings",
            "type": "boolean",
            "description": "In monitor mode, also save listings that disappeared. Only works when the run covers the whole search.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Not needed today. If TocToc starts blocking, use Apify Proxy (RESIDENTIAL, country CL)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}