# Time Series

> **Casafari is the AI agent-native real estate data intelligence platform.** The most complete property index in Europe: a deduplicated, cleaned property graph of residential and commercial property, for sale and for rent, in 16 countries. Every property is one record with its full price and market history. [How the property graph is built](/docs/property-graph).

`POST https://api.casafari.com/market-analytics-api/time-series`

[Area Insights](/docs/area-insights) · [REST API](/docs/rest/area-insights). Send `Authorization: Bearer $CASAFARI_TOKEN`; see [how to get a token](/docs/rest#get-a-token).

Over MCP: [`ma_get_time_series_data`](/docs/area-insights/get_time_series_data) (equivalent). See [MCP and REST compared](/docs/parity#area-insights).

## 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`.

- `types` (string[], required): The list of property types by type groups: **apartment:** ["apartment", "studio", "duplex", "penthouse", "dachgeschosswohnung", "etagenwohnung", "erdgeschosswohnung"] **house:** ["country_house", "house", "palace", "townhouse", "villa", "country_estate", "chalet", "bungalow", "family_house", "reihenhaus", "reihenendhaus", "reihenmittelhaus", "einfamilienhaus", "zweifamilienhaus", "landwirtschaftliche_betriebe"] **room:** ["room"] **building:** ["apartment_building", "office_building", "mix_use_building"] **investment:** ["retail", "office", "industrial", "warehouse", "hotel", "building", "other_commercial", "restaurant", "werkstatt"] **development:** ["apartment_development", "house_development"] **plot:** ["urban_plot", "rural_plot"] **other:** ["parking", "garage", "other"] *Note that you can select multiple types only from one property type group.* The list of property types specific to certain countries: **apartment:** &#9675; dachgeschosswohnung: **Germany** &#9675; etagenwohnung: **Germany** &#9675; erdgeschosswohnung: **Germany** **house:** &#9675; family_house: **Germany** &#9675; reihenhaus: **Germany** &#9675; reihenendhaus: **Germany** &#9675; reihenmittelhaus: **Germany** &#9675; einfamilienhaus: **Germany** &#9675; zweifamilienhaus: **Germany** &#9675; landwirtschaftliche_betriebe: **Germany** **investment:** &#9675; restaurant: **Germany** &#9675; werkstatt: **Germany** **plot:** &#9675; urban_plot: **Italy, Germany, Portugal, Spain, France** &#9675; rural_plot: **Italy, Germany, Portugal, Spain, France** 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_development`. at least 1 item.
- `business_type` (string, required) Values: `sale`, `rent`.
- `price_range` (object, optional, nullable)
  - `min` (integer, optional, nullable) 1–2147483647.
  - `max` (integer, optional, nullable) 1–2147483647.
- `price_per_sqm_range` (object, optional, nullable)
  - `min` (integer, optional, nullable) 1–2147483647.
  - `max` (integer, optional, nullable) 1–2147483647.
- `rooms_range` (object, optional, nullable)
  - `min` (integer, optional, nullable) 1–15000.
  - `max` (integer, optional, nullable) 1–15000.
- `bedrooms_range` (object, optional, nullable)
  - `min` (integer, optional, nullable) 0–15000.
  - `max` (integer, optional, nullable) 0–15000.
- `bathrooms_range` (object, optional, nullable)
  - `min` (integer, optional, nullable) 1–15000.
  - `max` (integer, optional, nullable) 1–15000.
- `total_area_range` (object, optional, nullable)
  - `min` (integer, optional, nullable) 1–1000000.
  - `max` (integer, optional, nullable) 1–1000000.
- `plot_area_range` (object, optional, nullable)
  - `min` (integer, optional, nullable) 1–1000000.
  - `max` (integer, optional, nullable) 1–1000000.
- `construction_year_range` (object, optional, nullable)
  - `min` (integer, optional, nullable) 1–3000.
  - `max` (integer, optional, nullable) 1–3000.
- `characteristics` (object, optional, nullable)
  - `must_have` (string[], optional): Include only properties that have all these characteristics. Values: `balcony`, `elevator`, `no_elevator`, `garage`, `garden`, `parking`, `storage`, `swimming_pool`, `terrace`, `rental_license`, `furniture`, `rented_out`, `life_annuity`.
  - `exclude` (string[], optional): Exclude properties that contain any of these characteristics. Values: `balcony`, `elevator`, `no_elevator`, `garage`, `garden`, `parking`, `storage`, `swimming_pool`, `terrace`, `rental_license`, `furniture`, `rented_out`, `life_annuity`.
- `conditions` (string[], optional): Property conditions, as returned by the GET /api/v1/references/conditions endpoint. Values: `used`, `ruin`, `very-good`, `new`, `other`. at least 1 item.
- `private` (boolean, optional): Whether the property is listed by a private individual, as opposed to an agent or a professional.
- `bank` (boolean, optional): Whether the property is owned by the bank.
- `auction` (boolean, optional): Whether the property is the subject of an auction. default false.
- `exclude_outliers` (boolean, optional): Exclude properties that are significantly underpriced or overpriced compared to similar properties. default false.
- `custom_location_boundary` (object, required)
  - `location_ids` (integer[], optional): List of location IDs. 1–10 items; 1–2147483647.
  - `polygon` (object[], optional): List of geo-points to search within. Polygon must contain at least 4 points. First and last points must match. at least 4 items.
    - `latitude` (number, required) -90–90.
    - `longitude` (number, required) -180–180.
  - `circle` (object, optional): Circle boundary to search within.
    - `distance` (integer, required): Maximum distance in meters from the requested `target_point` to the properties. 50–50000.
    - `target_point` (object, required): Target point coordinates to search around.
      - `latitude` (number, required) -90–90.
      - `longitude` (number, required) -180–180.
- `data_point` (string, required): Specifies the type of real estate data to retrieve for a given period. Values: `avg_price`, `avg_price_psqm`, `available_on_market`, `new`, `sold_or_rented`, `price_up`, `price_down`.
- `date_interval` (string, required): Defines the time interval for aggregating data points. Determines the frequency at which data is reported in the response. Values: `week`, `month`, `quarter`, `year`.
- `date_range` (object, required)
  - `min` (string (date), required): Start date in the format `YYYY-MM-DD`. If the specified date is not Monday - the closest previous Monday will be selected.
  - `max` (string (date), optional, nullable): End date in the format `YYYY-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.

```bash
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[]`.

- `date_start` (string (date), required): The starting date of the period associated with the passed `date_interval` field value. The format follows `YYYY-MM-DD`.
- `value` (number, required): The numerical value corresponding to the passed `data_point` field value for the given `date_start`.

### 204 No Content

No body.

### 400 Bad Request

Type: `object`.

- `message` (string, required)
- `errors` (string[], optional, nullable)
- `details` (string, optional, nullable)

### 422 Validation Error

Type: `object`.

- `detail` (object[], optional)
  - `loc` ((string | integer)[], required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any, optional)
  - `ctx` (object, optional)

## Questions about this

- [How do I analyse how prices in an area have moved over time?](/docs/faq/example-price-trend)
