buscar
Searches parcels that match some filters in one or more municipalities, or around a point, and returns them
sorted. It answers opportunity questions: land, buildings, uses, restrictions or what is built according to the
Cadastre. The fields are in campos_busqueda. A search gives
candidates and figures to rank them; each parcel’s citations are in
ficha_parcela.
filtros is an object {field: condition}. A number or a boolean means “equals”; a text means “contains” in text
fields and “equals” in categories; {"min": n, "max": n} is a range; {"en": [...]} and {"no_en": [...]} are
lists; {"contiene": "..."} and {"existe": true} work too. A blank matches no filter: it never counts as zero
or as “no”.
Arguments
| Argument | Type | What it is |
|---|---|---|
filtros | text (JSON) | The conditions, for example {"grupo": "residencial", "techo_m2t": {"min": 2000}} |
municipios | list of texts | Municipality ids; without them, every municipality your company can query |
lon | number | Longitude of the centre, for example the one from buscar_lugar |
lat | number | Latitude of the centre |
radio_m | number | Radius in metres around the centre, up to 50,000 |
orden | text | Comma-separated fields; with a leading hyphen, from highest to lowest (-techo_m2t) |
campos | list of texts | Output columns besides refcat, municipality, address and the filtered ones |
limite | integer | Rows per page, from 1 to 1000 (20 by default) |
cursor | text | The previous page’s siguiente |
coleccion | text | parcelas (default) or ambitos: one row per planning area or sector |
Response
total, sin_dato (how many parcels would match everything that can be checked but lack each field),
sin_dato_total, siguiente and the rows. With a centre, each row carries distancia_m.
Planning areas and sectors
With coleccion: "ambitos" the same tool searches planning areas and sectors instead of parcels: one row per area,
with its surface, its overall use, the total buildable floor area and what is still left to build, the dwellings set
by the plan (free-market and protected), the reference yield, the land to be ceded, the management system and the
stage. Those figures belong to the whole area, never to one of its parcels. Each row carries refcat, a parcel of
the area whose report cites them under B1-05, and ambito, the same text as the parcels’ ambito field, to search
for them.