Understand an area · Use case
How have asking prices per m² moved in an area over time?
Casafari Area Insights builds a price-per-m² trend for a city or district over MCP. ma_get_time_series_data with data_point avg_price_psqm returns one value per week, month, quarter or year. ma_get_time_series_operations then computes growth and volatility on that series, such as delta_pct, cagr, yoy_last and cv. Resolve the place first with ma_get_location_typeahead.
Products: Area Insights
Short answer
Area Insights returns one aggregated value per period for the metric you pick. For a price trend, set data_point to avg_price_psqm and date_interval to week, month, quarter or year. ma_get_time_series_data then returns a list of date_start and value pairs.
A second tool, ma_get_time_series_operations, takes the same filters as one segment and computes statistics on that series. The statistics include:
delta_pct: percentage change between the first and last data points.cagr: compound annual growth rate.cv: coefficient of variation.std: standard deviation.- Others such as
yoy_last,median,slope_per_periodand moving averages likemovavg_last_12.
Set business_type to rent to get asking rents per m² instead of sale prices.
If your assistant has not used Area Insights before, it should call list_servers first. That call returns the group's own usage instructions.
Steps
Resolve the place with ma_get_location_typeahead (English name) to a location_id
- Call
ma_get_location_typeaheadwithlocation_nameset to an English place name, for exampleValencia. Each suggestion haslocation_id,name,matched_name,administrative_levelandbreadcrumbs(the parent locations). If several places share the name, add more detail to the query and use the breadcrumbs to pick the right one. See How do I turn a place name into a location id?.
Anchor the date range with ma_get_current_datetime
- Call
ma_get_current_datetime; it takes no input. It returnscurrent_datetimein ISO format, so "the last three years" becomes a concretedate_range.min.
Call ma_get_time_series_data: type_group, business_type, data_point avg_price_psqm, date_interval, date_range
- Call
ma_get_time_series_datawith onerequest_dataobject.- Required:
type_group(apartmentorhouse),business_type(saleorrent),alias(your name for the segment),custom_location_boundary(location_idsor acircle),data_point(avg_price_psqm),date_intervalanddate_range(minis required,maxis optional). - Optional filters:
price_range,price_per_sqm_range,bedrooms_range,bathrooms_range,total_area_range,construction_year_range,characteristics,conditionsandexclude_outliers.
- Required:
Call ma_get_time_series_operations with operations such as delta_pct, cagr, yoy_last, cv, movavg_last_12
- Call
ma_get_time_series_operations.- Set
request_data.segmentto the same object you sent in step 3. - Set
request_data.operationsto the statistics you want. If you omitoperations, a default minimal set is applied. - The result has
alias,date_start,date_end,date_interval,total_of_data_pointsandresults, a list ofoperationandvaluepairs.
- Set
Example: apartments for sale in Valencia, quarterly
Prompt to the assistant: "Chart the average price per m² of apartments for sale in Valencia by quarter since 2022, then give me the total change, the CAGR and how volatile it was."
The assistant calls list_servers, then ma_get_location_typeahead (Valencia), then ma_get_current_datetime, then ma_get_time_series_data:
{
"request_data": {
"alias": "Valencia apartments, sale",
"type_group": "apartment",
"business_type": "sale",
"custom_location_boundary": {"location_ids": [LOCATION_ID]},
"data_point": "avg_price_psqm",
"date_interval": "quarter",
"date_range": {"min": "2022-01-01"}
}
}LOCATION_ID is the location_id the typeahead returned for Valencia. The response has one row per quarter, in this shape:
{"result": [{"date_start": "YYYY-MM-DD", "value": <number or null>}]}Next, the assistant calls ma_get_time_series_operations. It sends the same object as segment, with "operations": ["delta_pct", "cagr", "yoy_last", "cv", "movavg_last_12"]. The response has this shape:
{"alias": "Valencia apartments, sale", "date_start": "...", "date_end": "...", "date_interval": "quarter", "total_of_data_points": <n>, "results": [{"operation": "delta_pct", "value": <number>}, {"operation": "cagr", "value": <number>}]}The assistant charts the quarterly values. It reports delta_pct as the total change since 2022, cagr as the yearly pace and cv as the volatility. The figures come from the live call; these docs publish none.
How to read the result
date_start marks the period; dates snap to Monday and Sunday
date_start is the first day of each period for the date_interval you chose.
The tool adjusts the dates you send:
- If
date_range.minis not a Monday, the closest previous Monday is used. - If
date_range.maxis not a Sunday, the closest previous Sunday is used.
So the first and last periods can start or end a few days away from the dates you typed.
Prefer avg_price_psqm over avg_price for broad comparisons
The tool's own notes recommend price per m² over total price for broader analyses. Price per m² keeps differences in home size from distorting the comparison between areas. Use avg_price when you need the typical ticket size in one area.
exclude_outliers is on by default
exclude_outliers defaults to true. It removes properties that are significantly underpriced or overpriced compared with similar properties. Leave it on for trend work. Set it to false only if you want extreme values included.
Limits
Availability:
- Every step on this page is available to Casafari clients with MCP access, using their Casafari account.
- Self-serve access for new users is coming soon.
- The REST equivalent of the series,
POST /market-analytics-api/time-series(page), is for Casafari client accounts. ma_get_time_series_operationsexists over MCP only.
Coverage and data:
- The Area Insights tool descriptions name no specific market. See per-tool coverage.
- Values aggregate prices of properties in Casafari's property graph. They show where asking prices moved, not registry sale prices.
Pricing, quotas and refresh:
- The sources give no figures for pricing, quotas or data refresh frequency. Ask Casafari.
- When a product's quota is used up, its tools answer
Request limit reached for this product.
Up to 10 location ids or one circle of 50 to 50,000 m per request
custom_location_boundary takes either location_ids (1 to 10 ids) or a circle.
- A circle has a
target_point(latitude and longitude) and adistancein metres, from 50 to 50,000. - Polygons are not accepted by Area Insights over MCP.
- Several ids in one request form one boundary and return a single series.
One type group per request; send separate requests to compare apartments and houses
type_group is either apartment or house. To compare the two, send one request per type group with otherwise identical filters, as the tool's notes advise.
Questions
Can I compare two districts in one request?
No. Each Area Insights time series request returns one series for one boundary, and ma_get_time_series_operations analyses a single segment. Several ids in location_ids are treated as one combined boundary. To compare two districts, send one request per district with identical filters, changing only custom_location_boundary and alias. Then put the series or the cagr and delta_pct results side by side.
What is the difference between delta_pct, cagr and yoy_last?
delta_pct is the percentage change between the first and last data points of the series, so it shows total change over the range. cagr is the compound annual growth rate, so it shows the yearly pace of change. yoy_last is named as the year-on-year change at the latest data point. The tool description does not define yoy_last further, so check its output against your series.
How do I get rent trends instead of sale trends?
Set business_type to rent in ma_get_time_series_data and keep data_point as avg_price_psqm. The series then shows asking rent per m² for the chosen type group and boundary. Use the same object as the segment in ma_get_time_series_operations to compute delta_pct, cagr or cv on rents. Each request covers sale or rent, not both.
Why is a value null for some periods?
A null value means the period had no data matching your filters, for example a small area with tight bedroom or price ranges. In operations results, value is null when there is not enough data for that statistic. To fix it, widen the boundary, use a longer date_interval or relax the filters. If nothing matches at all, the tool raises an error such as No data found for the specified segment.
How often is the underlying data refreshed?
Casafari's sources publish no data refresh frequency for Area Insights, so these docs cannot state one. Call ma_get_current_datetime to anchor your date range, and treat the most recent period as possibly incomplete. For refresh schedules, SLAs or contract terms, contact Casafari at https://www.casafari.com/. See also /docs/faq/data-refresh-frequency.