Time Series
https://api.casafari.com/market-analytics-api/time-seriesLegacy API (api.casafari.com). A route of the existing API for Casafari clients with a contract, not of the platform. On the platform: POST /v1/area-insights/time-series.
On the Legacy 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.
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, other.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": [
11737
]
},
"data_point": "avg_price_psqm",
"date_interval": "quarter",
"date_range": {
"min": "2024-01-01",
"max": "2025-12-31"
}
}'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.Example from a real call (Madrid, apartments for sale) (long arrays shortened)
[
{
"date_start": "2024-01-01",
"value": 5294.94
},
{
"date_start": "2024-04-01",
"value": 5421.34
}
]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