Registered sale price trend in an area, week by week
https://platform.casafari.com/v1/area-insights/sales/time-seriesSend 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). In an AI assistant, the same call as an MCP tool costs 5 tokens a call.
Over MCP: area-insights_get_sales_time_series (equivalent). See MCP and REST compared.
Description
Cuesta 10 tokens por llamada.
Cuerpo de la solicitud
Tipo de contenido application/json. Obligatorio. Tipo: object.
countrystringobligatorioES FR IT PL PT ATlocation_boundaryobjectobligatorio3 propiedades
location_idsinteger[]circleobject2 propiedades
coordinatesobjectobligatorio2 propiedades
latnumberobligatoriolonnumberobligatorioradius_in_metersnumberobligatoriopolygonobject[]2 propiedades
latnumberobligatoriolonnumberobligatoriosold_at_rangeobjectobligatorio4 propiedades
gtecadena (fecha)^\d{4}-\d{2}-\d{2}$gtcadena (fecha)^\d{4}-\d{2}-\d{2}$ltecadena (fecha)^\d{4}-\d{2}-\d{2}$ltcadena (fecha)^\d{4}-\d{2}-\d{2}$typesstring[]^[a-z][a-z_]*$conditionsstring[]used ruin very-good new otherwith_mortgagebooleanprice_rangeobject4 propiedades
gtenumbergtnumberltenumberltnumberprice_per_sqm_rangeobject4 propiedades
gtenumbergtnumberltenumberltnumbertotal_area_rangeobject4 propiedades
gtenumbergtnumberltenumberltnumberplot_area_rangeobject4 propiedades
gtenumbergtnumberltenumberltnumberbedrooms_rangeobject4 propiedades
gteintegergtintegerlteintegerltintegerEjemplo de solicitud
Sustituya la clave por la suya. Ejecútelo en la plataforma antes de publicarlo: cópiela, inserte su clave y funcionará.
curl -X POST "https://platform.casafari.com/v1/area-insights/sales/time-series" \
-H "Authorization: Bearer $CASAFARI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"country": "ES",
"location_boundary": {
"location_ids": [
11737
]
},
"sold_at_range": {
"gte": "2024-01-01",
"lte": "2025-12-31"
}
}'Respuestas
200 Success.
Tipo: object.
Example from a real call (any ids, addresses and links are illustrative) (long arrays shortened)
{
"country": "ES",
"prices": "registered_sale",
"source": "Registered sale prices from Spanish notary deeds",
"currency": "EUR",
"interval": "week",
"total_properties": 163141,
"average_sold_price_series": [
{
"date": "2023-12-31",
"value": 300043.78
},
{
"date": "2024-01-07",
"value": 316950.33
}
],
"average_sold_price_per_sqm_series": [
{
"date": "2023-12-31",
"value": 3308.02
},
{
"date": "2024-01-07",
"value": 3395.07
}
]
}Errores
Cada error devuelve un cuerpo application/problem+json (RFC 9457) con type (la página donde se explica), title, status, detail (qué hacer), instance, code y request_id (indíquelo al solicitar soporte). Un error 402 incluye una upgrade_url, y un 429 una cabecera Retry-After. Códigos asociados a cada estado:
- 400
invalid_request,key_in_query(https://platform.casafari.com/errors/invalid-request, https://platform.casafari.com/errors/key-in-query) - 401
unauthorized,invalid_credential,credential_revoked,token_expired(https://platform.casafari.com/errors/unauthorized, https://platform.casafari.com/errors/invalid-credential, https://platform.casafari.com/errors/credential-revoked, https://platform.casafari.com/errors/token-expired) - 402
payment_required(https://platform.casafari.com/errors/payment-required) - 403
insufficient_scope,not_entitled,account_suspended(https://platform.casafari.com/errors/insufficient-scope, https://platform.casafari.com/errors/not-entitled, https://platform.casafari.com/errors/account-suspended) - 404
not_found(https://platform.casafari.com/errors/not-found) - 405
method_not_allowed(https://platform.casafari.com/errors/method-not-allowed) - 409
conflict(https://platform.casafari.com/errors/conflict) - 413
payload_too_large(https://platform.casafari.com/errors/payload-too-large) - 415
unsupported_media_type(https://platform.casafari.com/errors/unsupported-media-type) - 422
validation_failed(https://platform.casafari.com/errors/validation-failed) - 429
rate_limited,daily_limit_reached,request_limit_reached,usage_limit_reached(https://platform.casafari.com/errors/rate-limited, https://platform.casafari.com/errors/daily-limit-reached, https://platform.casafari.com/errors/request-limit-reached, https://platform.casafari.com/errors/usage-limit-reached) - 500
internal_error(https://platform.casafari.com/errors/internal-error) - 502
upstream_error(https://platform.casafari.com/errors/upstream-error) - 503
capacity_exhausted,unavailable(https://platform.casafari.com/errors/capacity-exhausted, https://platform.casafari.com/errors/unavailable) - 504
upstream_timeout(https://platform.casafari.com/errors/upstream-timeout)