Platform

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.The most complete property index in Europe: a deduplicated, cleaned property graph.

How the graph is built

Area Insights · REST API

Number of registered sales by property type

POSThttps://platform.casafari.com/v1/area-insights/sales/count-by-type
API key10 tokens a call45 parameters

Send Authorization: Bearer $CASAFARI_API_KEY: a platform API key (cf_sk_...) from the console, or an OAuth access token; X-API-Key carries the key too. See platform API keys. Costs 10 tokens a call (1 token = EUR 0.04).

Over MCP: area-insights_count_sales_by_type (equivalent). See MCP and REST compared.

Description

Costs 10 tokens a call.

Request body

Content type application/json. Required. Type: object.

countrystringrequired
ES (Spain), FR (France), IT (Italy), PL (Poland) or PT (Portugal: INE's official median per m² by municipality and quarter; area as location_ids, a circle or a polygon, only types and sold_at_range as filters, no counts) or AT (Austria: yearly open-data prices per m² by municipality, district or state; location_ids only; no counts; not available until Casafari names its source).
ES FR IT PL PT AT
location_boundaryobjectrequired
The area: exactly one of location_ids (from Location Lookup), circle or polygon.
3 properties
location_idsinteger[]
Location ids from Location Lookup (locations_search), all in the request's country.
1–100 items≥ 1
circleobject
A circle: its centre and radius in metres (1 to 50 000).
2 properties
coordinatesobjectrequired
2 properties
latnumberrequired
-90–90
lonnumberrequired
-180–180
radius_in_metersnumberrequired
1–50000
polygonobject[]
A closed polygon: at least 4 points, the last equal to the first.
4–1000 items
2 properties
latnumberrequired
-90–90
lonnumberrequired
-180–180
sold_at_rangeobject
Sale dates, YYYY-MM-DD: {"gte": "2024-01-01"}, an upper bound with lte, or both (or gt / lt).
4 properties
gtestring (date)
pattern ^\d{4}-\d{2}-\d{2}$
gtstring (date)
pattern ^\d{4}-\d{2}-\d{2}$
ltestring (date)
pattern ^\d{4}-\d{2}-\d{2}$
ltstring (date)
pattern ^\d{4}-\d{2}-\d{2}$
typesstring[]
Property types, lower case, e.g. ["apartment", "penthouse"] or ["house", "villa"].
1–40 itemsat most 40 characterspattern ^[a-z][a-z_]*$
type_groupsstring[]
Property type groups, e.g. ["apartment", "house"].
apartment house room building investment plot other
1–7 items
conditionsstring[]
Spain, Italy and Poland only: property condition, any of used, ruin, very-good, new, other.
used ruin very-good new other
1–5 items
with_mortgageboolean
Spain only: true for sales financed with a mortgage, false for sales without one.
price_rangeobject
Registered sale price in euros: {"gte": n, "lte": n} (or gt / lt); at least one bound.
4 properties
gtenumber
≥ 0
gtnumber
≥ 0
ltenumber
≥ 0
ltnumber
≥ 0
price_per_sqm_rangeobject
Registered sale price per square metre in euros: {"gte": n, "lte": n} (or gt / lt); at least one bound.
4 properties
gtenumber
≥ 0
gtnumber
≥ 0
ltenumber
≥ 0
ltnumber
≥ 0
total_area_rangeobject
Built area in square metres: {"gte": n, "lte": n} (or gt / lt); at least one bound.
4 properties
gtenumber
≥ 0
gtnumber
≥ 0
ltenumber
≥ 0
ltnumber
≥ 0
plot_area_rangeobject
France and Poland only: plot area in square metres: {"gte": n, "lte": n} (or gt / lt); at least one bound.
4 properties
gtenumber
≥ 0
gtnumber
≥ 0
ltenumber
≥ 0
ltnumber
≥ 0
bedrooms_rangeobject
France only: bedrooms: {"gte": n, "lte": n} (or gt / lt); at least one bound.
4 properties
gteinteger
≥ 0
gtinteger
≥ 0
lteinteger
≥ 0
ltinteger
≥ 0

Example request

Placeholders only: replace the token and the values with your own.

curl
curl -X POST "https://platform.casafari.com/v1/area-insights/sales/count-by-type" \
  -H "Authorization: Bearer $CASAFARI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "country": "ES",
  "location_boundary": {
    "location_ids": [
      1
    ]
  }
}'

Responses

200 Success.

Type: object.

Errors

Every error is an application/problem+json body (RFC 9457) with type (a page that explains it), title, status, detail (what to do), instance, code and request_id (what to quote to support). A 402 carries an upgrade_url, a 429 a Retry-After header. The codes each status can carry:

Tip: add .md to any URL to read it as Markdown.