---
title: "Time Series"
method: POST
path: "/market-analytics-api/time-series"
tags: ["market-analytics-api---time series"]
---

# Time Series

`POST /market-analytics-api/time-series`

## Request

- Base URL: `https://api.casafari.com`
- URL: `https://api.casafari.com/market-analytics-api/time-series`
- Auth: HTTP bearer

Returns time series data for the real estate market.<br>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

- MarketAnalyticsApiTimeSeriesRequestSchema
  - `types` MarketAnalyticsApiExternalEstateTypeEnum[], required: The list of property types by type groups:<br/><strong>apartment: </strong>["apartment", "studio", "duplex", "penthouse", "dachgeschosswohnung", "etagenwohnung", "erdgeschosswohnung"]<br/><strong>house: </strong>["country_house", "house", "palace", "townhouse", "villa", "country_estate", "chalet", "bungalow", "family_house", "reihenhaus", "reihenendhaus", "reihenmittelhaus", "einfamilienhaus", "zweifamilienhaus", "landwirtschaftliche_betriebe"]<br/><strong>room: </strong>["room"]<br/><strong>building: </strong>["apartment_building", "office_building", "mix_use_building"]<br/><strong>investment: </strong>["retail", "office", "industrial", "warehouse", "hotel", "building", "other_commercial", "restaurant", "werkstatt"]<br/><strong>development: </strong>["apartment_development", "house_development"]<br/><strong>plot: </strong>["urban_plot", "rural_plot"]<br/><strong>other: </strong>["parking", "garage", "other"]<br/><br/><i>Note that you can select multiple types only from one property type group.</i><br><br><span style="color:red">The list of property types specific to certain countries</span>:<br/><strong>apartment:</strong><br/>&#9675; dachgeschosswohnung: <strong>Germany</strong><br/>&#9675; etagenwohnung: <strong>Germany</strong><br/>&#9675; erdgeschosswohnung: <strong>Germany</strong><br/><strong>house:</strong><br/>&#9675; family_house: <strong>Germany</strong><br/>&#9675; reihenhaus: <strong>Germany</strong><br/>&#9675; reihenendhaus: <strong>Germany</strong><br/>&#9675; reihenmittelhaus: <strong>Germany</strong><br/>&#9675; einfamilienhaus: <strong>Germany</strong><br/>&#9675; zweifamilienhaus: <strong>Germany</strong><br/>&#9675; landwirtschaftliche_betriebe: <strong>Germany</strong><br/><strong>investment:</strong><br/>&#9675; restaurant: <strong>Germany</strong><br/>&#9675; werkstatt: <strong>Germany</strong><br/><strong>plot:</strong><br/>&#9675; urban_plot: <strong>Italy, Germany, Portugal, Spain, France</strong><br/>&#9675; rural_plot: <strong>Italy, Germany, Portugal, Spain, France</strong>
  - `business_type` 'sale' | 'rent', required
  - `price_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema8
    - `min` integer, nullable
    - `max` integer, nullable
  - `price_per_sqm_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema9
    - `min` integer, nullable
    - `max` integer, nullable
  - `rooms_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema10
    - `min` integer, nullable
    - `max` integer, nullable
  - `bedrooms_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema11
    - `min` integer, nullable
    - `max` integer, nullable
  - `bathrooms_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema12
    - `min` integer, nullable
    - `max` integer, nullable
  - `total_area_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema13
    - `min` integer, nullable
    - `max` integer, nullable
  - `plot_area_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema14
    - `min` integer, nullable
    - `max` integer, nullable
  - `construction_year_range` MarketAnalyticsApiapiSchemaRangesIntRangeSchema15
    - `min` integer, nullable
    - `max` integer, nullable
  - `characteristics` MarketAnalyticsApiCharacteristicsRequestSchema
    - `must_have` MarketAnalyticsApiExternalCharacteristicEnum[]: Include only properties that have all these characteristics.
    - `exclude` MarketAnalyticsApiExternalCharacteristicEnum[]: Exclude properties that contain any of these characteristics.
  - `conditions` MarketAnalyticsApiExternalConditionEnum[]: Property conditions, as returned by the [GET /api/v1/references/conditions](/#operation/api__get__v1__references__conditions) endpoint.
  - `private` boolean: Whether the property is listed by a private individual, as opposed to an agent or a professional.
  - `bank` boolean: Whether the property is owned by the bank.
  - `auction` boolean: Whether the property is the subject of an auction.
  - `exclude_outliers` boolean: Exclude properties that are significantly underpriced or overpriced compared to similar properties.
  - `custom_location_boundary` MarketAnalyticsApiLocationBoundarySchema, required
    - `location_ids` integer[]: List of location IDs.
    - `polygon` MarketAnalyticsApiGeoPoint[]: List of geo-points to search within. Polygon must contain at least 4 points. First and last points must match.
      - `latitude` number, required
      - `longitude` number, required
    - `circle` MarketAnalyticsApiCircleBoundarySchema
      - `distance` integer, required: Maximum distance in meters from the requested `target_point` to the properties.
      - `target_point` MarketAnalyticsApiGeoPoint, required
        - `latitude` number, required
        - `longitude` number, required
  - `data_point` 'avg_price' | 'avg_price_psqm' | 'available_on_market' | 'new' | 'sold_or_rented' | 'price_up' | 'price_down', required
  - `date_interval` 'week' | 'month' | 'quarter' | 'year', required
  - `date_range` MarketAnalyticsApiapiSchemaRangesDateRangeSchema2, required
    - `min` string, date, nullable, 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, nullable: End date in the format `YYYY-MM-DD`. If the specified date is not Sunday - the closest previous Sunday will be selected.

## Response `200`

Successful Response

- MarketAnalyticsApiTimeSeriesUnitResponseSchema[]
  - `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, nullable, required: The numerical value corresponding to the passed `data_point` field value for the given `date_start`.

## Other responses

- `204`: No Content
- `400`: Bad Request
- `422`: Validation Error

---

[API](https://skmtc.dev/casafari/apis/casafari-api.md) · [All operations](https://skmtc.dev/casafari/apis/casafari-api/llms.txt) · [OpenAPI document](https://skmtc.dev/casafari/apis/casafari-api/revisions/6743b99d4bf9?raw)
