Properties Distribution
https://api.casafari.com/market-analytics-api/distributions/propertiesOn 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: no tool does this. MCP and REST compared.
Description
Returns the properties lightweight data sample and distribution quartiles.
Lightweight data includes only price and location data.
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/properties" \
-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 (13 fields)
propertiesobject[]required6 properties
property_idintegerrequiredproperty_unit_idintegerrequiredpriceintegerrequiredprice_per_sqmnumberrequiredlocation_idintegerrequiredcoordinatesobjectrequired2 properties
latitudenumberrequiredlongitudenumberrequiredquartilesobjectrequired3 properties
lowernumberrequiredmeannumberrequireduppernumberrequiredExample from a real call (Madrid, apartments for sale)
{
"properties": [
{
"property_id": 1000001,
"property_unit_id": 2000001,
"price": 490000,
"price_per_sqm": 4900,
"location_id": 11848,
"coordinates": {
"latitude": 40.4168,
"longitude": -3.7038
}
},
{
"property_id": 1000002,
"property_unit_id": 2000002,
"price": 459000,
"price_per_sqm": 9180,
"location_id": 11765,
"coordinates": {
"latitude": 40.4232,
"longitude": -3.6921
}
}
],
"quartiles": {
"lower": 4236,
"mean": 6429,
"upper": 9403.5
}
}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