Discover/Gob API
live

Gob APIwww1.sedecatastro.gob.es

Access Spanish land registry data via 4 endpoints: property details by cadastral reference or address, plus province and municipality listings from Catastro.

Endpoint health
verified 6d ago
list_municipalities
get_property_by_address
get_property_by_reference
list_provinces
4/4 passing latest checkself-healing
Endpoints
4
Updated
21d ago

What is the Gob API?

This API exposes 4 endpoints covering Spain's official Catastro (land registry) public records, returning property details such as class, main use, surface area, construction year, and per-unit construction breakdowns. The get_property_by_reference endpoint accepts a 14-, 18-, or 20-character cadastral reference and returns over 10 structured fields. Supporting endpoints list all Spanish provinces and municipalities, making it straightforward to build valid address lookups without prior knowledge of Catastro codes.

Try it
Cadastral reference number (14, 18, or 20 characters). Example: 9872023VH5797S0001WX
api.parse.bot/scraper/073d8617-d709-4e76-8905-044a931efbfb/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/073d8617-d709-4e76-8905-044a931efbfb/get_property_by_reference?reference=9872023VH5797S0001WX' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace www1-sedecatastro-gob-es-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Spanish Catastro Property API — look up land registry data by reference or address."""
from parse_apis.spanish_catastro_property_api import Catastro, Province_, PropertyNotFound

client = Catastro()

# List provinces and pick the first one to explore its municipalities.
for province in client.provinces.list(limit=5):
    print(province.name, province.code)

# Drill into a specific province's municipalities via sub-resource.
asturias = client.provinces.list(limit=48).first()
for muni in asturias.municipalities.list(limit=3):
    print(muni.name, muni.municipality_code)

# Look up a property by address using the Province_ enum.
prop = client.properties.by_address(
    province=Province_.ASTURIAS,
    municipality="AVILES",
    street_type="CL",
    street="ACERO DEL",
    number="1",
)
print(prop.location, prop.main_use, prop.construction_year)
for c in prop.constructions[:3]:
    print(c.use, c.floor, c.surface_m2)

# Fetch a property by its cadastral reference with error handling.
try:
    detail = client.properties.get(reference=prop.catastral_reference)
    print(detail.class_name, detail.constructed_surface_m2, detail.postal_code)
except PropertyNotFound as exc:
    print(f"Property not found: {exc}")

print("Exercised: provinces.list / municipalities.list / properties.by_address / properties.get")
All endpoints · 4 totalmissing one? ·

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.

Input
ParamTypeDescription
referencerequiredstringCadastral reference number (14, 18, or 20 characters). Example: 9872023VH5797S0001WX
Response
{
  "type": "object",
  "fields": {
    "class": "string - Human-readable class name",
    "location": "string - Full location text",
    "main_use": "string - Main use of the property (Residencial, Comercial, etc.)",
    "class_code": "string - Class code (UR=Urban, RU=Rural)",
    "postal_code": "string - Postal code",
    "street_name": "string - Street name",
    "street_type": "string - Street type abbreviation (CL, AV, etc.)",
    "constructions": "array - Detailed construction breakdown with use, floor, door, surface_m2",
    "province_code": "string - Province code",
    "province_name": "string - Province name",
    "street_number": "string - Street number",
    "construction_year": "string - Year of construction",
    "municipality_code": "string - Municipality code",
    "municipality_name": "string - Municipality name",
    "catastral_reference": "string - Full cadastral reference",
    "constructed_surface_m2": "string - Total constructed surface in m²",
    "participation_coefficient": "string - Participation coefficient percentage"
  },
  "sample": {
    "data": {
      "class": "Urbano",
      "location": "CL GLORIA 51 13730 SANTA CRUZ DE MUDELA (CIUDAD REAL)",
      "main_use": "Residencial",
      "class_code": "UR",
      "postal_code": "13730",
      "street_name": "GLORIA",
      "street_type": "CL",
      "constructions": [
        {
          "use": "VIVIENDA",
          "door": "01",
          "floor": "00",
          "staircase": "",
          "surface_m2": "109"
        },
        {
          "use": "ALMACEN",
          "door": "02",
          "floor": "00",
          "staircase": "",
          "surface_m2": "187"
        }
      ],
      "province_code": "13",
      "province_name": "CIUDAD REAL",
      "street_number": "51",
      "construction_year": "1980",
      "municipality_code": "77",
      "municipality_name": "SANTA CRUZ DE MUDELA",
      "catastral_reference": "9872023VH5797S0001WX",
      "constructed_surface_m2": "308",
      "participation_coefficient": "100,000000"
    },
    "status": "success"
  }
}

About the Gob API

Property Lookup by Reference and Address

The get_property_by_reference endpoint takes a reference string (14, 18, or 20 characters, e.g. 9872023VH5797S0001WX) and returns structured property data: location, class (urban or rural, via class_code values UR or RU), main_use (e.g. Residencial, Comercial), postal_code, street_name, street_type, province_code, and province_name. The constructions array breaks down each unit by use, floor, door, and surface_m2. If the reference is invalid or unrecognised, the endpoint surfaces the upstream Catastro error message verbatim.

