{
  "openapi": "3.0.1",
  "info": {
    "title": "Real Estate Deal Score & Rental Yield (Germany & Austria)",
    "description": "Scrapes Immowelt, willhaben or Kleinanzeigen and scores every property against its local market: price per m², deviation from the postal-code median, a 0-100 deal score and gross rental yield from real local rents.",
    "version": "0.1",
    "x-build-id": "CxYVaF1qforcFsCts"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mocha_tassel~real-estate-deal-score/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mocha_tassel-real-estate-deal-score",
        "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/mocha_tassel~real-estate-deal-score/runs": {
      "post": {
        "operationId": "runs-sync-mocha_tassel-real-estate-deal-score",
        "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/mocha_tassel~real-estate-deal-score/run-sync": {
      "post": {
        "operationId": "run-sync-mocha_tassel-real-estate-deal-score",
        "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",
        "required": [
          "portal"
        ],
        "properties": {
          "portal": {
            "title": "Portal",
            "enum": [
              "immowelt",
              "willhaben",
              "kleinanzeigen"
            ],
            "type": "string",
            "description": "Which portal to collect and score properties from.",
            "default": "immowelt"
          },
          "searchUrl": {
            "title": "Search URL (optional)",
            "type": "string",
            "description": "Paste any search URL from the portal. If set, the location and category fields below are ignored."
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "For Immowelt, a German city name such as Berlin, Munich (München) or Leipzig. For willhaben, an Austrian town or state such as Wien, Graz or Steiermark.",
            "default": "berlin"
          },
          "offerType": {
            "title": "Buy or rent",
            "enum": [
              "buy",
              "rent"
            ],
            "type": "string",
            "description": "Whether to score properties for sale or for rent. Rental yield only makes sense for properties for sale.",
            "default": "buy"
          },
          "estateType": {
            "title": "Property type (Immowelt)",
            "enum": [
              "apartment",
              "house",
              "land",
              "apartment-house"
            ],
            "type": "string",
            "description": "Type of property. Applies to Immowelt only; willhaben and Kleinanzeigen use the category field instead.",
            "default": "apartment"
          },
          "category": {
            "title": "Category (willhaben / Kleinanzeigen)",
            "type": "string",
            "description": "For willhaben: eigentumswohnung, mietwohnung, haus-kaufen, haus-mieten, grundstuecke. For Kleinanzeigen: mietwohnung, eigentumswohnung, haus-mieten, haus-kaufen, grundstueck.",
            "default": "eigentumswohnung"
          },
          "locationSlug": {
            "title": "Location slug (Kleinanzeigen)",
            "type": "string",
            "description": "The location exactly as it appears in the Kleinanzeigen URL, for example karlsruhe."
          },
          "locationCode": {
            "title": "Location code (Kleinanzeigen)",
            "type": "string",
            "description": "The code starting with l from the Kleinanzeigen URL, for example l9186 for Karlsruhe."
          },
          "maxItems": {
            "title": "Properties to score",
            "minimum": 20,
            "maximum": 3000,
            "type": "integer",
            "description": "More properties make the market comparison more reliable. Below 50 the median gets thin; from 300 upwards you get solid per-postal-code medians.",
            "default": 300
          },
          "calculateYield": {
            "title": "Calculate gross rental yield",
            "type": "boolean",
            "description": "Runs a second search in the rental segment of the same area and derives the local rent per m² for each postal code. Only meaningful for properties for sale.",
            "default": true
          },
          "rentSampleSize": {
            "title": "Rental sample size",
            "minimum": 50,
            "maximum": 1000,
            "type": "integer",
            "description": "How many rental listings are used as the reference. Postal codes with fewer than three rentals are left without a yield figure rather than guessed.",
            "default": 200
          },
          "onlyDeals": {
            "title": "Return underpriced properties only",
            "type": "boolean",
            "description": "Keeps only properties priced clearly below their local market level.",
            "default": false
          },
          "minDealScore": {
            "title": "Minimum deal score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "50 equals the market median, higher means cheaper. 65 is a good starting point for bargains. Only applies when the option above is on.",
            "default": 65
          },
          "sortByDealScore": {
            "title": "Sort by deal score",
            "type": "boolean",
            "description": "Puts the best-priced properties first.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Property portals block requests from data centres. The default uses Apify residential proxies from the matching country — without them runs fail with HTTP 403. Your own proxies work too.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}