{
  "openapi": "3.0.1",
  "info": {
    "title": "StayYield Intelligence",
    "description": "Premium Italian real estate intelligence for short-term rental investors. Analyze listings, estimate BnB potential, ROI, yield, payback period, and risk signals to discover the best investment opportunities faster.",
    "version": "0.0",
    "x-build-id": "blq9VqCTtcgZzCrRt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ayrtondavoli97~italy-bnb-revenue-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ayrtondavoli97-italy-bnb-revenue-intelligence",
        "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/ayrtondavoli97~italy-bnb-revenue-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-ayrtondavoli97-italy-bnb-revenue-intelligence",
        "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/ayrtondavoli97~italy-bnb-revenue-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-ayrtondavoli97-italy-bnb-revenue-intelligence",
        "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": {
          "runMode": {
            "title": "Run mode",
            "enum": [
              "investment_dataset",
              "source_scan"
            ],
            "type": "string",
            "description": "Choose Source scan for a quick extraction quality check, or Premium investment dataset for the full ranked ROI output.",
            "default": "investment_dataset"
          },
          "regions": {
            "title": "Target region",
            "type": "array",
            "description": "Select the market to analyze. Puglia is the validated premium baseline.",
            "items": {
              "type": "string",
              "enum": [
                "puglia",
                "sicilia",
                "campania",
                "toscana",
                "lazio",
                "lombardia",
                "veneto",
                "liguria",
                "sardegna",
                "emilia_romagna",
                "calabria",
                "piemonte",
                "umbria",
                "marche",
                "abruzzo",
                "friuli_venezia_giulia",
                "trentino_alto_adige",
                "basilicata",
                "all_italy"
              ],
              "enumTitles": [
                "Puglia - validated",
                "Sicilia",
                "Campania",
                "Toscana",
                "Lazio",
                "Lombardia",
                "Veneto",
                "Liguria",
                "Sardegna",
                "Emilia-Romagna",
                "Calabria",
                "Piemonte",
                "Umbria",
                "Marche",
                "Abruzzo",
                "Friuli-Venezia Giulia",
                "Trentino-Alto Adige",
                "Basilicata",
                "All Italy"
              ]
            },
            "default": [
              "puglia"
            ]
          },
          "maxItems": {
            "title": "Max listings to analyze",
            "minimum": 10,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of real listings to collect and rank. Use 100 for quick tests, 500 for a premium dataset run.",
            "default": 500
          },
          "cities": {
            "title": "Optional city filter",
            "type": "array",
            "description": "Optional city names to narrow the run. Leave empty to use the built-in premium city set for the selected region.",
            "items": {
              "type": "string"
            }
          },
          "expectedNightlyRate": {
            "title": "Fallback nightly rate (€)",
            "minimum": 20,
            "maximum": 1000,
            "type": "number",
            "description": "Fallback nightly rate used when the actor estimates revenue. City/tourism adjustments may still be applied by the internal model.",
            "default": 120
          },
          "expectedOccupancyRate": {
            "title": "Fallback occupancy rate",
            "minimum": 0.1,
            "maximum": 0.95,
            "type": "number",
            "description": "Fallback annual occupancy rate. Example: 0.55 means 55% occupancy.",
            "default": 0.55
          },
          "financingMode": {
            "title": "Financing mode",
            "enum": [
              "cash",
              "mortgage"
            ],
            "type": "string",
            "description": "Choose whether returns are calculated as a cash acquisition or with mortgage assumptions when supported.",
            "default": "cash"
          },
          "renovationLevel": {
            "title": "Default renovation level",
            "enum": [
              "light",
              "medium",
              "heavy"
            ],
            "type": "string",
            "description": "Default renovation assumption when the listing does not clearly state the condition. Listings with renovation-risk text are automatically upgraded to heavier assumptions.",
            "default": "medium"
          },
          "propertyCondition": {
            "title": "Default property condition",
            "enum": [
              "excellent",
              "good",
              "average",
              "poor"
            ],
            "type": "string",
            "description": "Default property condition used by ROI when source text does not contain stronger condition signals.",
            "default": "good"
          },
          "minInvestmentScore": {
            "title": "Minimum base investment score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Optional filter on the risk-adjusted base score. Keep 0 to export the full ranked dataset.",
            "default": 0
          },
          "minPrice": {
            "title": "Minimum purchase price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum listing price. Use 0 to disable.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum purchase price (€)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional maximum listing price. Use 0 to disable.",
            "default": 0
          },
          "minSurfaceSqm": {
            "title": "Minimum surface (sqm)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional minimum surface in square metres. Use 0 to disable.",
            "default": 0
          },
          "otaFeeRate": {
            "title": "OTA commission rate",
            "minimum": 0,
            "maximum": 0.5,
            "type": "number",
            "description": "Estimated OTA/platform commission rate. Example: 0.15 means 15%.",
            "default": 0.15
          },
          "cleaningCostPerBookedNight": {
            "title": "Cleaning cost per booked night (€)",
            "minimum": 0,
            "maximum": 250,
            "type": "number",
            "description": "Estimated cleaning cost allocated to each booked night.",
            "default": 18
          },
          "utilitiesRate": {
            "title": "Utilities cost rate",
            "minimum": 0,
            "maximum": 0.5,
            "type": "number",
            "description": "Estimated utilities cost as a share of gross revenue.",
            "default": 0.08
          },
          "maintenanceReserveRate": {
            "title": "Maintenance reserve rate",
            "minimum": 0,
            "maximum": 0.5,
            "type": "number",
            "description": "Estimated maintenance reserve as a share of gross revenue.",
            "default": 0.06
          },
          "insuranceRate": {
            "title": "Insurance rate",
            "minimum": 0,
            "maximum": 0.5,
            "type": "number",
            "description": "Estimated insurance cost as a share of gross revenue.",
            "default": 0.02
          },
          "taxRate": {
            "title": "Tax reserve rate",
            "minimum": 0,
            "maximum": 0.7,
            "type": "number",
            "description": "Rough analytical tax reserve, not tax advice.",
            "default": 0.1
          },
          "managementFeeRate": {
            "title": "Management fee rate",
            "minimum": 0,
            "maximum": 0.5,
            "type": "number",
            "description": "Estimated property management fee as a share of gross revenue. Use 0 if self-managed.",
            "default": 0
          },
          "sources": {
            "title": "Data source",
            "type": "array",
            "description": "Production source. Keep Wikicasa selected for stable Apify runs.",
            "items": {
              "type": "string",
              "enum": [
                "wikicasa"
              ],
              "enumTitles": [
                "Wikicasa.it - stable source"
              ]
            },
            "default": [
              "wikicasa"
            ]
          },
          "wikicasaApiLimit": {
            "title": "Wikicasa API page size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of Wikicasa API items requested per offset. Default 25 is stable.",
            "default": 25
          },
          "wikicasaMaxOffsetsPerCity": {
            "title": "Wikicasa offsets per city",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many offsets/pages to request per configured city/locality.",
            "default": 10
          },
          "minApiItemsBeforeCrawler": {
            "title": "Minimum API items before fallback",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Browser fallback starts only if Wikicasa API returns fewer than this number of listings. Use 1 to disable fallback when API returns anything.",
            "default": 1
          },
          "useBrowserFallback": {
            "title": "Use browser fallback",
            "type": "boolean",
            "description": "Optional fallback only. Production Wikicasa API runs normally do not need browser fallback.",
            "default": false
          },
          "useApifyProxy": {
            "title": "Use Apify proxy",
            "type": "boolean",
            "description": "Not required for the validated Wikicasa API flow. Enable only for fallback experiments.",
            "default": false
          },
          "apifyProxyGroups": {
            "title": "Apify proxy groups",
            "type": "array",
            "description": "Proxy groups used only if proxy is enabled.",
            "items": {
              "type": "string",
              "enum": [
                "RESIDENTIAL",
                "AUTO"
              ],
              "enumTitles": [
                "Residential",
                "Auto / datacenter"
              ]
            },
            "default": [
              "RESIDENTIAL"
            ]
          },
          "startUrls": {
            "title": "Extra start URLs",
            "type": "array",
            "description": "Optional specific Wikicasa URLs. Usually not needed for premium runs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "propertiesJson": {
            "title": "Manual fallback JSON",
            "type": "string",
            "description": "Advanced fallback. Paste a JSON array of property objects if you already have listing data."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}