{
  "openapi": "3.0.1",
  "info": {
    "title": "KV.EE Property Scraper (dev probe)",
    "description": "Scrape KV.EE, Estonia's top property portal: price, €/m², size, rooms, floor, year built, energy class, GPS and agency. Sale and rent, all of Estonia.",
    "version": "1.0",
    "x-build-id": "047twivO3oO5KvvEh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sian.agency~kv-ee-property-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sian.agency-kv-ee-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~kv-ee-property-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sian.agency-kv-ee-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~kv-ee-property-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sian.agency-kv-ee-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": {
          "operation": {
            "title": "🎯 Mode",
            "enum": [
              "search",
              "detail"
            ],
            "type": "string",
            "description": "Property Search reads KV.EE results pages. Property Detail opens the advert addresses you paste in the Advert URLs field.",
            "default": "search"
          },
          "propertyType": {
            "title": "🏠 Property type",
            "enum": [
              "apartment",
              "house",
              "house-part",
              "land",
              "commercial",
              "garage"
            ],
            "type": "string",
            "description": "Which kind of property. Apartments for sale is the largest section, with about 8,900 live adverts nationwide.",
            "default": "apartment"
          },
          "dealType": {
            "title": "🏷️ Sale or rent",
            "enum": [
              "sale",
              "rent"
            ],
            "type": "string",
            "description": "Which side of the market to read. For rentals every price is the monthly rent.",
            "default": "sale"
          },
          "location": {
            "title": "📍 Where",
            "enum": [
              "all-estonia",
              "tallinn",
              "tartu",
              "parnu",
              "harjumaa",
              "hiiumaa",
              "ida-virumaa",
              "jarvamaa",
              "jogevamaa",
              "laane-virumaa",
              "laanemaa",
              "parnumaa",
              "polvamaa",
              "raplamaa",
              "saaremaa",
              "tartumaa",
              "valgamaa",
              "viljandimaa",
              "vorumaa"
            ],
            "type": "string",
            "description": "A city, a county or the whole country. Tallinn holds about 3,500 flats for sale. For a single district or a smaller town, set it on kv.ee and paste the address into Search page URLs.",
            "default": "tallinn"
          },
          "ownerOnly": {
            "title": "🙋 Owners only (no agencies)",
            "type": "boolean",
            "description": "Only adverts the owner placed directly, which is KV.EE's own 'otse omanikult' filter. Tallinn has about 600 owner-listed flats for sale.",
            "default": false
          },
          "priceMin": {
            "title": "💰 Price from (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Lowest asking price in euros. For rentals, the monthly rent. Leave empty for no floor."
          },
          "priceMax": {
            "title": "💰 Price up to (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Highest asking price in euros; for rentals, the monthly rent. Leave empty for no ceiling."
          },
          "areaMin": {
            "title": "📏 Floor area from (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Smallest floor area in square metres. Not used for land, which has no building: use Plot size instead."
          },
          "areaMax": {
            "title": "📏 Floor area up to (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Largest floor area in square metres. Not used for land."
          },
          "plotAreaMin": {
            "title": "🌳 Plot size from (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Smallest plot in square metres. Applies to land and houses only; 10,000 m² is one hectare."
          },
          "plotAreaMax": {
            "title": "🌳 Plot size up to (m²)",
            "minimum": 0,
            "type": "integer",
            "description": "Largest plot in square metres. Applies to land and houses only."
          },
          "roomsMin": {
            "title": "🛏️ Rooms from",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Fewest rooms. Estonian adverts count rooms, not bedrooms, so a two-room flat has one bedroom. Apartments, houses and house parts only."
          },
          "roomsMax": {
            "title": "🛏️ Rooms up to",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Most rooms. Apartments, houses and house parts only."
          },
          "floorMin": {
            "title": "🪜 Floor from",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Lowest floor. Set 2 to skip ground-floor flats. Apartments and commercial premises only."
          },
          "floorMax": {
            "title": "🪜 Floor up to",
            "minimum": 0,
            "maximum": 50,
            "type": "integer",
            "description": "Highest floor. Apartments and commercial premises only."
          },
          "yearBuiltMin": {
            "title": "📅 Built from",
            "minimum": 1800,
            "maximum": 2100,
            "type": "integer",
            "description": "Earliest construction year. Set 2015 to see modern stock only. Not used for land."
          },
          "yearBuiltMax": {
            "title": "📅 Built up to",
            "minimum": 1800,
            "maximum": 2100,
            "type": "integer",
            "description": "Latest construction year. Set 1991 for Soviet-era and older stock. Not used for land."
          },
          "sortBy": {
            "title": "↕️ Order results by",
            "enum": [
              "relevance",
              "newest",
              "oldest",
              "price-asc",
              "price-desc",
              "price-per-sqm-asc",
              "price-per-sqm-desc",
              "area-asc",
              "area-desc"
            ],
            "type": "string",
            "description": "The order KV.EE returns results in. It decides which properties you get first when you cap the row count, not how many exist.",
            "default": "relevance"
          },
          "maxResults": {
            "title": "🔢 Properties to collect",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "How many properties to return. Pages hold 50, so a run stops on the page that reaches this number.",
            "default": 100
          },
          "includeDetails": {
            "title": "📄 Open each advert in full",
            "type": "boolean",
            "description": "Also open every advert page for the full description, condition, ownership form, energy class, cadastral number, utility costs, GPS, agency and every photo. Billed as one Property Detail on top of the search row.",
            "default": false
          },
          "searchUrls": {
            "title": "🔗 Search page URLs",
            "type": "array",
            "description": "Paste KV.EE results pages instead of using the fields above, for example https://www.kv.ee/korterid-muuk/harjumaa/tallinn/kesklinn?price_max=300000 . Filters in the address are kept. Ignored in Property Detail mode.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "listingUrls": {
            "title": "🔗 Advert URLs",
            "type": "array",
            "description": "KV.EE advert addresses for Property Detail, one per line, for example https://www.kv.ee/3929693 or the full advert link.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}