The get_property_by_address endpoint accepts province and municipality as required inputs, with optional street, street_type (e.g. CL for Calle, AV for Avenida, PZ for Plaza), and number fields. It returns the same response shape as the reference endpoint, including the full constructions array. Matching Catastro's naming conventions for province and municipality matters here — the discovery endpoints exist specifically to solve that.

Province and Municipality Discovery

list_provinces takes no inputs and returns all Spanish provinces as an array of code and name pairs, along with a total count. list_municipalities accepts a required province name and an optional partial municipality filter, returning each municipality's province_code, municipality_code, name, delegation_code, and catastro_municipality_code. These are the canonical identifiers expected by the address lookup endpoint.

Coverage and Data Source

All data originates from Spain's Dirección General del Catastro via its publicly available OVC web service. Coverage is limited to properties registered in the Spanish Catastro; properties in the Basque Country (País Vasco) and Navarra, which maintain independent land registries, are not covered by this service.

Reliability & maintenanceVerified

The Gob API is a managed, monitored endpoint for www1.sedecatastro.gob.es — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when www1.sedecatastro.gob.es changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official www1.sedecatastro.gob.es API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Last verified
6d ago
Latest check
4/4 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Retrieve construction year and surface area for a Spanish property using its cadastral reference number
  • Identify whether a property is classified as urban (UR) or rural (RU) from class_code
  • Build a municipality autocomplete by filtering list_municipalities with a partial name string
  • Map constructions array data to floor-level breakdowns for multi-unit building analysis
  • Validate and normalise Spanish addresses by resolving province and municipality codes before a property lookup
  • Extract postal codes and street details for geocoding pipelines using Catastro as a canonical address source
  • Research main use categories (Residencial, Comercial, Industrial) across properties in a given municipality
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min

One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Spain's Catastro have an official developer API?+
Yes. The Dirección General del Catastro provides a public OVC (Office Virtual del Catastro) web service at https://ovc.catastro.meh.es/ovcservweb/OVCSWLocalizacionRC/. This API surfaces that data in structured JSON rather than the original XML format.
What does the `constructions` field contain, and how is it structured?+
The constructions array is returned by both get_property_by_reference and get_property_by_address. Each element represents a construction unit and includes the use type, floor identifier, door identifier, and surface_m2 as a numeric area in square metres. A single property can have multiple entries if it contains several units or distinct construction types.
Does this API cover properties in the Basque Country or Navarra?+
No. The Catastro OVC service covers peninsular Spain and the islands but excludes the Basque Country (País Vasco) and Navarra, which maintain their own independent land registries (Haciendas Forales). You can fork this API on Parse and revise it to add endpoints pointing to those regional registries.
Can I retrieve valuation (valor catastral) or ownership information for a property?+
Not currently. The API returns physical and location attributes — class, use, surface, construction breakdown, and address fields — but does not expose assessed values or ownership records. You can fork this API on Parse and revise it to add those endpoints if the relevant Catastro services expose them for your use case.
How specific do address inputs need to be for `get_property_by_address`?+
province and municipality are required and must match Catastro's canonical names. Use list_provinces and list_municipalities first to get exact strings. street_type, street, and number are optional but improve match accuracy; omitting them may return ambiguous or no results depending on the municipality's data density.
Page content last updated . Spec covers 4 endpoints from www1.sedecatastro.gob.es.
Related APIs in Government PublicSee all →
catastro.minhap.es API
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.
propiedades.com API
Search and browse real estate listings from Mexico's Propiedades.com, view detailed property information including images and descriptions, and use location autocomplete to find homes in your desired area. Access comprehensive listing data to compare properties and make informed real estate decisions.
nahlizenidokn.cuzk.gov.cz API
Search for buildings, parcels, and land registry sheets across the Czech cadastre by address or code to view property characteristics, unit lists, and map previews. Access comprehensive property information and cadastral territory details, though ownership names and full registry contents require government ID verification.
casasapo.pt API
Search and browse Portuguese real estate listings from Casa Sapo for both sale and rent, view detailed property information, access bank-owned properties, and analyze market statistics to make informed decisions. Track new listings and price reductions to stay updated on the latest opportunities in the Portuguese property market.
tecnocasa.it API
Search and browse properties listed on Tecnocasa.it — Italy's largest real estate franchising network. Retrieve detailed property information including specifications, photos, pricing, and energy data. Look up agency contact details and use location autocomplete to refine searches by province, region, or city across Italy.
paginasamarillas.es API
Search and discover Spanish businesses with detailed information including contact details, social links, and customer reviews, with specialized features for finding restaurants and getting search suggestions. Access comprehensive business profiles to find exactly what you're looking for in Spain's leading business directory.
idealista.com API
Access data from idealista.com.
casasyterrenos.com API
Search and browse real estate listings across Mexico with detailed property information, pricing, and seller contacts from Casas y Terrenos. Find your perfect home or land by accessing comprehensive property details and comparing available options in one place.