{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/casafari/json-schema/casafari-market-analytics-api-analysis-response-schema.json",
  "title": "AnalysisResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/casafari-market-analytics-api-analysis-api-openapi.yml#/components/schemas/MarketAnalyticsApiAnalysisResponse",
  "properties": {
    "price_statistics": {
      "$ref": "#/$defs/MarketAnalyticsApiPriceStatistics",
      "description": "Statistics including the average price and average price per square meter for properties matching the requested filters."
    },
    "price_estimation": {
      "$ref": "#/$defs/MarketAnalyticsApiPriceEstimation",
      "description": "Provides estimated prices, including a quick sale price `fast_market_price` and an inflated price `out_of_market_price`."
    },
    "price_evolution": {
      "$ref": "#/$defs/MarketAnalyticsApiPriceEvolution",
      "description": "Represents time series data showing how average prices and prices per square meter have changed over time for inactive properties."
    },
    "summary_price_evolution": {
      "$ref": "#/$defs/MarketAnalyticsApiPriceEvolution",
      "description": "Represents time series data showing how average prices and prices per square meter have changed over time for both active and inactive properties."
    },
    "average_days_on_the_market": {
      "type": "integer",
      "title": "Average Days On The Market",
      "description": "Indicates the average number of days properties remain listed on the market before being sold or removed."
    }
  },
  "type": "object",
  "required": [
    "price_statistics",
    "price_estimation",
    "price_evolution",
    "summary_price_evolution",
    "average_days_on_the_market"
  ],
  "$defs": {
    "MarketAnalyticsApiPriceEstimation": {
      "properties": {
        "fast_market_price": {
          "type": "integer",
          "title": "Fast Market Price"
        },
        "out_of_market_price": {
          "type": "integer",
          "title": "Out Of Market Price"
        }
      },
      "type": "object",
      "required": [
        "fast_market_price",
        "out_of_market_price"
      ],
      "title": "PriceEstimation"
    },
    "MarketAnalyticsApiPriceEvolution": {
      "properties": {
        "avg_price": {
          "$ref": "#/$defs/MarketAnalyticsApiStatisticsByMonths"
        },
        "avg_price_per_sqm": {
          "$ref": "#/$defs/MarketAnalyticsApiStatisticsByMonths"
        }
      },
      "type": "object",
      "required": [
        "avg_price",
        "avg_price_per_sqm"
      ],
      "title": "PriceEvolution"
    },
    "MarketAnalyticsApiPriceStatistics": {
      "properties": {
        "average_price": {
          "type": "integer",
          "title": "Average Price"
        },
        "average_price_per_sqm": {
          "type": "integer",
          "title": "Average Price Per Sqm"
        }
      },
      "type": "object",
      "required": [
        "average_price",
        "average_price_per_sqm"
      ],
      "title": "PriceStatistics"
    },
    "MarketAnalyticsApiStatisticsByMonths": {
      "properties": {
        "for_the_last_1_month": {
          "type": "integer",
          "title": "For The Last 1 Month"
        },
        "for_the_last_3_month": {
          "type": "integer",
          "title": "For The Last 3 Month"
        },
        "for_the_last_6_month": {
          "type": "integer",
          "title": "For The Last 6 Month"
        },
        "for_the_last_9_month": {
          "type": "integer",
          "title": "For The Last 9 Month"
        },
        "for_the_last_12_month": {
          "type": "integer",
          "title": "For The Last 12 Month"
        }
      },
      "type": "object",
      "required": [
        "for_the_last_1_month",
        "for_the_last_3_month",
        "for_the_last_6_month",
        "for_the_last_9_month",
        "for_the_last_12_month"
      ],
      "title": "StatisticsByMonths"
    }
  }
}