Price Distribution
https://api.casafari.com/market-analytics-api/distributions/pricesOn the existing API at https://api.casafari.com (contract clients): send Authorization: Bearer $CASAFARI_TOKEN; see how to get a token. New users: the platform's REST API, platform API keys.
Over MCP: area-insights_get_price_distribution (equivalent). MCP and REST compared.
Description
Returns the number of properties distributed across price ranges.
Each range is defined by price boundaries and shows the number of properties with prices falling within those boundaries.
Request body
Content type application/json. Required. Type: object.
typesstring[]required42 allowed values
apartment studio duplex penthouse dachgeschosswohnung etagenwohnung erdgeschosswohnung country_house house palace townhouse villa country_estate chalet bungalow family_house reihenhaus reihenendhaus reihenmittelhaus einfamilienhaus zweifamilienhaus landwirtschaftliche_betriebe retail office industrial warehouse hotel building other_commercial restaurant werkstatt urban_plot rural_plot room parking garage other apartment_building office_building mix_use_building apartment_development house_developmentbusiness_typestringrequiredsale rentprice_rangeobjectnullable2 properties
minintegernullablemaxintegernullableprice_per_sqm_rangeobjectnullable2 properties
minintegernullablemaxintegernullablerooms_rangeobjectnullable2 properties
minintegernullablemaxintegernullablebedrooms_rangeobjectnullable2 properties
minintegernullablemaxintegernullablebathrooms_rangeobjectnullable2 properties
minintegernullablemaxintegernullabletotal_area_rangeobjectnullable2 properties
minintegernullablemaxintegernullableplot_area_rangeobjectnullable2 properties
minintegernullablemaxintegernullableconstruction_year_rangeobjectnullable2 properties
minintegernullablemaxintegernullablecharacteristicsobjectnullable2 properties
must_havestring[]balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityexcludestring[]balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuityconditionsstring[]used ruin very-good new otherprivatebooleanbankbooleanauctionbooleanexclude_outliersbooleancustom_location_boundaryobjectrequired3 properties
location_idsinteger[]polygonobject[]2 properties
latitudenumberrequiredlongitudenumberrequiredcircleobject2 properties
distanceintegerrequiredtarget_point to the properties.target_pointobjectrequired2 properties
latitudenumberrequiredlongitudenumberrequiredExample request
Placeholders only: replace the token and the values with your own.
curl -X POST "https://api.casafari.com/market-analytics-api/distributions/prices" \
-H "Authorization: Bearer $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"types": [
"apartment"
],
"business_type": "sale",
"custom_location_boundary": {
"location_ids": [
11737
]
}
}'Responses
200 Successful Response
Type: object[].
Show the response shape (4 fields)
lower_boundintegerrequiredupper_boundintegerrequiredproperties_countintegerrequiredis_meanbooleanrequiredExample from a real call (Madrid, apartments for sale) (long arrays shortened)
[
{
"lower_bound": 1,
"upper_bound": 50001,
"properties_count": 10,
"is_mean": false
},
{
"lower_bound": 50001,
"upper_bound": 100001,
"properties_count": 39,
"is_mean": false
}
]204 No Content
No body.
400 Bad Request
Type: object.
Show the response shape (3 fields)
messagestringrequirederrorsstring[]nullabledetailsstringnullable422 Validation Error
Type: object.
Show the response shape (6 fields)
detailobject[]5 properties
loc(string | integer)[]requiredmsgstringrequiredtypestringrequiredinputanyctxobject