---
title: "Price Distribution"
method: POST
path: "/market-analytics-api/distributions/prices"
tags: ["market-analytics-api---distributions"]
---

# Price Distribution

`POST /market-analytics-api/distributions/prices`

## Request

- Base URL: `https://api.casafari.com`
- URL: `https://api.casafari.com/market-analytics-api/distributions/prices`
- Auth: HTTP bearer

Returns the number of properties distributed across price ranges.<br>Each range is defined by price boundaries and shows the number of properties with prices falling within those boundaries.

## Request body

- MarketAnalyticsApiPriceDistributionRequestSchema
  - `types` MarketAnalyticsApiExternalEstateTypeEnum[], required: The list of property types by type groups:<br/><strong>apartment: </strong>["apartment", "studio", "duplex", "penthouse", "dachgeschosswohnung", "etagenwohnung", "erdgeschosswohnung"]<br/><strong>house: </strong>["country_house", "house", "palace", "townhouse", "villa", "country_estate", "chalet", "bungalow", "family_house", "reihenhaus", "reihenendhaus", "reihenmittelhaus", "einfamilienhaus", "zweifamilienhaus", "landwirtschaftliche_betriebe"]<br/><strong>room: </strong>["room"]<br/><strong>building: </strong>["apartment_building", "office_building", "mix_use_building"]<br/><strong>investment: </strong>["retail", "office", "industrial", "warehouse", "hotel", "building", "other_commercial", "restaurant", "werkstatt"]<br/><strong>development: </strong>["apartment_development", "house_development"]<br/><strong>plot: </strong>["urban_plot", "rural_plot"]<br/><strong>other: </strong>["parking", "garage", "other"]<br/><br/><i>Note that you can select multiple types only from one property type group.</i><br><br><span style="color:red">The list of property types specific to certain countries</span>:<br/><strong>apartment:</strong><br/>&#9675; dachgeschosswohnung: <strong>Germany</strong><br/>&#9675; etagenwohnung: <strong>Germany</strong><br/>&#9675; erdgeschosswohnung: <strong>Germany</strong><br/><strong>house:</strong><br/>&#9675; family_house: <strong>Germany</strong><br/>&#9675; reihenhaus: <strong>Germany</strong><br/>&#9675; reihenendhaus: <strong>Germany</strong><br/>&#9675; reihenmittelhaus: <strong>Germany</strong><br/>&#9675; einfamilienhaus: <strong>Germany</strong><br/>&#9675; zweifamilienhaus: <strong>Germany</strong><br/>&#9675; landwirtschaftliche_betriebe: <strong>Germany</strong><br/><strong>investment:</strong><br/>&#9675; restaurant: <strong>Germany</strong><br/>&#9675; werkstatt: <strong>Germany</strong><br/><strong>plot:</strong><br/>&#9675; urban_plot: <strong>Italy, Germany, Portugal, Spain, France</strong><br/>&#9675; rural_plot: <strong>Italy, Germany, Portugal, Spain, France</strong>
  - `business_type` 'sale' | 'rent', required
  - `price_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema8
    - `min` integer, nullable
    - `max` integer, nullable
  - `price_per_sqm_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema9
    - `min` integer, nullable
    - `max` integer, nullable
  - `rooms_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema10
    - `min` integer, nullable
    - `max` integer, nullable
  - `bedrooms_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema11
    - `min` integer, nullable
    - `max` integer, nullable
  - `bathrooms_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema12
    - `min` integer, nullable
    - `max` integer, nullable
  - `total_area_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema13
    - `min` integer, nullable
    - `max` integer, nullable
  - `plot_area_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema14
    - `min` integer, nullable
    - `max` integer, nullable
  - `construction_year_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema15
    - `min` integer, nullable
    - `max` integer, nullable
  - `characteristics` MarketAnalyticsApiCharacteristicsRequestSchema
    - `must_have` MarketAnalyticsApiExternalCharacteristicEnum[]: Include only properties that have all these characteristics.
    - `exclude` MarketAnalyticsApiExternalCharacteristicEnum[]: Exclude properties that contain any of these characteristics.
  - `conditions` MarketAnalyticsApiExternalConditionEnum[]: Property conditions, as returned by the [GET /api/v1/references/conditions](/#operation/api__get__v1__references__conditions) endpoint.
  - `private` boolean: Whether the property is listed by a private individual, as opposed to an agent or a professional.
  - `bank` boolean: Whether the property is owned by the bank.
  - `auction` boolean: Whether the property is the subject of an auction.
  - `exclude_outliers` boolean: Exclude properties that are significantly underpriced or overpriced compared to similar properties.
  - `custom_location_boundary` MarketAnalyticsApiLocationBoundarySchema, required
    - `location_ids` integer[]: List of location IDs.
    - `polygon` MarketAnalyticsApiGeoPoint[]: List of geo-points to search within. Polygon must contain at least 4 points. First and last points must match.
      - `latitude` number, required
      - `longitude` number, required
    - `circle` MarketAnalyticsApiCircleBoundarySchema
      - `distance` integer, required: Maximum distance in meters from the requested `target_point` to the properties.
      - `target_point` MarketAnalyticsApiGeoPoint, required
        - `latitude` number, required
        - `longitude` number, required

## Response `200`

Successful Response

- MarketAnalyticsApiPriceDistributionUnitResponseSchema[]
  - `lower_bound` integer, required: The lower price bound of the distribution unit.
  - `upper_bound` integer, nullable, required: The upper price bound of the distribution unit.
  - `properties_count` integer, required: The number of properties that participated in the distribution.
  - `is_mean` boolean, required: Indicates whether the mean value is within this distribution unit.

## Other responses

- `204`: No Content
- `400`: Bad Request
- `422`: Validation Error

---

[API](https://skmtc.dev/casafari/apis/casafari-api.md) · [All operations](https://skmtc.dev/casafari/apis/casafari-api/llms.txt) · [OpenAPI document](https://skmtc.dev/casafari/apis/casafari-api/revisions/6743b99d4bf9?raw)
