Bedrooms Distribution
https://api.casafari.com/market-analytics-api/distributions/bedroomsSend Authorization: Bearer $CASAFARI_TOKEN; see how to get a token.
Over MCP: ma_get_bedrooms_distribution (equivalent). MCP and REST compared.
Description
Returns property distribution based on the number of bedrooms.
Each distribution unit includes the bedroom count, number of matching properties, and related analysis.
Request body
Content type application/json. Required. Type: object.
typesstring[]requiredapartment 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 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/bedrooms" \
-H "Authorization: Bearer $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"types": [
"apartment"
],
"business_type": "sale",
"custom_location_boundary": {
"location_ids": [
1
]
}
}'Responses
200 Successful Response
Type: object[].
Show the response shape (4 fields)
bedroomsstringrequiredproperties_countintegerrequiredaverage_pricenumberrequiredaverage_price_per_sqmnumberrequired204 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