Time Series
https://api.casafari.com/market-analytics-api/time-seriesSend Authorization: Bearer $CASAFARI_TOKEN; see how to get a token.
Over MCP: ma_get_time_series_data (equivalent). MCP and REST compared.
Description
Returns time series data for the real estate market.
Each time series unit includes the interval start date based on the provided date_interval and a value corresponding to the selected data_point.
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
latitudenumberrequiredlongitudenumberrequireddata_pointstringrequiredavg_price avg_price_psqm available_on_market new sold_or_rented price_up price_downdate_intervalstringrequiredweek month quarter yeardate_rangeobjectrequired2 properties
minstring (date)requiredYYYY-MM-DD. If the specified date is not Monday - the closest previous Monday will be selected.maxstring (date)nullableYYYY-MM-DD. If the specified date is not Sunday - the closest previous Sunday will be selected.Example request
Placeholders only: replace the token and the values with your own.
curl -X POST "https://api.casafari.com/market-analytics-api/time-series" \
-H "Authorization: Bearer $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"types": [
"apartment"
],
"business_type": "sale",
"custom_location_boundary": {
"location_ids": [
1
]
},
"data_point": "avg_price",
"date_interval": "week",
"date_range": {
"min": "2025-01-01"
}
}'Responses
200 Successful Response
Type: object[].
Show the response shape (2 fields)
date_startstring (date)requireddate_interval field value. The format follows YYYY-MM-DD.valuenumberrequireddata_point field value for the given date_start.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