Platform

Casafari es la plataforma de inteligencia de datos inmobiliarios nativa para agentes de IA. El índice inmobiliario más completo de Europa: un grafo inmobiliario limpio y deduplicado de propiedades residenciales y comerciales, en venta y alquiler, en 16 países.El índice inmobiliario más completo de Europa: un grafo inmobiliario limpio y deduplicado.

Cómo se construye el grafo

Legacy API · New Market Leads

Create feed

POSThttps://api.casafari.com/alerts-api/feeds
Token Bearer46 parameters

Legacy API (api.casafari.com). Una ruta de la API existente para clientes de Casafari con contrato, no de la plataforma. En la plataforma: todavía no hay ruta de plataforma.

En la Legacy API en https://api.casafari.com (clientes con contrato): envíe Authorization: Bearer $CASAFARI_TOKEN; consulte cómo obtener un token. Nuevos usuarios: la API REST de la plataforma, claves de API de plataforma.

Description

Create a new alert feed that delivers matching real estate events to your webhook URL.

Alert Delivery Format

Events are delivered as a POST request with a single JSON object body:

json
{
  "alert_id": 100042,
  "url": "https://www.casafari.com/listing/12345",
  "address": "Rua do Exemplo 12, Lisbon",
  "location": "Lisbon",
  "sale_status": "active",
  "sale_price": 250000,
  "sale_price_psqm": 2500.0,
  "sale_currency": "EUR",
  "rent_status": "none",
  "rent_price": 0,
  "rent_period": "none",
  "rent_price_psqm": 0.0,
  "rent_currency": "EUR",
  "thumbnails": [
    "https://cdn.example.com/thumb1.jpg"
  ],
  "matched_feeds": [
    {
      "feed_id": 42,
      "feed_name": "My Alert Feed"
    }
  ]
}

Your server must respond with HTTP 200. Any other status code is treated as a failure.

Before You Start: Configure Your Webhook

Feeds deliver to your per-user webhook URL — one URL for all feeds, managed separately:

  1. PUT /webhooks — set your delivery URL (it is probed with a GET and must answer 200)
  2. Create feeds — this endpoint returns 409 until the webhook is configured

Changing the URL via PUT /webhooks instantly affects all feeds, including already-queued alerts.

Retry Policy

If your server does not respond with HTTP 200 within 5 seconds, delivery is retried — 60 seconds after the first failure, then every 10 minutes — until the alert expires (typically 24h). Feeds are never disabled automatically.

Authentication of deliveries

Every delivery is signed with Standard Webhooks: each POST carries webhook-id, webhook-timestamp, and webhook-signature headers. Verify the HMAC-SHA256 signature over the raw request body using the secret from PUT /webhooks (rotate it via POST /webhooks/rotate-secret).

Cuerpo de la solicitud

Tipo de contenido application/json. Obligatorio. Tipo: object.

feed_namestringobligatorio
filtersobjectobligatorio
28 properties
location_idsinteger[]nullable
1–100 elementos
typesstring[]nullable
42 valores permitidosapartment 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
al menos 1 elemento
business_typestringobligatorio
sale rent
statuses(string | string)[]nullable
al menos 1 elemento
alert_subtypesstring[]nullable
new price_increased price_decreased reserved delisted sold
custom_locationsobject[][]nullable
Lista de polígonos cerrados de puntos geográficos en los que buscar. Cada polígono debe contener al menos 4 puntos. El primer y el último punto deben coincidir en cada polígono. Se permiten un máximo de 4 polígonos.
1–4 items4–25 items
2 propiedades
latitudenumberobligatorio
-90–90
longitudenumberobligatorio
-180–180
privatebooleannullable
price_rangeobjectnullable
2 propiedades
minintegernullable
1–2147483647
maxintegernullable
1–2147483647
price_psqm_rangeobjectnullable
2 propiedades
minintegernullable
1–2147483647
maxintegernullable
1–2147483647
bathrooms_rangeobjectnullable
2 propiedades
minintegernullable
1–15000
maxintegernullable
1–15000
bedrooms_rangeobjectnullable
2 propiedades
minintegernullable
0–15000
maxintegernullable
0–15000
total_area_rangeobjectnullable
2 propiedades
minintegernullable
1–1000000
maxintegernullable
1–1000000
new_developmentbooleannullable
bankbooleannullable
auctionbooleannullable
construction_year_rangeobjectnullable
2 propiedades
minintegernullable
1–3000
maxintegernullable
1–3000
plot_area_rangeobjectnullable
2 propiedades
minintegernullable
1–1000000
maxintegernullable
1–1000000
floorsstring[]nullable
no_floor ground middle top
al menos 1 elemento
conditionsstring[]nullable
new used ruin very-good other
al menos 1 elemento
orientationstringnullable
exterior interior
viewsstring[]nullable
A matching listing must have every requested view, not just one.
water landscape city golf park
al menos 1 elemento
directionsstring[]nullable
A matching listing must face every requested direction, not just one.
north south east west
al menos 1 elemento
characteristicsstring[]nullable
A matching listing must have every requested characteristic, not just one.
balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuity
al menos 1 elemento
has_phonebooleannullable
has_emailbooleannullable
has_agency_namebooleannullable
ref_numbersstring[]nullable
1–100 elementos
listing_idsinteger[]nullable
1–100 elementos

