Catastro API

Spanish cadastre lookup API. All endpoints require an API key in the `x-api-key` header.

Introduction

All requests require API key authentication. Responses are JSON and successful endpoints include rate limit headers.

The easiest way to get started

Import the Postman collection into the app, create an account to activate a trial subscription with no payment or credit card, generate an API key and set it in the collection's apiKey variable. Then you can test all requests directly from Postman.

Base URL

https://api.catastro-api.es

Authentication

API key with ctr_ prefix

x-api-key

Quick example

curl "https://api.catastro-api.es/api/callejero/provincias" \
  -H "x-api-key: ctr_tu_api_key" \
  -H "Accept: application/json"

Other tools

Postman

Import the full endpoint collection into Postman to test the API interactively.

Swagger UI

Explore and test endpoints directly from the interactive Swagger interface.

Embedded widgets

Integrate CatastroAPI search widgets on your website via iframe. Requests use public embed keys and validate the domain where the widget is embedded.

Getting started

  1. Create an embed key from your account (Embed Keys menu).
  2. Add the domains where you will embed the iframe to allowedOrigins (e.g. https://test.com).
  3. Copy the iframe code and paste it on your site.

Widget URL parameters

Customize the widget by adding query params to the iframe URL.

ParameterRequiredDescriptionExample
keyrequiredPublic embed key (pub_...).pub_...
taboptionalInitial tab: address, map or reference.address | map | reference
tabsoptionalVisible tabs as a comma-separated list: address, map and/or reference. All three are shown by default.address,map | address,reference
langoptionalWidget language: es or en.es | en
themeoptionalWidget visual theme: dark or light.dark | light

Example URL

https://catastro-api.es/en/embed/widget?key=pub_ejemplo&tab=address&theme=light

Iframe code

Replace pub_... with your embed key.

<iframe
  src="https://catastro-api.es/en/embed/widget?key=pub_..."
  width="100%"
  height="720"
  style="border:0;background:transparent;color-scheme:normal;"
  loading="lazy"
  title="CatastroAPI cadastral search"
></iframe>
Add theme=light or theme=dark to the src URL to force the theme. Example: https://catastro-api.es/embed/widget?key=pub_...&theme=light

Street Directory

Lookups by province, municipality and street name

GET/api/callejero/provincias

List provinces

Responses

200Province list
Example

Errors

401Invalid or missing API key
429Request limit reached
GET/api/callejero/municipios

List municipalities by province

Parameters

provinciarequiredquerystring

Province name or code

municipiooptionalquerystring

Filter by municipality name (optional)

Responses

200Municipality list
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached
GET/api/callejero/vias

List streets in a municipality

Parameters

provinciarequiredquerystring
municipiorequiredquerystring
tipoViaoptionalquerystring

Street type code (CL, AV, CR...)

nombreViaoptionalquerystring

Responses

200Street list
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached
GET/api/callejero/numeros

List street numbers

Parameters

provinciarequiredquerystring
municipiorequiredquerystring
tipoViarequiredquerystring

Street type code

nombreViarequiredquerystring
numerorequiredquerystring

Responses

200Number list
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached
GET/api/callejero/inmueble-localizacion

Get property by address

Parameters

provinciarequiredquerystring
municipiorequiredquerystring
tipoViarequiredquerystring
nombreViarequiredquerystring
numerorequiredquerystring
bloqueoptionalquerystring
escaleraoptionalquerystring
plantaoptionalquerystring
puertaoptionalquerystring

Responses

200Property found
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached
GET/api/callejero/inmueble-rc

Get property by cadastral reference

Parameters

rcrequiredquerystring

Cadastral reference (14-20 alphanumeric characters)

min: 14 · max: 20

Responses

200Property found
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached

Street Directory Codes

Lookups by INE/MEH codes

GET/api/callejero-codigos/provincias

List provinces (by codes)

Responses

200Province list
Example

Errors

401Invalid or missing API key
429Request limit reached
GET/api/callejero-codigos/municipios

List municipalities by province code

Parameters

codigoProvinciaInerequiredquerystring
codigoMunicipioMehoptionalquerystring

Responses

200Municipality list
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached
GET/api/callejero-codigos/vias

List streets by codes

Parameters

codigoProvinciaInerequiredquerystring
codigoMunicipioMehrequiredquerystring
codigoViaoptionalquerystring

Responses

200Street list
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached
GET/api/callejero-codigos/numeros

List numbers by codes

Parameters

codigoProvinciaInerequiredquerystring
codigoMunicipioMehrequiredquerystring
codigoViarequiredquerystring
numerorequiredquerystring

Responses

200Number list
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached
GET/api/callejero-codigos/inmuebles

Get properties by codes

Parameters

codigoProvinciaInerequiredquerystring
codigoMunicipioMehoptionalquerystring
codigoMunicipioIneoptionalquerystring
codigoViarequiredquerystring
numerorequiredquerystring
bloqueoptionalquerystring
escaleraoptionalquerystring
plantaoptionalquerystring
puertaoptionalquerystring

Responses

200Properties found
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached

Coordinates

Cadastral references and coordinates

GET/api/coordenadas/rc-por-coordenadas

Get cadastral reference by coordinates

Parameters

xrequiredquerynumber

X coordinate (UTM)

yrequiredquerynumber

Y coordinate (UTM)

Responses

200Cadastral references found
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached
GET/api/coordenadas/coordenadas-por-rc

Get coordinates by cadastral reference

Parameters

rcrequiredquerystring

14-character cadastral reference

min: 14 · max: 14

Responses

200Coordinates found
Example

Errors

400Invalid parameters
401Invalid or missing API key
429Request limit reached