# Sedecatastro — 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.

> Look up detailed Spanish property information by cadastral reference or address, and browse complete listings of Spanish provinces and municipalities. Get official land registry data directly from Spain's Catastro public records to research property details and administrative divisions.

**Category:** Government & Public Data | **Website:** [www1.sedecatastro.gob.es/](https://www1.sedecatastro.gob.es/) | **Docs:** [parse.bot/marketplace/939424c0-c55c-4424-8219-74eab8abcd56/www1-sedecatastro-gob-es-api](https://parse.bot/marketplace/939424c0-c55c-4424-8219-74eab8abcd56/www1-sedecatastro-gob-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-www1-sedecatastro-gob-es-api-939424c0/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_property_by_address

Look up property data by address (province, municipality, street, number). Returns the same property details as get_property_by_reference including location, class, main use, surface area, construction year, and construction breakdown. Province and municipality are required; street details narrow the search to a specific property.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `municipality` | string | Yes | Municipality name (e.g., AVILES, OVIEDO) |
| `number` | string | No | Street number |
| `province` | string | Yes | Province name (e.g., ASTURIAS, MADRID) |
| `street` | string | No | Street name |
| `street_type` | string | No | Street type abbreviation (CL=Calle, AV=Avenida, PZ=Plaza, etc.) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-www1-sedecatastro-gob-es-api-939424c0/get_property_by_address \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"municipality":"<string>","number":"<string>","province":"<string>","street":"<string>","street_type":"<string>"}'
```

### get_property_by_reference

Look up property data by cadastral reference number (referencia catastral). Returns location, class (urban/rural), main use, surface area, construction year, and detailed construction breakdown. Invalid or malformed references return an upstream_error with the Catastro error message.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `reference` | string | Yes | Cadastral reference number (14, 18, or 20 characters). Example: 9872023VH5797S0001WX |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-www1-sedecatastro-gob-es-api-939424c0/get_property_by_reference \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reference":"<string>"}'
```

### list_municipalities

List municipalities within a province. Optionally filter by partial name match. Useful for discovering valid municipality names for address-based property lookups. Returns municipality codes, delegation codes, and catastro-specific municipality codes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `municipality` | string | No | Filter municipalities by partial name match |
| `province` | string | Yes | Province name (e.g., ASTURIAS, MADRID) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-www1-sedecatastro-gob-es-api-939424c0/list_municipalities \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"municipality":"<string>","province":"<string>"}'
```

### list_provinces

List all Spanish provinces with their codes. Returns all 48 provinces available in the Catastro system. Useful for discovering valid province names for address-based property lookups.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-www1-sedecatastro-gob-es-api-939424c0/list_provinces \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