Ejemplo de solicitud

Solo marcadores de posición: reemplace el token y los valores por los suyos.

curl
curl -X POST "https://api.casafari.com/alerts-api/feeds" \
  -H "Authorization: Bearer $CASAFARI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "feed_name": "<feed_name>",
  "filters": {
    "business_type": "sale"
  }
}'

Respuestas

200 Respuesta correcta

Tipo: object.

Show the response shape (47 fields)
feed_idintegerobligatorio
feed_namestringobligatorio
filtersobjectobligatorio
28 properties
location_idsinteger[]nullable
1–100 elementos
typesstring[]nullable
42 valores permitidosapartment 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
al menos 1 elemento
business_typestringobligatorio
sale rent
statuses(string | string)[]nullable
al menos 1 elemento
alert_subtypesstring[]nullable
new price_increased price_decreased reserved delisted sold
custom_locationsobject[][]nullable
Lista de polígonos cerrados de puntos geográficos en los que buscar. Cada polígono debe contener al menos 4 puntos. El primer y el último punto deben coincidir en cada polígono. Se permiten un máximo de 4 polígonos.
1–4 items4–25 items
2 propiedades
latitudenumberobligatorio
-90–90
longitudenumberobligatorio
-180–180
privatebooleannullable
price_rangeobjectnullable
2 propiedades
minintegernullable
1–2147483647
maxintegernullable
1–2147483647
price_psqm_rangeobjectnullable
2 propiedades
minintegernullable
1–2147483647
maxintegernullable
1–2147483647
bathrooms_rangeobjectnullable
2 propiedades
minintegernullable
1–15000
maxintegernullable
1–15000
bedrooms_rangeobjectnullable
2 propiedades
minintegernullable
0–15000
maxintegernullable
0–15000
total_area_rangeobjectnullable
2 propiedades
minintegernullable
1–1000000
maxintegernullable
1–1000000
new_developmentbooleannullable
bankbooleannullable
auctionbooleannullable
construction_year_rangeobjectnullable
2 propiedades
minintegernullable
1–3000
maxintegernullable
1–3000
plot_area_rangeobjectnullable
2 propiedades
minintegernullable
1–1000000
maxintegernullable
1–1000000
floorsstring[]nullable
no_floor ground middle top
al menos 1 elemento
conditionsstring[]nullable
new used ruin very-good other
al menos 1 elemento
orientationstringnullable
exterior interior
viewsstring[]nullable
A matching listing must have every requested view, not just one.
water landscape city golf park
al menos 1 elemento
directionsstring[]nullable
A matching listing must face every requested direction, not just one.
north south east west
al menos 1 elemento
characteristicsstring[]nullable
A matching listing must have every requested characteristic, not just one.
balcony elevator no_elevator garage garden parking storage swimming_pool terrace rental_license furniture rented_out life_annuity
al menos 1 elemento
has_phonebooleannullable
has_emailbooleannullable
has_agency_namebooleannullable
ref_numbersstring[]nullable
1–100 elementos
listing_idsinteger[]nullable
1–100 elementos

409 Webhook is not configured.

Tipo: object.

Mostrar la estructura de la respuesta (1 campo)
detailstringobligatorio
Ejemplo de la descripción de la API
JSON
{
  "detail": "No webhook configured. Set your delivery URL via PUT /webhooks first."
}

422 Error de validación

Tipo: object.

Mostrar la estructura de respuesta (6 campos)
detailobject[]
5 propiedades
loc(string | integer)[]obligatorio
msgstringobligatorio
typestringobligatorio
inputany
ctxobject

Consejo: añada .md a cualquier URL para leerla como Markdown.