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

API de Casafari existente · API v1 · References

Get locations typeahead suggestions scoped by country code

POSThttps://api.casafari.com/v1/references/locations/typeahead
Token estático4 parámetrosAPI v1

Envíe Authorization: Token $CASAFARI_TOKEN con su token de API existente; consulte dónde obtenerlo.

The same path under /api, signed in with a bearer token, is in the REST API reference: POST /api/v1/references/locations/typeahead.

Description

Returns location typeahead suggestions within the given country (ES or PT).

Cuerpo de la solicitud

Content type application/json. Opcional. Tipo: object.

country_codesstring[]obligatorio
Country codes to scope the search. Supported: ES, PT.
ES PT
namestringobligatorio
The location name to search for.
2–100 characters
sizeinteger
The maximum number of suggestions to return. Default 30, maximum 100.
1–100default 30
langstring
Language to use for the location name in the response. One of: en, pt, es, de.
en pt es de
por defecto "en"

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/v1/references/locations/typeahead" \
  -H "Authorization: Token $CASAFARI_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "country_codes": [
    "PT"
  ],
  "name": "lisboa",
  "lang": "en",
  "size": 30
}'

Respuestas

200

Tipo: object.

Show the response shape (8 fields)
typeaheadobject[]obligatorio
The typeahead suggestions.
5 propiedades
location_idintegerobligatorio
The location id.
namestringobligatorio
The location name.
matched_namestringobligatorio
The matched name of the location name.
at most 256 characters
administrative_levelstringobligatorio
The administrative level.
breadcrumbsobject[]obligatorio
Location breadcrumbs sorted from top to bottom.
2 propiedades
location_idintegerobligatorio
Location ID.
namestringobligatorio
The name of location.
Ejemplo de la descripción de la API
JSON
{
  "typeahead": [
    {
      "location_id": 1296,
      "name": "Lisboa",
      "matched_name": "Lisboa",
      "administrative_level": "Distrito",
      "breadcrumbs": [
        {
          "location_id": 499,
          "name": "Portugal"
        },
        {
          "location_id": 1296,
          "name": "Lisboa"
        }
      ]
    }
  ]
}

401 No autorizado

Tipo: object.

Mostrar la estructura de la respuesta (1 campo)
detailstring
Descripción del error encontrado.

403 Prohibido

Tipo: object.

Mostrar la estructura de la respuesta (1 campo)
detailstring
Descripción del error encontrado.

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