# Catastro Minhap — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search Spanish property records by address, coordinates, or cadastral reference to find detailed land parcel information, ownership details, and location data across all Spanish provinces and municipalities. Browse the complete hierarchy of Spanish geographic and administrative divisions including provinces, municipalities, and streets to pinpoint exact property locations.

**Category:** Government & Public Data | **Website:** [catastro.minhap.es/](https://catastro.minhap.es/) | **Docs:** [parse.bot/marketplace/03640b79-4739-4c60-907d-f22bc9f5662a/catastro-minhap-es-api](https://parse.bot/marketplace/03640b79-4739-4c60-907d-f22bc9f5662a/catastro-minhap-es-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_cadastral_data_by_address

Returns full unprotected cadastral data for a property identified by its address. May return multiple records for buildings with multiple units. Includes use type, area, cadastral value, and construction year.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `bloque` | string | No | Block identifier |
| `escalera` | string | No | Staircase identifier |
| `municipio` | string | Yes | Municipality name in uppercase (e.g. MADRID) |
| `nom_via` | string | Yes | Street name in uppercase (e.g. MAYOR) |
| `numero` | string | Yes | Street number (e.g. 1) |
| `planta` | string | No | Floor number (e.g. 00, 01, 02) |
| `provincia` | string | Yes | Province name in uppercase (e.g. MADRID) |
| `puerta` | string | No | Door identifier |
| `tipo_via` | string | No | Street type: CL (calle), AV (avenida), PZ (plaza), and others |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_cadastral_data_by_address \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bloque":"<string>","escalera":"<string>","municipio":"<string>","nom_via":"<string>","numero":"<string>","planta":"<string>","provincia":"<string>","puerta":"<string>","tipo_via":"<string>"}'
```

### get_cadastral_data_by_parcel

Returns full unprotected cadastral data for a rural property identified by polygon and parcel numbers. Returns upstream_error if the polygon/parcel combination does not exist.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `municipio` | string | Yes | Municipality name in uppercase (e.g. TOLEDO) |
| `parcela` | string | Yes | Parcel number (e.g. 1, 5) |
| `poligono` | string | Yes | Polygon number (e.g. 1, 3) |
| `provincia` | string | Yes | Province name in uppercase (e.g. TOLEDO) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_cadastral_data_by_parcel \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"municipio":"<string>","parcela":"<string>","poligono":"<string>","provincia":"<string>"}'
```

### get_cadastral_data_by_reference

Returns full unprotected cadastral data identified by cadastral reference (RC). Includes building details, construction info, plot data, and cartographic link. The refcat uniquely identifies the property nationwide.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `municipio` | string | No | Municipality name (optional, does not filter since refcat is unique) |
| `provincia` | string | No | Province name (optional, does not filter since refcat is unique) |
| `refcat` | string | Yes | Cadastral reference (20 characters, e.g. 9872023VH5797S0001WX) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_cadastral_data_by_reference \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"municipio":"<string>","provincia":"<string>","refcat":"<string>"}'
```

### get_cadastral_reference_by_coordinates

Returns the cadastral reference(s) of the parcel at given XY coordinates. Returns upstream_error if no cadastral parcel exists at the specified location.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `coor_x` | string | Yes | X coordinate (longitude, e.g. -3.46328352120012) |
| `coor_y` | string | Yes | Y coordinate (latitude, e.g. 38.6401434808341) |
| `srs` | string | No | Spatial Reference System (EPSG:4258 or EPSG:4326) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_cadastral_reference_by_coordinates \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"coor_x":"<string>","coor_y":"<string>","srs":"<string>"}'
```

### get_coordinates_by_cadastral_reference

Returns the XY centroid coordinates of a parcel given its cadastral reference (14-character format). The reference identifies a plot without specifying a particular unit within it.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `municipio` | string | No | Municipality name (optional) |
| `provincia` | string | No | Province name (optional) |
| `refcat` | string | Yes | Cadastral reference (14 characters, e.g. 9872023VH5797S) |
| `srs` | string | No | Output Spatial Reference System (EPSG:4258 or EPSG:4326) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_coordinates_by_cadastral_reference \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"municipio":"<string>","provincia":"<string>","refcat":"<string>","srs":"<string>"}'
```

### get_municipalities

Returns all municipalities of a given province. Optionally filters by municipality name substring match. Province name must be in uppercase.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `municipio` | string | No | Optional municipality name filter in uppercase (e.g. ALCOBENDAS) |
| `provincia` | string | Yes | Province name in uppercase (e.g. MADRID, BARCELONA, TOLEDO, SEVILLA) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_municipalities \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"municipio":"<string>","provincia":"<string>"}'
```

### get_nearby_cadastral_references

Returns a list of cadastral references near a given set of XY coordinates, ordered by distance. Each result includes the cadastral reference, address, and distance in meters from the query point.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `coor_x` | string | Yes | X coordinate (longitude, e.g. -3.46328352120012) |
| `coor_y` | string | Yes | Y coordinate (latitude, e.g. 38.6401434808341) |
| `srs` | string | No | Spatial Reference System (EPSG:4258 or EPSG:4326) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_nearby_cadastral_references \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"coor_x":"<string>","coor_y":"<string>","srs":"<string>"}'
```

### get_provinces

Returns all Spanish provinces with their INE codes and names. No parameters required. The full list contains 48 provinces plus autonomous cities.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_provinces \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_street_numbers

Returns address numbers on a street with associated cadastral references for a specific street number. All text parameters must be uppercase.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `municipio` | string | Yes | Municipality name in uppercase (e.g. MADRID) |
| `nom_via` | string | Yes | Street name in uppercase (e.g. MAYOR) |
| `numero` | string | Yes | Street number to look up (e.g. 1, 5, 10) |
| `provincia` | string | Yes | Province name in uppercase (e.g. MADRID) |
| `tipo_via` | string | Yes | Street type: CL (calle), AV (avenida), PZ (plaza), PJ (pasaje), and others |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_street_numbers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"municipio":"<string>","nom_via":"<string>","numero":"<string>","provincia":"<string>","tipo_via":"<string>"}'
```

### get_streets

Returns all streets/roads (vías) of a municipality matching the search criteria. Searches by partial name match. Both provincia and municipio must be in uppercase.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `municipio` | string | Yes | Municipality name in uppercase (e.g. MADRID) |
| `nom_via` | string | No | Street name filter (e.g. MAYOR, ALCALA) |
| `provincia` | string | Yes | Province name in uppercase (e.g. MADRID, BARCELONA, TOLEDO) |
| `tipo_via` | string | No | Street type filter: CL (calle), AV (avenida), PZ (plaza), PJ (pasaje), and others |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-catastro-minhap-es-api-03640b79/get_streets \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"municipio":"<string>","nom_via":"<string>","provincia":"<string>","tipo_via":"<string>"}'
```
