# Sedecatastro — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/sedecatastro/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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.beta.paywithlocus.com/api/wrapped/credits/sedecatastro/get-property-by-address \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/sedecatastro/get-property-by-reference \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/sedecatastro/list-municipalities \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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.beta.paywithlocus.com/api/wrapped/credits/sedecatastro/list-provinces \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.