{
  "openapi": "3.1.0",
  "info": {
    "title": "Parcel GPS API",
    "version": "1.0.0",
    "summary": "Cadastral parcels of Spain and the rest of Europe as a JSON API with English field names.",
    "description": "Public API of Parcel GPS (Catastro GPS), version 1. Cadastral parcels of Spain and the rest of Europe as a JSON API with English field names: reference, coordinates, outline and area; address search across Europe; relief, protected areas, ground motion, solar potential, agricultural use, market references and an investment score.\n\nEvery response has the same envelope. Success: `{\"success\": true, \"data\": {...}, \"remainingSearches\": 4321}` where `remainingSearches` is the monthly quota left for your organisation (same value as the `X-Quota-Remaining` header) and is omitted when unknown. Error: `{\"success\": false, \"code\": \"NOT_FOUND\", \"message\": \"...\", \"details\": {...}}` with a stable machine `code`, an English `message` and optional structured `details`.\n\nField names are English camelCase. Data values that come from official sources keep their source language (for example `use: \"Residencial\"`, a Spanish street address or the name of a Spanish data source); enums and messages produced by Parcel GPS are English. Areas are square metres unless the field name says otherwise (`areaHa`). `polygon` lists `[latitude, longitude]` pairs; GeoJSON `coordinates` are `[longitude, latitude]`.\n\nThe legacy routes under `/api/...` (Spanish field names) are **deprecated**: they keep working unchanged, and requests made with an API key receive `Deprecation` and `Link` headers pointing to this documentation (https://www.parcelgps.com/en/api/docs). New integrations must use `/v1`.\n\nAttribution to the official source (for Spain the Dirección General del Catastro) is mandatory and is returned in `attribution` or `source` where it applies.\n\n## Pricing and quota\n\nPlan prices are per month, in euros, **VAT included**. The quota belongs to your organisation and is shared by all its API keys.\n\n| Plan | Price per month (VAT included) | Units per month | Requests per minute | Extra units, per 1,000 (prepaid balance, plus 21% VAT) |\n|---|---|---|---|---|\n| Free | 0 € | 250 | 10 | 10.00 € |\n| Developer | 19 € | 5,000 | 60 | 5.00 € |\n| Startup | 49 € | 15,000 | 120 | 4.00 € |\n| Growth | 99 € | 50,000 | 300 | 2.50 € |\n| Enterprise | from 300 € | by contract | 300, or more by contract | by contract |\n\n**Price data is for paid plans only.** `GET /v1/parcels/{reference}/market` (rural land prices: price per hectare by crop and the province farmland price) and `GET /v1/parcels/{reference}/value-history` answer 403 `KEY_PLAN_001` to Free-plan keys, without charging a unit. For the same keys `/agriculture` omits `cropPrice` and `/solar` omits the land-lease figures. `/market` only prices rural land (agricultural parcels; small agricultural buildings such as sheds, ponds or greenhouses are allowed): housing, industrial or any other non-agricultural property, and rural land with no price, answer 422 `MKT_001` with no charge.\n\n**What counts as a unit.** Only successful (2xx) answers with data cost units:\n\n| Call | Units |\n|---|---|\n| Parcel by reference, by coordinates, `/solar`, `/agriculture`, `/score`, `/market` | 1 per answer; 0 when the answer carries no data (422 `MKT_001` from `/market`, `available: false` from `/solar`, an empty `/agriculture`, a `/score` without data) |\n| `GET /v1/search/address/candidates` | 1 when it returns candidates; none found is a 404 and free |\n| `GET /v1/parcels/{reference}/units` | 1 per unit (dwelling) served in that page, minimum 1 |\n| `POST /v1/parcels/compare` | 1 per parcel found (0 to 3); free if none is found |\n| Any other 2xx answer | 1 |\n| 304 Not Modified, 300, 4xx, 5xx | free |\n\n**Reset.** The quota resets at 00:00 UTC on day 1 of every calendar month (`X-Quota-Reset`). Unused units do not carry over to the next month.\n\n**When the quota runs out.** Requests keep working and each extra unit is charged to your organisation's prepaid balance at your plan's price above. Top-ups are made in the developer portal (https://parcelgps.com/app/developer): from 5 € to 1,000 € net per top-up, plus 21% VAT shown on the invoice. With the quota used up and no balance left (or overage paused in the portal), the API answers **429 `KEY_AUTH_004`** and nothing is charged; there is never a debt. Current overage prices: the developer portal.\n\n**Rate limit.** Per API key and minute, by plan (table above). Going over answers 429 `KEY_RATE_002` with `Retry-After`.\n\nError bodies always carry a stable machine code in `code` and an English text in `message`.\n\n## Coverage by country\n\nWhat each country answers today (measured against production on 1 October 2026; address search with five real addresses per country). Every country returns the reference, the GPS point (`latitud`, `longitud`), the outline (`poligono`) and the area (`superficieParcela`), by reference and by coordinates, unless the row says otherwise. `availableFields` in each response says which of the optional fields that response really carries.\n\n| Country | `country` | By reference | By coordinates | By address (`/v1/search/address/candidates`) | Extra data |\n|---|---|---|---|---|---|\n| Spain, common territory | `ES` | yes | yes | yes (CartoCiudad) | address, use, class, built area, year, units/dwellings; `/units` |\n| Spain, Basque Country / Navarre | `PV` / `NA` | yes | yes | yes, with `country=ES` | address, use, built area, year; `/units` (foral copy, no participation coefficient) |\n| France | `FR` | yes | yes | yes (Base Adresse Nationale) | by reference also use, built area, year, dwellings and floors (BDNB) |\n| Italy | `IT` | yes | yes | yes (OpenStreetMap) | municipality, province |\n| Germany (15 of 16 Länder, **no Bavaria**) | `DE` | yes | yes | yes (OpenStreetMap), not in Bavaria | municipality, Land |\n| Austria | `AT` | yes | yes | yes (OpenStreetMap) | municipality, use |\n| Netherlands | `NL` | yes | yes | yes (PDOK Locatieserver) | municipality |\n| Belgium | `BE` | yes | yes (3-7 s, slow source) | yes (Digitaal Vlaanderen + OpenStreetMap), 5-15 s | — |\n| Poland | `PL` | yes | yes | yes (GUGiK) | municipality, voivodeship |\n| Switzerland | `CH` | yes | yes, except where the canton publishes no parcels (e.g. Vaud) | yes (swisstopo) | canton |\n| Czechia | `CZ` | yes | yes | yes (RÚIAN) | — |\n| Denmark | `DK` | yes | yes | yes (Dataforsyningen) | municipality |\n| Norway | `NO` | yes | yes | yes (OpenStreetMap) | municipality |\n| Finland | `FI` | yes | yes | yes (OpenStreetMap) | — |\n| Estonia | `EE` | yes | yes | yes (In-ADS) | municipality |\n| Latvia | `LV` | yes; bare digits need `?country=LV` | yes | yes (OpenStreetMap) | — |\n| Lithuania, Slovenia, Slovakia, Bulgaria | `LT`, `SI`, `SK`, `BG` | yes | yes | yes (OpenStreetMap; Cyrillic accepted in `BG`) | municipality in `SI` |\n| Luxembourg, Liechtenstein, Iceland | `LU`, `LI`, `IS` | yes | yes | yes (OpenStreetMap) | — |\n| Greece | `GR` | only with `?country=GR` | yes | yes (OpenStreetMap; Greek script) | — |\n| Cyprus | `CY` | yes | yes | yes (OpenStreetMap), low `confidence`: few house numbers mapped | — |\n| Portugal | `PT` | yes | partial: the cadastre does not cover Lisbon, Porto or Coimbra | partial, same limit; the DGT source is often down | municipality |\n| Ireland | `IE` | only with `?country=` (the numeric SP_ID) | partial | partial (OpenStreetMap) | county |\n| United Kingdom | `UK` | no | Scotland only | Scotland only (OpenStreetMap) | — |\n| Croatia | `HR` | no: there is no open cadastre | **ARKOD agricultural parcels only** (Croatian Paying Agency), not cadastral parcels, and not nationwide (Zagreb and Rijeka have none) | no (422) | — |\n| Sweden | `SE` | agricultural blocks | agricultural blocks | no (422): no parcels at urban addresses | land use |\n\nNot covered: Hungary, Romania and the rest. A reference from a country without coverage answers **422 `CNV_COVERAGE`**; bare digits that could belong to several countries answer **300 `CNV_AMBIGUOUS`** with the candidate countries — repeat the call with `?country=`. `/units` and dwellings are Spain only (common territory, Basque Country and Navarra).\n\nThe analysis endpoints (`/solar`, `/agriculture`, `/score`) cover `ES`, `PV`, `NA`, `PT`, `FR`, `IT` and `DE`; `/agriculture` also covers `AT`, `NL`, `CZ` and `PL` with the crop declared to each country's paying agency (LPIS/GSA). Other countries answer 422 `CNV_COVERAGE`. Human-readable coverage and pricing: https://parcelgps.com/developers.",
    "contact": {
      "name": "Parcel GPS",
      "url": "https://parcelgps.com/developers",
      "email": "soporte@catastrogps.es"
    },
    "termsOfService": "https://www.catastrogps.es/terminos"
  },
  "externalDocs": {
    "description": "Guides and examples",
    "url": "https://www.parcelgps.com/en/api/docs"
  },
  "servers": [
    {
      "url": "https://api.parcelgps.com/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "tags": [
    {
      "name": "Parcels",
      "description": "Look a parcel or its units up by reference."
    },
    {
      "name": "Search",
      "description": "Find a parcel by coordinates, address or any text."
    },
    {
      "name": "Analysis",
      "description": "Solar, agriculture, market, score, history and comparison."
    },
    {
      "name": "Hazards",
      "description": "Terrain and ground motion measured from satellite data."
    },
    {
      "name": "Export",
      "description": "Download a parcel as a file."
    }
  ],
  "paths": {
    "/parcels/{reference}": {
      "get": {
        "tags": [
          "Parcels"
        ],
        "summary": "Parcel by reference",
        "description": "Looks a parcel or unit up by its official cadastral reference in any covered country. Costs 1 unit. Supports ETag / If-None-Match (304 is free).",
        "operationId": "getParcel",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "9872023VH5797S0001WX"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country: ES, PV, NA, FR, IT, DE, AT, PT, PL, NL, CH, BE, CZ, DK, FI, EE, SI, LT, LU, SK, BG, LI, IS, CY, GR, LV, IE, SE. Detected from the reference when omitted; required for GR, LV and IE. Coverage table in the description of this API and at https://parcelgps.com/developers.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of crop names: es, ca, en, pt, fr, it, de, pl, nl or cs. Falls back to the Accept-Language header, then English. The original Spanish label is always in `cropOriginal`.",
            "schema": {
              "type": "string",
              "enum": [
                "es",
                "ca",
                "en",
                "pt",
                "fr",
                "it",
                "de",
                "pl",
                "nl",
                "cs"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParcelResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "9872023VH5797S0001WX",
                    "country": "ES",
                    "address": "CL GLORIA 51 Pl:OD Pt:OS",
                    "postalCode": "13730",
                    "municipality": "SANTA CRUZ DE MUDELA",
                    "region": "Ciudad Real",
                    "latitude": 38.6401435,
                    "longitude": -3.4632835,
                    "googleMapsUrl": "https://www.google.com/maps?q=38.640144,-3.463284",
                    "use": "Residencial",
                    "landClass": "Urbano",
                    "builtArea": 308,
                    "parcelArea": 397,
                    "yearBuilt": 1980,
                    "ownershipShare": 100,
                    "floor": "OD",
                    "door": "OS",
                    "fromOwnCopy": true,
                    "polygon": [
                      [
                        38.64033960550103,
                        -3.463190495967865
                      ],
                      [
                        38.64014267310775,
                        -3.4631650149822235
                      ],
                      [
                        38.640120675306825,
                        -3.463370203971863
                      ]
                    ],
                    "availableFields": {
                      "use": true,
                      "landClass": true,
                      "yearBuilt": true,
                      "builtArea": true,
                      "ownershipShare": true,
                      "dwellings": true,
                      "floors": false,
                      "address": true,
                      "addressSearch": true
                    }
                  },
                  "remainingSearches": 0
                }
              }
            }
          },
          "300": {
            "description": "The reference could belong to several countries (CNV_AMBIGUOUS): repeat with ?country=XX.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_AMBIGUOUS",
                  "message": "This reference could belong to several countries. Repeat the call with ?country=XX.",
                  "details": {
                    "reference": "12345678",
                    "candidates": [
                      {
                        "country": "LV",
                        "confidence": 0.6,
                        "supported": true
                      },
                      {
                        "country": "GR",
                        "confidence": 0.4,
                        "supported": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_PLACE_NAME",
                  "message": "This looks like a place name, not a cadastral reference. Use /v1/search/coordinates with the point in details.location.",
                  "details": {
                    "query": "MADRID",
                    "place": "MADRID",
                    "location": {
                      "latitude": 40.416782,
                      "longitude": -3.703507,
                      "address": "Madrid, Community of Madrid",
                      "label": "Madrid, Community of Madrid"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/units": {
      "get": {
        "tags": [
          "Parcels"
        ],
        "summary": "Units (dwellings, premises) of a Spanish property",
        "description": "Every unit of a property in Spain (common territory, Basque Country and Navarre), paginated: when `truncated` is true repeat with `cursor=nextCursor`. Costs 1 unit per unit served, minimum 1.",
        "operationId": "getParcelUnits",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "14-character parcel reference (or a 20-character unit reference)",
            "schema": {
              "type": "string"
            },
            "example": "0745901TG4304N"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The nextCursor of the previous page",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Units per page (maximum and default 200)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnitsPageResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "0745901TG4304N",
                    "address": "AV JOSE RGUEZ BORBOLLA CAMOY 10",
                    "postalCode": "41704",
                    "municipality": "DOS HERMANAS",
                    "region": "Sevilla",
                    "mainUse": "Residencial",
                    "totalArea": 32789,
                    "yearBuilt": 2023,
                    "unitCount": 200,
                    "propertyUnitCount": 365,
                    "units": [
                      {
                        "reference": "0745901TG4304N0002KH",
                        "staircase": "",
                        "floor": "01",
                        "door": "B",
                        "use": "Residencial",
                        "area": 155,
                        "description": "Planta 01, Pta. B - Residencial",
                        "ownershipShare": 0.279543,
                        "yearBuilt": 2023,
                        "address": "AV JOSE RGUEZ BORBOLLA CAMOY 10 Pl:01 Pt:B"
                      },
                      {
                        "reference": "0745901TG4304N0003LJ",
                        "staircase": "",
                        "floor": "01",
                        "door": "C",
                        "use": "Residencial",
                        "area": 163,
                        "description": "Planta 01, Pta. C - Residencial",
                        "ownershipShare": 0.293879,
                        "yearBuilt": 2023,
                        "address": "AV JOSE RGUEZ BORBOLLA CAMOY 10 Pl:01 Pt:C"
                      },
                      {
                        "reference": "0745901TG4304N0004BK",
                        "staircase": "",
                        "floor": "01",
                        "door": "D",
                        "use": "Residencial",
                        "area": 157,
                        "description": "Planta 01, Pta. D - Residencial",
                        "ownershipShare": 0.281932,
                        "yearBuilt": 2023,
                        "address": "AV JOSE RGUEZ BORBOLLA CAMOY 10 Pl:01 Pt:D"
                      }
                    ],
                    "truncated": true,
                    "nextCursor": "0745901TG4304N0201MZ",
                    "dataSource": "clone",
                    "dataDate": "2026-01-23",
                    "attribution": "Dirección General del Catastro"
                  },
                  "remainingSearches": -1
                }
              }
            }
          },
          "400": {
            "description": "Invalid cursor (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "cursor must be the 20-character reference returned as nextCursor."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/polygon": {
      "get": {
        "tags": [
          "Parcels"
        ],
        "summary": "Parcel outline as GeoJSON",
        "description": "The outline of the parcel as a GeoJSON Feature, with centroid and area. Costs 1 unit.",
        "operationId": "getParcelPolygon",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "9872023VH5797S"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country: ES, PV, NA, FR, IT, DE, AT, PT, PL, NL, CH, BE, CZ, DK, FI, EE, SI, LT, LU, SK, BG, LI, IS, CY, GR, LV, IE, SE. Detected from the reference when omitted; required for GR, LV and IE. Coverage table in the description of this API and at https://parcelgps.com/developers.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParcelOutlineResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "9872023VH5797S",
                    "centroid": {
                      "latitude": 38.6401435,
                      "longitude": -3.4632835
                    },
                    "area": 397,
                    "geojson": {
                      "type": "Feature",
                      "geometry": {
                        "type": "Polygon",
                        "coordinates": [
                          [
                            [
                              -3.463190495967865,
                              38.64033960550103
                            ],
                            [
                              -3.4631650149822235,
                              38.64014267310775
                            ],
                            [
                              -3.463370203971863,
                              38.640120675306825
                            ]
                          ]
                        ]
                      },
                      "properties": {
                        "reference": "9872023VH5797S",
                        "area": 397,
                        "centroid": {
                          "latitude": 38.6401435,
                          "longitude": -3.4632835
                        }
                      }
                    },
                    "officialRecordUrl": "https://www1.sedecatastro.gob.es/CYCBienInmueble/OVCConCiworker.aspx?tipo=RC&rc=9872023VH5797S",
                    "cadastreUrl": "https://www1.sedecatastro.gob.es/CYCBienInmueble/OVCConCiWorker.aspx?Vigession=PAN&RefC=9872023VH5797S",
                    "googleMapsUrl": "https://www.google.com/maps?q=38.640144,-3.463284"
                  },
                  "remainingSearches": -1
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_COVERAGE",
                  "message": "This analysis is not available yet for the country of this reference. The countries it covers are listed in details.supportedCountries.",
                  "details": {
                    "country": "CH",
                    "reference": "CH119192997709",
                    "feature": "solar",
                    "supported": false,
                    "supportedCountries": [
                      "ES",
                      "PV",
                      "NA"
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/subparcels": {
      "get": {
        "tags": [
          "Parcels"
        ],
        "summary": "Subparcels (crops and land use) of a parcel",
        "description": "What is on each part of the parcel: Spain (every crop subparcel with its outline, foral territories included: Bizkaia, Álava, Navarre; Gipuzkoa without geometry) and AT (cadastral land uses of every Grundstück, with area and outline; BEV, CC BY 4.0); EE (declared crops (PRIA) when they cover most of the parcel, otherwise the cadastral land types with area; PRIA / Maa- ja Ruumiamet); GR (main use of the parcel and its share; Hellenic Cadastre); DE (ALKIS actual land use of each Flurstück with outline in North Rhine-Westphalia, Brandenburg, Lower Saxony, Saxony, Mecklenburg-Vorpommern, Rhineland-Palatinate and Hamburg; the Länder surveying offices, dl-de / CC BY 4.0); CZ (land type (druh pozemku) and use (způsob využití) of every parcel, with outline; ČÚZK RÚIAN, CC BY 4.0); NL (mapped land cover inside the perceel (BGT: grassland, arable, yard, buildings, water, roads…) with outline; Kadaster BGT via PDOK, CC0); FR (declared crops (RPG) intersected with the parcel; IGN RPG, Licence Ouverte 2.0); PT (declared crops (IFAP parcelário) intersected with the parcel; IFAP iSIP, public data); SE (declared crop fields (skiften) of the agricultural block; Jordbruksverket, CC BY 4.0); CH (declared agricultural land uses intersected with the parcel; geodienste.ch, cantonal terms); FI (declared crop fields (Ruokavirasto GSAA) intersected with the parcel; Ruokavirasto, CC BY 4.0); BE (declared crops of Flanders (Dept. LV) and Wallonia (SPW SIGEC) intersected with the parcel; free with attribution); IE (declared crops (DAFM anonymous LPIS) intersected with the parcel; DAFM, CC BY 4.0); SI (actual agricultural and forest land use (RABA) intersected with the parcel; MKGP, public data). Each row has a stable code, the name in your language, the original label, its area in m², what kind of row it is (`kind`), a common land-use class and the source with licence and date. Costs 1 unit; 0 when the parcel has none (`count` 0, empty list). If the source does not answer, 503 `SUB_001` and nothing is charged; retry after a few seconds.",
        "operationId": "getParcelSubparcels",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "46063A00100121"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Country code (ES, PV, NA, AT, DE, FR...). Detected from the reference when omitted.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of crop names: es, ca, en, pt, fr, it, de, pl, nl or cs. Falls back to the Accept-Language header, then English. The label as the source writes it is always in `cropOriginal`.",
            "schema": {
              "type": "string",
              "enum": [
                "es",
                "ca",
                "en",
                "pt",
                "fr",
                "it",
                "de",
                "pl",
                "nl",
                "cs"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParcelSubparcelsResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "46063A00100121",
                    "country": "ES",
                    "parcelArea": 8814,
                    "count": 3,
                    "subparcels": [
                      {
                        "id": "a",
                        "cropCode": "G-",
                        "crop": "Rainfed carob",
                        "cropOriginal": "Algarrobo secano",
                        "intensity": 1,
                        "area": 6623,
                        "geometry": {
                          "type": "MultiPolygon",
                          "coordinates": [
                            [
                              [
                                [
                                  -0.565562,
                                  39.210146
                                ],
                                [
                                  -0.565712,
                                  39.210254
                                ],
                                [
                                  -0.565744,
                                  39.210311
                                ],
                                [
                                  -0.565826,
                                  39.210521
                                ],
                                [
                                  -0.565927,
                                  39.210772
                                ],
                                [
                                  -0.565921,
                                  39.21078
                                ],
                                [
                                  -0.565903,
                                  39.210805
                                ],
                                [
                                  -0.565932,
                                  39.21084
                                ],
                                [
                                  -0.565821,
                                  39.210869
                                ],
                                [
                                  -0.5658,
                                  39.210875
                                ],
                                [
                                  -0.565665,
                                  39.210902
                                ],
                                [
                                  -0.565637,
                                  39.210908
                                ],
                                [
                                  -0.56556,
                                  39.210926
                                ],
                                [
                                  -0.565212,
                                  39.211014
                                ],
                                [
                                  -0.565218,
                                  39.211031
                                ],
                                [
                                  -0.564608,
                                  39.211198
                                ],
                                [
                                  -0.564595,
                                  39.211177
                                ],
                                [
                                  -0.564563,
                                  39.211127
                                ],
                                [
                                  -0.564428,
                                  39.210915
                                ],
                                [
                                  -0.564683,
                                  39.210791
                                ],
                                [
                                  -0.564801,
                                  39.210712
                                ],
                                [
                                  -0.564921,
                                  39.210566
                                ],
                                [
                                  -0.564944,
                                  39.210435
                                ],
                                [
                                  -0.564992,
                                  39.210336
                                ],
                                [
                                  -0.565183,
                                  39.210377
                                ],
                                [
                                  -0.565354,
                                  39.210393
                                ],
                                [
                                  -0.565393,
                                  39.21018
                                ],
                                [
                                  -0.565562,
                                  39.210146
                                ]
                              ],
                              [
                                [
                                  -0.565776,
                                  39.210862
                                ],
                                [
                                  -0.565752,
                                  39.210796
                                ],
                                [
                                  -0.565582,
                                  39.210833
                                ],
                                [
                                  -0.565606,
                                  39.210899
                                ],
                                [
                                  -0.565776,
                                  39.210862
                                ]
                              ],
                              [
                                [
                                  -0.565497,
                                  39.21036
                                ],
                                [
                                  -0.565554,
                                  39.210352
                                ],
                                [
                                  -0.565535,
                                  39.210276
                                ],
                                [
                                  -0.565478,
                                  39.210284
                                ],
                                [
                                  -0.565497,
                                  39.21036
                                ]
                              ],
                              [
                                [
                                  -0.565395,
                                  39.210336
                                ],
                                [
                                  -0.565472,
                                  39.210325
                                ],
                                [
                                  -0.565462,
                                  39.210286
                                ],
                                [
                                  -0.565385,
                                  39.210298
                                ],
                                [
                                  -0.565395,
                                  39.210336
                                ]
                              ],
                              [
                                [
                                  -0.565303,
                                  39.210607
                                ],
                                [
                                  -0.565372,
                                  39.210614
                                ],
                                [
                                  -0.56539,
                                  39.210498
                                ],
                                [
                                  -0.565322,
                                  39.210491
                                ],
                                [
                                  -0.565325,
                                  39.210468
                                ],
                                [
                                  -0.565141,
                                  39.210451
                                ],
                                [
                                  -0.565115,
                                  39.210611
                                ],
                                [
                                  -0.565299,
                                  39.210629
                                ],
                                [
                                  -0.565303,
                                  39.210607
                                ]
                              ],
                              [
                                [
                                  -0.565311,
                                  39.21045
                                ],
                                [
                                  -0.56532,
                                  39.210401
                                ],
                                [
                                  -0.565171,
                                  39.210384
                                ],
                                [
                                  -0.565162,
                                  39.210433
                                ],
                                [
                                  -0.565311,
                                  39.21045
                                ]
                              ],
                              [
                                [
                                  -0.565006,
                                  39.210963
                                ],
                                [
                                  -0.565075,
                                  39.210963
                                ],
                                [
                                  -0.565075,
                                  39.210846
                                ],
                                [
                                  -0.565005,
                                  39.210846
                                ],
                                [
                                  -0.565005,
                                  39.210823
                                ],
                                [
                                  -0.56482,
                                  39.210824
                                ],
                                [
                                  -0.56482,
                                  39.210986
                                ],
                                [
                                  -0.565006,
                                  39.210985
                                ],
                                [
                                  -0.565006,
                                  39.210963
                                ]
                              ],
                              [
                                [
                                  -0.564814,
                                  39.211051
                                ],
                                [
                                  -0.564794,
                                  39.211004
                                ],
                                [
                                  -0.564651,
                                  39.211042
                                ],
                                [
                                  -0.564672,
                                  39.211089
                                ],
                                [
                                  -0.564814,
                                  39.211051
                                ]
                              ]
                            ]
                          ]
                        }
                      },
                      {
                        "id": "b",
                        "cropCode": "NR",
                        "crop": "Irrigated citrus",
                        "cropOriginal": "Agrios regadío",
                        "intensity": 4,
                        "area": 1103,
                        "geometry": {
                          "type": "MultiPolygon",
                          "coordinates": [
                            [
                              [
                                [
                                  -0.564992,
                                  39.210336
                                ],
                                [
                                  -0.565022,
                                  39.210273
                                ],
                                [
                                  -0.565006,
                                  39.210088
                                ],
                                [
                                  -0.565524,
                                  39.210093
                                ],
                                [
                                  -0.565562,
                                  39.210146
                                ],
                                [
                                  -0.565393,
                                  39.21018
                                ],
                                [
                                  -0.565354,
                                  39.210393
                                ],
                                [
                                  -0.565183,
                                  39.210377
                                ],
                                [
                                  -0.564992,
                                  39.210336
                                ]
                              ]
                            ]
                          ]
                        }
                      },
                      {
                        "id": "c",
                        "cropCode": "NR",
                        "crop": "Irrigated citrus",
                        "cropOriginal": "Agrios regadío",
                        "intensity": 4,
                        "area": 1015,
                        "geometry": {
                          "type": "MultiPolygon",
                          "coordinates": [
                            [
                              [
                                [
                                  -0.565218,
                                  39.211031
                                ],
                                [
                                  -0.565276,
                                  39.211221
                                ],
                                [
                                  -0.565148,
                                  39.211217
                                ],
                                [
                                  -0.564696,
                                  39.21136
                                ],
                                [
                                  -0.564669,
                                  39.211311
                                ],
                                [
                                  -0.564608,
                                  39.211198
                                ],
                                [
                                  -0.565218,
                                  39.211031
                                ]
                              ]
                            ]
                          ]
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_COVERAGE",
                  "message": "This analysis is not available yet for the country of this reference. The countries it covers are listed in details.supportedCountries.",
                  "details": {
                    "country": "CH",
                    "reference": "CH119192997709",
                    "feature": "solar",
                    "supported": false,
                    "supportedCountries": [
                      "ES",
                      "PV",
                      "NA"
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE), or the subparcels of this parcel could not be read right now (SUB_001). Nothing is charged. Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/sigpac": {
      "get": {
        "tags": [
          "Parcels"
        ],
        "summary": "SIGPAC enclosures (recintos) of a parcel, with geometry",
        "description": "Every SIGPAC enclosure (recinto) of the parcel in Spain, the Basque Country and Navarre: its SIGPAC identifier, land-use code with its name in 10 languages, area in hectares, irrigation coefficient, slope, altitude, CAP pasture eligibility and region, incidents with their official text, and the GeoJSON outline of each enclosure. Add `format=geojson` to download a GeoJSON FeatureCollection (one Feature per enclosure, properties as in the JSON answer) instead of the JSON envelope. Source: FEGA SIGPAC, read live and cached 24 h; free reuse citing the source (Ley 37/2007). For rustic references the SIGPAC parcel with the same polygon and parcel is read; otherwise, or when that one is not where the cadastral parcel is, the SIGPAC parcel under the parcel's point (`match`). A SIGPAC parcel usually matches the cadastral parcel but may differ after recent cadastral changes. Costs 1 unit; 0 when there are no enclosures (`count` 0). If SIGPAC does not answer, 503 `SIG_001` and nothing is charged; retry after a few seconds.",
        "operationId": "getParcelSIGPAC",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "46063A00100121"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ES, PV or NA. Detected from the reference when omitted. Other countries answer 422 CNV_COVERAGE.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of land-use names: es, ca, en, pt, fr, it, de, pl, nl or cs. Falls back to the Accept-Language header, then English.",
            "schema": {
              "type": "string",
              "enum": [
                "es",
                "ca",
                "en",
                "pt",
                "fr",
                "it",
                "de",
                "pl",
                "nl",
                "cs"
              ]
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "`geojson` answers a downloadable GeoJSON FeatureCollection (application/geo+json, Content-Disposition attachment).",
            "schema": {
              "type": "string",
              "enum": [
                "geojson"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParcelSIGPACResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "46063A00100121",
                    "country": "ES",
                    "sigpacParcel": {
                      "province": 46,
                      "municipality": 63,
                      "aggregate": 0,
                      "zone": 0,
                      "polygon": 1,
                      "parcel": 121
                    },
                    "match": "reference",
                    "count": 9,
                    "totalAreaHa": 0.8815,
                    "crs": "EPSG:4258 (ETRS89, lon/lat; equal to WGS84 within about 1 m)",
                    "retrievedAt": "2026-10-22T13:47:26Z",
                    "source": {
                      "name": "SIGPAC — Sistema de Información Geográfica de Parcelas Agrícolas",
                      "provider": "Fondo Español de Garantía Agraria (FEGA), Ministerio de Agricultura, Pesca y Alimentación",
                      "license": "Free reuse citing the source, without altering the content (Ley 37/2007; FEGA legal notice)",
                      "attribution": "Fuente: FEGA — SIGPAC",
                      "url": "https://sigpac-hubcloud.es/servicioconsultassigpac/"
                    },
                    "enclosures": [
                      {
                        "id": "46:63:0:0:1:121:2",
                        "province": 46,
                        "municipality": 63,
                        "aggregate": 0,
                        "zone": 0,
                        "polygon": 1,
                        "parcel": 121,
                        "enclosure": 2,
                        "landUseCode": "FY",
                        "landUse": "Fruit trees",
                        "cropCode": "SIGPAC:FY",
                        "useClass": "orchard",
                        "useClassName": "Orchard",
                        "areaHa": 0.0513,
                        "irrigationPct": 0,
                        "meanSlopePct": 7.6,
                        "altitudeM": 117,
                        "pastureEligibilityPct": null,
                        "capRegion": 12,
                        "incidents": [
                          {
                            "code": 199,
                            "description": "Recinto inactivo"
                          }
                        ],
                        "geometry": {
                          "type": "Polygon",
                          "coordinates": [
                            [
                              [
                                -0.5654559,
                                39.210781
                              ],
                              [
                                -0.5654542,
                                39.2108295
                              ],
                              [
                                -0.5654101,
                                39.2108318
                              ],
                              [
                                -0.5654208,
                                39.2108754
                              ],
                              [
                                -0.5654238,
                                39.210884
                              ],
                              [
                                -0.5650793,
                                39.2109849
                              ],
                              [
                                -0.5650815,
                                39.2108385
                              ],
                              [
                                -0.5650521,
                                39.2108376
                              ],
                              [
                                -0.5650486,
                                39.2108165
                              ],
                              [
                                -0.5650686,
                                39.2107897
                              ],
                              [
                                -0.5654559,
                                39.210781
                              ]
                            ]
                          ]
                        }
                      },
                      {
                        "id": "46:63:0:0:1:121:9",
                        "province": 46,
                        "municipality": 63,
                        "aggregate": 0,
                        "zone": 0,
                        "polygon": 1,
                        "parcel": 121,
                        "enclosure": 9,
                        "landUseCode": "CI",
                        "landUse": "Citrus",
                        "cropCode": "SIGPAC:CI",
                        "useClass": "orchard",
                        "useClassName": "Orchard",
                        "areaHa": 0.0039,
                        "irrigationPct": 100,
                        "meanSlopePct": 12.8,
                        "altitudeM": 116,
                        "pastureEligibilityPct": null,
                        "capRegion": 12,
                        "incidents": [
                          {
                            "code": 199,
                            "description": "Recinto inactivo"
                          },
                          {
                            "code": 74,
                            "description": "Información de uso SIGPAC aportada por la Comunidad Autónoma"
                          },
                          {
                            "code": 75,
                            "description": "Información del sistema de explotación aportada por la Comunidad Autónoma"
                          }
                        ],
                        "geometry": {
                          "type": "Polygon",
                          "coordinates": [
                            [
                              [
                                -0.5654924,
                                39.2108571
                              ],
                              [
                                -0.5655143,
                                39.210906
                              ],
                              [
                                -0.5654392,
                                39.2109262
                              ],
                              [
                                -0.5654238,
                                39.210884
                              ],
                              [
                                -0.5654208,
                                39.2108754
                              ],
                              [
                                -0.5654924,
                                39.2108571
                              ]
                            ]
                          ]
                        }
                      }
                    ]
                  }
                }
              },
              "application/geo+json": {
                "schema": {
                  "type": "object",
                  "description": "GeoJSON FeatureCollection with metadata (reference, sigpacParcel, match, count, totalAreaHa, crs, retrievedAt, source)"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_COVERAGE",
                  "message": "This analysis is not available yet for the country of this reference. The countries it covers are listed in details.supportedCountries.",
                  "details": {
                    "country": "CH",
                    "reference": "CH119192997709",
                    "feature": "sigpac",
                    "supported": false,
                    "supportedCountries": [
                      "ES",
                      "PV",
                      "NA"
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "SIGPAC or the cadastre is temporarily unavailable (SIG_001, SERVICE_UNAVAILABLE). Nothing is charged. Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SIG_001",
                  "message": "The SIGPAC enclosures of this parcel could not be read right now. Nothing was charged; retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/terrain": {
      "get": {
        "tags": [
          "Hazards"
        ],
        "summary": "Relief, protected areas and climate",
        "description": "Elevation, slope and aspect from the Copernicus DEM, Natura 2000 and nationally protected areas from the EEA, climate from ERA5-Land and nitrate vulnerable zones. Costs 1 unit.",
        "operationId": "getParcelTerrain",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "10194A00110004"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country: ES, PV, NA, FR, IT, DE, AT, PT, PL, NL, CH, BE, CZ, DK, FI, EE, SI, LT, LU, SK, BG, LI, IS, CY, GR, LV, IE, SE. Detected from the reference when omitted; required for GR, LV and IE. Coverage table in the description of this API and at https://parcelgps.com/developers.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Latitude of the parcel, when the reference alone cannot locate it",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "description": "Longitude of the parcel",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TerrainResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "10194A00110004",
                    "country": "ES",
                    "relief": {
                      "status": "ok",
                      "elevationM": {
                        "mean": 359.5,
                        "min": 216.2,
                        "max": 506.6
                      },
                      "slope": {
                        "meanPct": 37.3,
                        "meanDeg": 20.5,
                        "maxPct": 71.6,
                        "class": "very_steep",
                        "maxClass": "very_steep",
                        "shareOver10Pct": 99,
                        "classesPct": {
                          "flat": 0.1,
                          "gentle": 1,
                          "moderate": 5.6,
                          "steep": 18.8,
                          "very_steep": 74.7
                        }
                      },
                      "aspect": {
                        "dominant": "N",
                        "dominantSharePct": 77.1,
                        "meanDeg": 359,
                        "flatSharePct": 0.1,
                        "sectorsPct": {
                          "E": 0.1,
                          "N": 77.1,
                          "NE": 9,
                          "NW": 11.2,
                          "S": 0,
                          "SE": 0,
                          "SW": 1,
                          "W": 1.4
                        }
                      },
                      "sample": {
                        "method": "parcel",
                        "cells": 1365,
                        "resolutionM": 31
                      },
                      "source": {
                        "name": "Copernicus DEM GLO-30",
                        "provider": "Copernicus / ESA",
                        "license": "Copernicus DEM licence (free, commercial use allowed)",
                        "attribution": "© DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved",
                        "url": "https://dataspace.copernicus.eu/explore-data/data-collections/copernicus-contributing-missions/collections-description/COP-DEM",
                        "resolution": "30 m",
                        "edition": "2021"
                      }
                    },
                    "protectedAreas": {
                      "status": "ok",
                      "intersects": true,
                      "inside": true,
                      "maxOverlapPct": 100,
                      "natura2000": [
                        {
                          "code": "ES0000014",
                          "name": "Monfragüe y las Dehesas del Entorno",
                          "type": "SPA",
                          "country": "ES",
                          "overlapPct": 100
                        },
                        {
                          "code": "ES4320077",
                          "name": "Monfragüe",
                          "type": "SCI",
                          "country": "ES",
                          "overlapPct": 100
                        }
                      ],
                      "national": [
                        {
                          "code": "4820",
                          "name": "Monfragüe",
                          "designation": "National Park",
                          "country": "ES",
                          "overlapPct": 100
                        }
                      ],
                      "method": "parcel",
                      "sources": [
                        {
                          "name": "Natura 2000",
                          "provider": "European Environment Agency (EEA)",
                          "license": "CC BY 4.0",
                          "attribution": "© European Environment Agency (EEA), Natura 2000 end 2024",
                          "url": "https://sdi.eea.europa.eu/catalogue/srv/api/records/91357f39-7866-41ce-b447-43905c364ec8",
                          "edition": "end 2024"
                        },
                        {
                          "name": "Nationally designated areas (CDDA)",
                          "provider": "European Environment Agency (EEA)",
                          "license": "CC BY 4.0",
                          "attribution": "© European Environment Agency (EEA), Nationally designated areas 2025",
                          "url": "https://sdi.eea.europa.eu/catalogue/srv/api/records/81f265d0-0734-4315-af0f-63721e937f57",
                          "edition": "2025"
                        }
                      ]
                    },
                    "climate": {
                      "status": "ok",
                      "baseline": {
                        "startYear": 1991,
                        "endYear": 2020,
                        "meanTempC": 16.21,
                        "annualPrecipMm": 697,
                        "frostDaysPerYear": 10.3,
                        "hotDaysPerYear": 24.9
                      },
                      "recent": {
                        "startYear": 2015,
                        "endYear": 2024,
                        "meanTempC": 17.14,
                        "annualPrecipMm": 595,
                        "frostDaysPerYear": 6.9,
                        "hotDaysPerYear": 37.1
                      },
                      "change": {
                        "meanTempC": 0.93,
                        "annualPrecipMm": -102,
                        "annualPrecipPct": -14.6,
                        "frostDaysPerYear": -3.4,
                        "hotDaysPerYear": 12.2
                      },
                      "frostThresholdC": 0,
                      "hotThresholdC": 35,
                      "cell": {
                        "lat": 39.8,
                        "lng": -6,
                        "resolutionDeg": 0.1
                      },
                      "source": {
                        "name": "ERA5-Land",
                        "provider": "Copernicus Climate Change Service (C3S) / ECMWF",
                        "license": "CC BY 4.0",
                        "attribution": "Contains modified Copernicus Climate Change Service information; Muñoz Sabater, J. (2019): ERA5-Land monthly averaged data from 1950 to present, and ERA5-Land post-processed daily statistics, C3S Climate Data Store (CDS)",
                        "url": "https://cds.climate.copernicus.eu/datasets/reanalysis-era5-land-monthly-means",
                        "resolution": "0.1° (~9 km)"
                      }
                    },
                    "nitrateZones": {
                      "status": "ok",
                      "intersects": false,
                      "inside": false,
                      "wholeTerritory": false,
                      "maxOverlapPct": null,
                      "zones": [],
                      "method": "parcel",
                      "source": {
                        "name": "Zonas vulnerables a la contaminación por nitratos",
                        "provider": "Ministerio para la Transición Ecológica y el Reto Demográfico (MITECO)",
                        "license": "Uso libre y gratuito citando la fuente",
                        "attribution": "Fuente: © Ministerio para la Transición Ecológica y el Reto Demográfico",
                        "url": "https://www.miteco.gob.es/es/cartografia-y-sig/ide/descargas/agua/zonas-vulnerables.html",
                        "edition": "diciembre 2024"
                      }
                    },
                    "calculatedAt": "2026-10-20T08:16:43Z",
                    "provenance": "3"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/ground-motion": {
      "get": {
        "tags": [
          "Hazards"
        ],
        "summary": "Ground motion (subsidence) from satellite",
        "description": "Vertical and east-west ground motion of the parcel from the European Ground Motion Service (EGMS). `status` is `no_data` when the area has no measurements. Costs 1 unit.",
        "operationId": "getParcelGroundMotion",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "30024A16000286"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country: ES, PV, NA, FR, IT, DE, AT, PT, PL, NL, CH, BE, CZ, DK, FI, EE, SI, LT, LU, SK, BG, LI, IS, CY, GR, LV, IE, SE. Detected from the reference when omitted; required for GR, LV and IE. Coverage table in the description of this API and at https://parcelgps.com/developers.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "description": "Latitude of the parcel, when the reference alone cannot locate it",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "lng",
            "in": "query",
            "required": false,
            "description": "Longitude of the parcel",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroundMotionResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "30024A16000286",
                    "country": "ES",
                    "status": "ok",
                    "period": {
                      "from": "2020-01",
                      "to": "2024-12",
                      "label": "2020-2024"
                    },
                    "groundMotion": {
                      "class": "severe_subsidence",
                      "worstClass": "severe_subsidence",
                      "vertical": {
                        "meanMmYear": -40.9,
                        "maxSubsidenceMmYear": -40.9,
                        "maxUpliftMmYear": 0,
                        "stdMmYear": 0.1,
                        "accelerationMmYear2": -0.7,
                        "rmseMm": 2.3
                      },
                      "eastWest": {
                        "meanMmYear": -5.1,
                        "stdMmYear": 0.1
                      },
                      "yearlyDisplacement": [
                        {
                          "year": 2020,
                          "mm": -17.9
                        },
                        {
                          "year": 2021,
                          "mm": -57.2
                        },
                        {
                          "year": 2022,
                          "mm": -95.8
                        }
                      ],
                      "cellsWithData": 1,
                      "cellsConsidered": 1,
                      "coveragePct": 100,
                      "basis": "parcel",
                      "cellSizeM": 100
                    },
                    "source": {
                      "name": "European Ground Motion Service (EGMS) L3 Ortho",
                      "provider": "Copernicus Land Monitoring Service / European Environment Agency (EEA)",
                      "license": "Copernicus data policy (Regulation (EU) No 1159/2013): free, commercial use allowed with attribution",
                      "attribution": "Contains modified Copernicus Land Monitoring Service information, European Ground Motion Service 2020-2024 (© European Union, Copernicus Land Monitoring Service, EEA)",
                      "url": "https://land.copernicus.eu/en/products/european-ground-motion-service",
                      "resolution": "100 m",
                      "edition": "2020-2024"
                    },
                    "calculatedAt": "2026-10-01T08:13:58Z",
                    "provenance": "2"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/solar": {
      "get": {
        "tags": [
          "Analysis"
        ],
        "summary": "Solar potential",
        "description": "Photovoltaic production, savings and payback from PVGIS (JRC) with an indicative investment case. Costs 1 unit; 0 when `available` is false.",
        "operationId": "getParcelSolar",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "9872023VH5797S"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ES, PV, NA, PT, FR, IT or DE. Detected from the reference when omitted. Other countries answer 422 CNV_COVERAGE.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolarPotentialResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "available": true,
                    "status": "ok",
                    "annualProductionKwh": 23749.9,
                    "installableKw": 17.86,
                    "annualSavingsEur": 1473.18,
                    "paybackYears": 12.13,
                    "co2AvoidedKg": 5533.73,
                    "irradiationKwhM2": 1807.08,
                    "solarGrade": 5,
                    "optimalOrientation": "south",
                    "tiltAngleDeg": 34,
                    "installationCostEur": 17865,
                    "source": "PVGIS (JRC)",
                    "economics": {
                      "selfConsumptionKwhYear": 5000,
                      "selfConsumptionSavingsEur": 750,
                      "surplusKwhYear": 18749.9,
                      "surplusPriceEurKwh": 0.05,
                      "surplusIncomeEur": 937.5,
                      "capexEur": 17865,
                      "annualMaintenanceEur": 214.32,
                      "netAnnualIncomeEur": 1473.18,
                      "paybackYears": 12.13,
                      "irrPct": 6.56,
                      "totalReturn25YearsEur": 18964.5,
                      "landLeaseAvailable": false,
                      "landLeaseEurPerHaYear": 0,
                      "landLeaseTotalEurYear": 0,
                      "note": "Indicative estimate. Electricity selling prices are at historic lows (surplus ~0.04-0.10 EUR/kWh, wholesale market ~44 EUR/MWh and close to 0 at midday), so the return depends mostly on self-consumption, which only uses the energy consumed on site. This is not an offer.",
                      "sources": [
                        "PVGIS (European Commission)",
                        "IDAE / OMIE market 2026",
                        "2026 cost and installation references"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_COVERAGE",
                  "message": "This analysis is not available yet for the country of this reference. The countries it covers are listed in details.supportedCountries.",
                  "details": {
                    "country": "CH",
                    "reference": "CH119192997709",
                    "feature": "solar",
                    "supported": false,
                    "supportedCountries": [
                      "ES",
                      "PV",
                      "NA"
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/agriculture": {
      "get": {
        "tags": [
          "Analysis"
        ],
        "summary": "Agricultural use",
        "description": "Land use and crop from the agricultural parcel registry (SIGPAC in Spain, RPG in France, LPIS/GSA in Austria, the Netherlands, Czechia and Poland, ...), vegetation index (NDVI), a crop price reference and nitrate vulnerable zones. Costs 1 unit; 0 when empty.",
        "operationId": "getParcelAgriculture",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "23058A00700036"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ES, PV, NA, PT, FR, IT or DE. Detected from the reference when omitted. Other countries answer 422 CNV_COVERAGE.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgricultureResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "landUse": "Asociación olivar - viñedo",
                    "mainCrop": "olivar",
                    "areaHa": 10.6045,
                    "irrigationCoefficient": 1,
                    "plot": {
                      "province": 23,
                      "municipality": 58,
                      "polygon": 7,
                      "parcel": 36,
                      "enclosure": 1,
                      "meanSlopePct": 12.3,
                      "altitudeM": 559
                    },
                    "parcel": {
                      "country": "ES",
                      "id": "23:58:0:0:7:36:1",
                      "parts": {
                        "enclosure": "1",
                        "municipality": "58",
                        "parcel": "36",
                        "polygon": "7",
                        "province": "23"
                      },
                      "source": "SIGPAC"
                    },
                    "ndvi": {
                      "mean": 0.25,
                      "cropHealth": "low",
                      "updatedAt": "2026-09-20T00:00:00Z",
                      "method": "official"
                    },
                    "cropPrice": {
                      "pricePerKgEur": 8.5,
                      "method": "reference_table",
                      "isEstimate": true,
                      "referenceDate": "2025"
                    },
                    "nitrateVulnerableZone": {
                      "status": "ok",
                      "intersects": false,
                      "inside": false,
                      "wholeTerritory": false,
                      "maxOverlapPct": null,
                      "zones": [],
                      "method": "parcel",
                      "source": {
                        "name": "Zonas vulnerables a la contaminación por nitratos",
                        "provider": "Ministerio para la Transición Ecológica y el Reto Demográfico (MITECO)",
                        "license": "Uso libre y gratuito citando la fuente",
                        "attribution": "Fuente: © Ministerio para la Transición Ecológica y el Reto Demográfico",
                        "url": "https://www.miteco.gob.es/es/cartografia-y-sig/ide/descargas/agua/zonas-vulnerables.html",
                        "edition": "diciembre 2024"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_COVERAGE",
                  "message": "This analysis is not available yet for the country of this reference. The countries it covers are listed in details.supportedCountries.",
                  "details": {
                    "country": "CH",
                    "reference": "CH119192997709",
                    "feature": "solar",
                    "supported": false,
                    "supportedCountries": [
                      "ES",
                      "PV",
                      "NA"
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/market": {
      "get": {
        "tags": [
          "Analysis"
        ],
        "summary": "Rural land prices (paid plans)",
        "description": "**Paid API plans only (Developer, Startup, Growth, Enterprise).** Free-plan keys receive 403 `KEY_PLAN_001` and are not charged.\n\n**Rural land only.** This endpoint prices agricultural land: rustic parcels, including those with small agricultural buildings (sheds, farm stores, ponds, pens, greenhouses) that together take up at most 10% of the plot and 1,000 m². Parcels with housing, industrial or commercial buildings, or any other non-agricultural use, are not supported and answer 422 `MKT_001` with no charge. A rural parcel for which we have no price also answers 422 `MKT_001` with no charge; `details.reason` says which case it is (`not_rural_land`, `no_rural_price` or `country_not_covered`).\n\nRural land prices are available in Spain (including the Basque Country and Navarre). `cropPrices` gives the price per hectare by crop for each crop group of the parcel in its rural market area, with the number of recorded sales behind it; when the area has no figure for a crop, the province median (`level: province_median`). `zonePrices.rural` gives the average farmland price per hectare of the parcel's province. The figures are the price of the land by crop: buildings on the parcel are not valued (`priceNote`). The figures in the example are illustrative. Costs 1 unit only when a price is returned.",
        "operationId": "getParcelMarket",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of a rustic parcel",
            "schema": {
              "type": "string"
            },
            "example": "46063A00100121"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ES, PV or NA. Detected from the reference when omitted. Any other country answers 422 MKT_001 with no charge.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketReferenceResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "available": true,
                    "status": "available",
                    "estimatedPriceEur": 0,
                    "pricePerM2Eur": 0,
                    "salesCount": 0,
                    "granularity": "parcel",
                    "zonePrices": {
                      "zone": "VALENCIA",
                      "zoneLevel": "province",
                      "municipality": "ALZIRA",
                      "rural": {
                        "pricePerM2Eur": 2.1,
                        "pricePerHaEur": 21000,
                        "statistic": "Official farmland price",
                        "authority": "Official statistics",
                        "period": "2024"
                      }
                    },
                    "cropPrices": [
                      {
                        "cropGroup": "CIT",
                        "cropGroupName": "Citrus, irrigated",
                        "landUseCodes": [
                          "NR"
                        ],
                        "basis": "cadastral_subparcels",
                        "areaHa": 1.2,
                        "pricePerHaEur": 48000,
                        "salesCount": 37,
                        "level": "agricultural_zone",
                        "zone": "46-03",
                        "period": "2026",
                        "authority": "Official statistics",
                        "statistic": "Official price per hectare by crop"
                      },
                      {
                        "cropGroup": "OLS",
                        "cropGroupName": "Olive grove, dry",
                        "landUseCodes": [
                          "OL"
                        ],
                        "basis": "cadastral_subparcels",
                        "areaHa": 0.4,
                        "pricePerHaEur": 14000,
                        "level": "province_median",
                        "period": "2026",
                        "authority": "Official statistics",
                        "statistic": "Official price per hectare by crop"
                      }
                    ],
                    "priceNote": "Price of the land per hectare by crop; buildings on the parcel are not valued."
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "403": {
            "description": "The API key's plan does not include price data (KEY_PLAN_001). Free-plan keys get this answer and are not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_PLAN_001",
                  "message": "This endpoint returns price data and requires a paid API plan. Upgrade your plan to access it."
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "The parcel's price cannot be estimated (MKT_001): it is not rural land (housing, industrial, commercial or any other non-agricultural building or use, or agricultural buildings over 10% of the plot or 1,000 m²), it is rural land with no price, or its country has no rural land prices. Not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "MKT_001",
                  "message": "A price cannot be estimated for this parcel. Price data only covers rural land (agricultural parcels; small agricultural buildings such as sheds, ponds or greenhouses are allowed); housing, industrial or any other non-agricultural property is not supported. No unit was charged.",
                  "details": {
                    "country": "ES",
                    "reference": "9872023VH5797S0001WX",
                    "feature": "market",
                    "reason": "not_rural_land"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "500": {
            "description": "Internal error (INTERNAL_ERROR, API_001).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "INTERNAL_ERROR",
                  "message": "Internal server error."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/score": {
      "get": {
        "tags": [
          "Analysis"
        ],
        "summary": "Investment score",
        "description": "A 0-100 score with a rating built from the factors available for the parcel (solar, agriculture, market). Costs 1 unit; 0 when `rating` is `no_data`.",
        "operationId": "getParcelScore",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "9872023VH5797S"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ES, PV, NA, PT, FR, IT or DE. Detected from the reference when omitted. Other countries answer 422 CNV_COVERAGE.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvestmentScoreResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "score": 72.2,
                    "rating": "good",
                    "recommendation": "Good investment potential. Several indicators are favourable.",
                    "components": {
                      "solar": 10,
                      "agriculture": 5,
                      "market": 0,
                      "accessibility": 0,
                      "risk": 0
                    },
                    "availableComponents": {
                      "solar": true,
                      "agriculture": true,
                      "market": false,
                      "accessibility": false,
                      "risk": false
                    },
                    "riskFactors": [
                      "No real-estate market data"
                    ],
                    "opportunityFactors": [
                      "Excellent solar irradiation"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_COVERAGE",
                  "message": "This analysis is not available yet for the country of this reference. The countries it covers are listed in details.supportedCountries.",
                  "details": {
                    "country": "CH",
                    "reference": "CH119192997709",
                    "feature": "solar",
                    "supported": false,
                    "supportedCountries": [
                      "ES",
                      "PV",
                      "NA"
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/value-history": {
      "get": {
        "tags": [
          "Analysis"
        ],
        "summary": "Recorded history of the parcel",
        "description": "**Paid API plans only (Developer, Startup, Growth, Enterprise).** Free-plan keys receive 403 `KEY_PLAN_001` and are not charged. Snapshots of the parcel recorded over time (area, use, cadastral value when known). Costs 1 unit.",
        "operationId": "getParcelValueHistory",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "9872023VH5797S"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country: ES, PV, NA, FR, IT, DE, AT, PT, PL, NL, CH, BE, CZ, DK, FI, EE, SI, LT, LU, SK, BG, LI, IS, CY, GR, LV, IE, SE. Detected from the reference when omitted; required for GR, LV and IE. Coverage table in the description of this API and at https://parcelgps.com/developers.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValueHistoryResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "9872023VH5797S",
                    "country": "ES",
                    "entries": [
                      {
                        "id": "8e82345c-2d7a-4963-8d5f-b4ec845091f4",
                        "reference": "9872023VH5797S",
                        "country": "ES",
                        "cadastralValueEur": 0,
                        "area": 397,
                        "use": "Residencial",
                        "capturedOn": "2026-09-29",
                        "source": "catastro_api",
                        "createdAt": "2026-09-29T18:36:08.508744+00:00"
                      }
                    ],
                    "totalEntries": 1,
                    "areaChangePct": null
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "500": {
            "description": "The history could not be read (VH_001).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VH_001",
                  "message": "The value history could not be read."
                }
              }
            }
          },
          "503": {
            "description": "The history service is unavailable (VH_002).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VH_002",
                  "message": "The value history service is temporarily unavailable."
                }
              }
            }
          },
          "403": {
            "description": "The API key's plan does not include price data (KEY_PLAN_001). Free-plan keys get this answer and are not charged.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_PLAN_001",
                  "message": "This endpoint returns price data and requires a paid API plan. Upgrade your plan to access it."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{reference}/neighbors": {
      "get": {
        "tags": [
          "Parcels"
        ],
        "summary": "Adjoining parcels",
        "description": "Parcels that touch or surround this one (up to 60), each with its reference and centre point. Spain is answered from the official cadastre and our own copy; other countries are answered from our own copy where we hold one. Where we cannot list neighbours the answer is 200 with `supported: false` and an empty list, and it is free. Costs 1 unit.",
        "operationId": "getParcelNeighbors",
        "parameters": [
          {
            "name": "reference",
            "in": "path",
            "required": true,
            "description": "Official cadastral reference of the parcel or unit",
            "schema": {
              "type": "string"
            },
            "example": "9872023VH5797S"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country: ES, PV, NA, FR, IT, DE, AT, PT, PL, NL, CH, BE, CZ, DK, FI, EE, SI, LT, LU, SK, BG, LI, IS, CY, GR, LV, IE, SE. Detected from the reference when omitted; required for GR, LV and IE. Coverage table in the description of this API and at https://parcelgps.com/developers.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NeighborsResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "country": "ES",
                    "supported": true,
                    "count": 3,
                    "neighbors": [
                      {
                        "reference": "9871005VH5797S",
                        "latitude": 38.64006766816304,
                        "longitude": -3.4631630104475426
                      },
                      {
                        "reference": "9871006VH5797S",
                        "latitude": 38.640078126778526,
                        "longitude": -3.4630479499563753
                      },
                      {
                        "reference": "9872022VH5797S",
                        "latitude": 38.64012999246921,
                        "longitude": -3.4631042361034168
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/parcels/compare": {
      "post": {
        "tags": [
          "Analysis"
        ],
        "summary": "Compare 2 or 3 parcels",
        "description": "Location, solar potential, agricultural use and score of 2 or 3 parcels (ES, PT, FR, IT, DE). A parcel that is not found comes back with `error` and the others are still compared. Costs 1 unit per parcel found.",
        "operationId": "compareParcels",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComparisonResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "parcels": [
                      {
                        "reference": "9872023VH5797S",
                        "country": "ES",
                        "parcel": {
                          "reference": "9872023VH5797S0001WX",
                          "country": "ES",
                          "address": "CL GLORIA 51 Pl:OD Pt:OS",
                          "postalCode": "13730",
                          "municipality": "SANTA CRUZ DE MUDELA",
                          "region": "Ciudad Real",
                          "latitude": 38.6401435,
                          "longitude": -3.4632835,
                          "googleMapsUrl": "https://www.google.com/maps?q=38.640144,-3.463284",
                          "use": "Residencial",
                          "landClass": "Urbano",
                          "builtArea": 308,
                          "parcelArea": 397,
                          "yearBuilt": 1980,
                          "ownershipShare": 100,
                          "floor": "OD",
                          "door": "OS",
                          "polygon": [
                            [
                              38.64033960550103,
                              -3.463190495967865
                            ],
                            [
                              38.64014267310775,
                              -3.4631650149822235
                            ],
                            [
                              38.640120675306825,
                              -3.463370203971863
                            ]
                          ],
                          "availableFields": {
                            "use": true,
                            "landClass": true,
                            "yearBuilt": true,
                            "builtArea": true,
                            "ownershipShare": true,
                            "dwellings": true,
                            "floors": false,
                            "address": true,
                            "addressSearch": true
                          }
                        },
                        "solar": {
                          "available": true,
                          "status": "ok",
                          "annualProductionKwh": 23749.9,
                          "installableKw": 17.86,
                          "annualSavingsEur": 1473.18,
                          "paybackYears": 12.13,
                          "co2AvoidedKg": 5533.73,
                          "irradiationKwhM2": 1807.08,
                          "solarGrade": 5,
                          "optimalOrientation": "south",
                          "tiltAngleDeg": 34,
                          "installationCostEur": 17865,
                          "source": "PVGIS (JRC)",
                          "economics": {
                            "selfConsumptionKwhYear": 5000,
                            "selfConsumptionSavingsEur": 750,
                            "surplusKwhYear": 18749.9,
                            "surplusPriceEurKwh": 0.05,
                            "surplusIncomeEur": 937.5,
                            "capexEur": 17865,
                            "annualMaintenanceEur": 214.32,
                            "netAnnualIncomeEur": 1473.18,
                            "paybackYears": 12.13,
                            "irrPct": 6.56,
                            "totalReturn25YearsEur": 18964.5,
                            "landLeaseAvailable": false,
                            "landLeaseEurPerHaYear": 0,
                            "landLeaseTotalEurYear": 0,
                            "note": "Indicative estimate. Electricity selling prices are at historic lows (surplus ~0.04-0.10 EUR/kWh, wholesale market ~44 EUR/MWh and close to 0 at midday), so the return depends mostly on self-consumption, which only uses the energy consumed on site. This is not an offer.",
                            "sources": [
                              "PVGIS (European Commission)",
                              "IDAE / OMIE market 2026",
                              "2026 cost and installation references"
                            ]
                          }
                        },
                        "agriculture": {
                          "available": true,
                          "status": "ok",
                          "isAgricultural": false,
                          "landUse": "Zona urbana",
                          "cropGroup": "urbano",
                          "areaHa": 142.5377
                        },
                        "score": {
                          "available": true,
                          "score": 72.2,
                          "rating": "good"
                        }
                      },
                      {
                        "reference": "0447502VK4704G",
                        "country": "ES",
                        "parcel": {
                          "reference": "0447502VK4704G",
                          "country": "ES",
                          "address": "CL TRES CRUCES 7",
                          "postalCode": "28013",
                          "municipality": "MADRID",
                          "region": "Madrid",
                          "latitude": 40.4196984,
                          "longitude": -3.7028067,
                          "googleMapsUrl": "https://www.google.com/maps?q=40.419698,-3.702807",
                          "use": "Residencial",
                          "landClass": "Urbano",
                          "builtArea": 3020,
                          "parcelArea": 370,
                          "yearBuilt": 1928,
                          "polygon": [
                            [
                              40.419746919387734,
                              -3.702990710735321
                            ],
                            [
                              40.41970710026562,
                              -3.702711760997772
                            ],
                            [
                              40.41953557147021,
                              -3.7028364837169647
                            ]
                          ]
                        },
                        "solar": {
                          "available": true,
                          "status": "ok",
                          "annualProductionKwh": 21955.86,
                          "installableKw": 16.65,
                          "annualSavingsEur": 1397.99,
                          "paybackYears": 11.91,
                          "co2AvoidedKg": 5115.72,
                          "irradiationKwhM2": 1784.7,
                          "solarGrade": 5,
                          "optimalOrientation": "south",
                          "tiltAngleDeg": 35,
                          "installationCostEur": 16650,
                          "source": "PVGIS (JRC)",
                          "economics": {
                            "selfConsumptionKwhYear": 5000,
                            "selfConsumptionSavingsEur": 750,
                            "surplusKwhYear": 16955.86,
                            "surplusPriceEurKwh": 0.05,
                            "surplusIncomeEur": 847.79,
                            "capexEur": 16650,
                            "annualMaintenanceEur": 199.8,
                            "netAnnualIncomeEur": 1397.99,
                            "paybackYears": 11.91,
                            "irrPct": 6.76,
                            "totalReturn25YearsEur": 18299.75,
                            "landLeaseAvailable": false,
                            "landLeaseEurPerHaYear": 0,
                            "landLeaseTotalEurYear": 0,
                            "note": "Indicative estimate. Electricity selling prices are at historic lows (surplus ~0.04-0.10 EUR/kWh, wholesale market ~44 EUR/MWh and close to 0 at midday), so the return depends mostly on self-consumption, which only uses the energy consumed on site. This is not an offer.",
                            "sources": [
                              "PVGIS (European Commission)",
                              "IDAE / OMIE market 2026",
                              "2026 cost and installation references"
                            ]
                          }
                        },
                        "agriculture": {
                          "available": true,
                          "status": "ok",
                          "isAgricultural": false,
                          "landUse": "Zona urbana",
                          "cropGroup": "urbano",
                          "areaHa": 4189.1257
                        },
                        "score": {
                          "available": true,
                          "score": 72.2,
                          "rating": "good"
                        }
                      }
                    ],
                    "total": 2
                  }
                }
              }
            }
          },
          "400": {
            "description": "Between 2 and 3 parcels are needed (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "Compare needs between 2 and 3 parcels."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "parcels": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 3,
                    "items": {
                      "type": "object",
                      "properties": {
                        "reference": {
                          "type": "string"
                        },
                        "country": {
                          "type": "string",
                          "description": "Defaults to ES"
                        }
                      },
                      "required": [
                        "reference"
                      ]
                    }
                  }
                },
                "required": [
                  "parcels"
                ]
              },
              "example": {
                "parcels": [
                  {
                    "reference": "9872023VH5797S",
                    "country": "ES"
                  },
                  {
                    "reference": "0447502VK4704G",
                    "country": "ES"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "/search/coordinates": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Parcel at coordinates",
        "description": "The parcel at a point. Covers every country with coordinate coverage (see the coverage table). Costs 1 unit.",
        "operationId": "searchByCoordinates",
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": 40.4196
          },
          {
            "name": "lng",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            },
            "example": -3.7029
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country; detected from the point when omitted",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParcelResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "0447502VK4704G",
                    "parcelReference": "0447502VK4704G",
                    "country": "ES",
                    "address": "CL TRES CRUCES 7",
                    "postalCode": "28013",
                    "municipality": "MADRID",
                    "latitude": 40.4196984,
                    "longitude": -3.7028067,
                    "googleMapsUrl": "https://www.google.com/maps?q=40.419698,-3.702807",
                    "propertyType": "Urbano"
                  },
                  "remainingSearches": -1
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_COVERAGE",
                  "message": "This analysis is not available yet for the country of this reference. The countries it covers are listed in details.supportedCountries.",
                  "details": {
                    "country": "CH",
                    "reference": "CH119192997709",
                    "feature": "solar",
                    "supported": false,
                    "supportedCountries": [
                      "ES",
                      "PV",
                      "NA"
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Parcel at coordinates (JSON body)",
        "description": "The parcel at a point. Covers every country with coordinate coverage (see the coverage table). Costs 1 unit.",
        "operationId": "searchByCoordinatesPost",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParcelResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "75104000AE0003",
                    "parcelReference": "75104000AE0003",
                    "country": "FR",
                    "municipality": "Paris",
                    "region": "75",
                    "latitude": 48.85634709966722,
                    "longitude": 2.3524149294736665,
                    "googleMapsUrl": "https://www.google.com/maps?q=48.856347,2.352415",
                    "use": "Tertiaire",
                    "builtArea": 10274,
                    "parcelArea": 15168,
                    "yearBuilt": 1981,
                    "dwellings": 2,
                    "floors": 5,
                    "source": "BDNB - CSTB",
                    "polygon": [
                      [
                        48.85653289,
                        2.35324221
                      ],
                      [
                        48.85653181,
                        2.35324304
                      ],
                      [
                        48.856531,
                        2.35324319
                      ]
                    ],
                    "availableFields": {
                      "use": true,
                      "landClass": false,
                      "yearBuilt": true,
                      "builtArea": true,
                      "ownershipShare": false,
                      "dwellings": true,
                      "floors": true,
                      "address": false,
                      "addressSearch": true
                    }
                  },
                  "remainingSearches": -1
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_COVERAGE",
                  "message": "This analysis is not available yet for the country of this reference. The countries it covers are listed in details.supportedCountries.",
                  "details": {
                    "country": "CH",
                    "reference": "CH119192997709",
                    "feature": "solar",
                    "supported": false,
                    "supportedCountries": [
                      "ES",
                      "PV",
                      "NA"
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "latitude": {
                    "type": "number"
                  },
                  "longitude": {
                    "type": "number"
                  },
                  "country": {
                    "type": "string"
                  }
                },
                "required": [
                  "latitude",
                  "longitude"
                ]
              },
              "example": {
                "latitude": 48.8566,
                "longitude": 2.3522,
                "country": "FR"
              }
            }
          }
        }
      }
    },
    "/search/address": {
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Spanish address by parts",
        "description": "Spain only: the parcel at a structured address (province, municipality, street type, street name, number). Costs 1 unit.",
        "operationId": "searchAddress",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressMatchResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "0847106VK4704F",
                    "parcelReference": "0847106VK4704F",
                    "address": "CL GRAN VIA, 1, Madrid",
                    "region": "MADRID",
                    "municipality": "Madrid",
                    "streetType": "CL",
                    "streetName": "GRAN VIA",
                    "number": 1
                  },
                  "remainingSearches": -1
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "region": {
                    "type": "string",
                    "description": "Province"
                  },
                  "municipality": {
                    "type": "string"
                  },
                  "streetType": {
                    "type": "string",
                    "description": "Street type code, e.g. CL"
                  },
                  "streetName": {
                    "type": "string"
                  },
                  "number": {
                    "type": "integer"
                  }
                },
                "required": [
                  "region",
                  "municipality",
                  "streetName",
                  "number"
                ]
              },
              "example": {
                "region": "MADRID",
                "municipality": "MADRID",
                "streetType": "CL",
                "streetName": "GRAN VIA",
                "number": 1
              }
            }
          }
        }
      }
    },
    "/search/address/parse": {
      "post": {
        "tags": [
          "Search"
        ],
        "summary": "Spanish address as free text",
        "description": "Spain only: parses a free-text address (\"Street, Number, Municipality\") and returns its parcel. For any country prefer `/search/address/candidates`. Costs 1 unit.",
        "operationId": "parseAddress",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressMatchResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "reference": "0847106VK4704F",
                    "parcelReference": "0847106VK4704F",
                    "address": "CL GRAN VIA, 1, Madrid",
                    "region": "MADRID",
                    "municipality": "Madrid",
                    "streetType": "CL",
                    "streetName": "GRAN VIA",
                    "number": 1
                  },
                  "remainingSearches": -1
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "The address could not be parsed or has no parcel (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "string"
                  }
                },
                "required": [
                  "address"
                ]
              },
              "example": {
                "address": "Gran Via 1, Madrid"
              }
            }
          }
        }
      }
    },
    "/search/address/candidates": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Address candidates across Europe",
        "description": "Ranked parcel candidates for an address, with a confidence between 0 and 1. Costs 1 unit when it returns candidates; none found is a free 404.",
        "operationId": "searchAddressCandidates",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Full address as free text",
            "schema": {
              "type": "string"
            },
            "example": "Calle Gloria 51, Santa Cruz de Mudela"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country; Spain when omitted",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          {
            "name": "street",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "number",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "municipality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "postcode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddressCandidatesResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "query": {
                      "text": "Calle Gloria 51, Santa Cruz de Mudela",
                      "street": "Calle Gloria",
                      "number": 51,
                      "municipality": "Santa Cruz de Mudela"
                    },
                    "candidates": [
                      {
                        "reference": "9872023VH5797S",
                        "country": "ES",
                        "address": "CALLE GLORIA 51",
                        "number": 51,
                        "postalCode": "13730",
                        "municipality": "Santa Cruz de Mudela",
                        "region": "Ciudad Real",
                        "latitude": 38.64011327851474,
                        "longitude": -3.4632741861643743,
                        "confidence": 1,
                        "numberMatches": true,
                        "municipalityMatches": true,
                        "inOwnCopy": true,
                        "cadastreAddress": "CL GLORIA 51",
                        "use": "Residencial",
                        "dwellings": 1,
                        "yearBuilt": 1980
                      },
                      {
                        "reference": "9871005VH5797S",
                        "country": "ES",
                        "address": "CALLE GLORIA 50",
                        "number": 50,
                        "postalCode": "13730",
                        "municipality": "Santa Cruz de Mudela",
                        "region": "Ciudad Real",
                        "latitude": 38.64006766816304,
                        "longitude": -3.4631630104475426,
                        "confidence": 0.55,
                        "numberMatches": false,
                        "municipalityMatches": true,
                        "inOwnCopy": true,
                        "cadastreAddress": "CL GLORIA 50",
                        "use": "Residencial",
                        "dwellings": 1,
                        "yearBuilt": 1947
                      },
                      {
                        "reference": "9871006VH5797S",
                        "country": "ES",
                        "address": "CALLE GLORIA 52",
                        "number": 52,
                        "postalCode": "13730",
                        "municipality": "Santa Cruz de Mudela",
                        "region": "Ciudad Real",
                        "latitude": 38.640078126778526,
                        "longitude": -3.4630479499563753,
                        "confidence": 0.55,
                        "numberMatches": false,
                        "municipalityMatches": true,
                        "inOwnCopy": true,
                        "cadastreAddress": "CL GLORIA 52",
                        "use": "Residencial",
                        "dwellings": 1,
                        "yearBuilt": 1941
                      }
                    ],
                    "attribution": "CartoCiudad (Instituto Geográfico Nacional) y Dirección General del Catastro"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "422": {
            "description": "Country not covered (CNV_COVERAGE) or a place name instead of a reference (CNV_PLACE_NAME).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "CNV_COVERAGE",
                  "message": "This analysis is not available yet for the country of this reference. The countries it covers are listed in details.supportedCountries.",
                  "details": {
                    "country": "CH",
                    "reference": "CH119192997709",
                    "feature": "solar",
                    "supported": false,
                    "supportedCountries": [
                      "ES",
                      "PV",
                      "NA"
                    ]
                  }
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/locations/provinces": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Spanish provinces",
        "description": "Provinces of the Spanish cadastre, with the names that `/locations/municipalities`, `/locations/streets` and `POST /search/address` expect as `region`. Spain only (common territory; the Basque Country and Navarra have their own cadastres and are not listed). Costs 1 unit.",
        "operationId": "listProvinces",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvincesResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "total": 3,
                    "provinces": [
                      {
                        "code": "2",
                        "name": "ALBACETE"
                      },
                      {
                        "code": "3",
                        "name": "ALICANTE"
                      },
                      {
                        "code": "13",
                        "name": "CIUDAD REAL"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The Spanish cadastre is temporarily unavailable (SERVICE_UNAVAILABLE). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/locations/municipalities": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Municipalities of a Spanish province",
        "description": "Municipalities of one province, with the cadastre code and the INE code. Spain only (common territory; the Basque Country and Navarra have their own cadastres and are not listed). Costs 1 unit.",
        "operationId": "listMunicipalities",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": true,
            "description": "Province name as returned by /locations/provinces",
            "schema": {
              "type": "string"
            },
            "example": "CIUDAD REAL"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MunicipalitiesResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "total": 3,
                    "municipalities": [
                      {
                        "code": "1",
                        "ineCode": "001",
                        "name": "ABENOJAR"
                      },
                      {
                        "code": "2",
                        "ineCode": "002",
                        "name": "AGUDO"
                      },
                      {
                        "code": "77",
                        "ineCode": "077",
                        "name": "SANTA CRUZ DE MUDELA"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "The 'region' parameter is required."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The Spanish cadastre is temporarily unavailable (SERVICE_UNAVAILABLE). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/locations/streets": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Streets of a Spanish municipality",
        "description": "Streets of one municipality, optionally filtered by part of the name. `type` and `name` are what `POST /search/address` expects as `streetType` and `streetName`. Spain only (common territory; the Basque Country and Navarra have their own cadastres and are not listed). Costs 1 unit.",
        "operationId": "listStreets",
        "parameters": [
          {
            "name": "region",
            "in": "query",
            "required": true,
            "description": "Province name as returned by /locations/provinces",
            "schema": {
              "type": "string"
            },
            "example": "CIUDAD REAL"
          },
          {
            "name": "municipality",
            "in": "query",
            "required": true,
            "description": "Municipality name as returned by /locations/municipalities",
            "schema": {
              "type": "string"
            },
            "example": "SANTA CRUZ DE MUDELA"
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Part of the street name to filter by",
            "schema": {
              "type": "string"
            },
            "example": "GLORIA"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreetsResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "total": 1,
                    "streets": [
                      {
                        "code": "33",
                        "type": "CL",
                        "name": "GLORIA",
                        "fullName": "CL GLORIA"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "The 'region' and 'municipality' parameters are required."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The Spanish cadastre is temporarily unavailable (SERVICE_UNAVAILABLE). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/reference/crops": {
      "get": {
        "tags": [
          "Parcels"
        ],
        "summary": "Crop code catalogue",
        "description": "Every crop/land-use code that can appear in `cropCode` (Catastro codes for Spanish common territory, the foral codes of Álava, Bizkaia, Gipuzkoa and Navarre, and the European catalogues: AT, BE, CH, CZ, DE, EE, FI, FR, GR, IE, NL, PT, SE, SI) with its name in the 10 supported languages and, for European codes, a common `useClass`, so you can translate on your side. Free, no API key, no units; cacheable for a day.",
        "operationId": "getCropCatalog",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of crop names: es, ca, en, pt, fr, it, de, pl, nl or cs. Falls back to the Accept-Language header, then English.",
            "schema": {
              "type": "string",
              "enum": [
                "es",
                "ca",
                "en",
                "pt",
                "fr",
                "it",
                "de",
                "pl",
                "nl",
                "cs"
              ]
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CropCatalogResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "locale": "en",
                    "locales": [
                      "es",
                      "ca",
                      "en",
                      "pt",
                      "fr",
                      "it",
                      "de",
                      "pl",
                      "nl",
                      "cs"
                    ],
                    "sources": [
                      "ES",
                      "AL",
                      "BI",
                      "GI",
                      "NA",
                      "AT",
                      "BE",
                      "CH",
                      "CZ",
                      "DE",
                      "EE",
                      "FI",
                      "FR",
                      "GR",
                      "IE",
                      "NL",
                      "PT",
                      "SE",
                      "SI"
                    ],
                    "count": 256,
                    "crops": [
                      {
                        "code": "G-",
                        "source": "ES",
                        "name": "Rainfed carob",
                        "original": "Algarrobo secano",
                        "labels": {
                          "es": "Algarrobo de secano",
                          "ca": "Garrofer de secà",
                          "en": "Rainfed carob",
                          "pt": "Alfarrobeiral de sequeiro",
                          "fr": "Caroubier en sec",
                          "it": "Carrubeto asciutto",
                          "de": "Johannisbrot (Trockenbau)",
                          "pl": "Szarańczyn nienawadniany",
                          "nl": "Johannesbrood (droog)",
                          "cs": "Rohovník bez závlahy"
                        }
                      },
                      {
                        "code": "NR",
                        "source": "ES",
                        "name": "Irrigated citrus",
                        "original": "Agrios regadío",
                        "labels": {
                          "es": "Cítricos de regadío",
                          "ca": "Cítrics de regadiu",
                          "en": "Irrigated citrus",
                          "pt": "Citrinos de regadio",
                          "fr": "Agrumes irrigués",
                          "it": "Agrumeto irriguo",
                          "de": "Zitrus (bewässert)",
                          "pl": "Cytrusy nawadniane",
                          "nl": "Citrus (geïrrigeerd)",
                          "cs": "Citrusy se závlahou"
                        }
                      },
                      {
                        "code": "NA:1501",
                        "source": "NA",
                        "name": "Rainfed arable land",
                        "original": "T. labor secano",
                        "labels": {
                          "es": "Tierra de labor de secano",
                          "ca": "Terra de conreu de secà",
                          "en": "Rainfed arable land",
                          "pt": "Terra arável de sequeiro",
                          "fr": "Terre arable en sec",
                          "it": "Seminativo asciutto",
                          "de": "Ackerland (Trockenbau)",
                          "pl": "Grunty orne nienawadniane",
                          "nl": "Akkerland (droog)",
                          "cs": "Orná půda bez závlahy"
                        }
                      },
                      {
                        "code": "AT:53",
                        "source": "AT",
                        "name": "Vineyards",
                        "original": "Weingärten",
                        "useClass": "vineyard",
                        "labels": {
                          "es": "Viñedos",
                          "ca": "Vinyes",
                          "en": "Vineyards",
                          "pt": "Vinhas",
                          "fr": "Vignes",
                          "it": "Vigneti",
                          "de": "Weingärten",
                          "pl": "Winnice",
                          "nl": "Wijngaarden",
                          "cs": "Vinice"
                        }
                      }
                    ],
                    "useClasses": [
                      {
                        "code": "vineyard",
                        "name": "Vineyard",
                        "labels": {
                          "es": "Viñedo",
                          "ca": "Vinya",
                          "en": "Vineyard",
                          "pt": "Vinha",
                          "fr": "Vigne",
                          "it": "Vigneto",
                          "de": "Weingarten",
                          "pl": "Winnica",
                          "nl": "Wijngaard",
                          "cs": "Vinice"
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/resolve": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Classify any text",
        "description": "Tells whether a text is a cadastral reference (and of which country), coordinates or a place name. No API key needed and free.",
        "operationId": "resolve",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "9872023VH5797S0001WX"
          },
          {
            "name": "hint",
            "in": "query",
            "required": false,
            "description": "Country to prefer when the text is ambiguous",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolutionResponse"
                },
                "example": {
                  "success": true,
                  "data": {
                    "input": "9872023VH5797S0001WX",
                    "ambiguous": false,
                    "candidates": [
                      {
                        "country": "ES",
                        "kind": "reference",
                        "normalized": "9872023VH5797S0001WX",
                        "confidence": 1,
                        "supported": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "The text is missing (RSV_001).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "RSV_001",
                  "message": "The text to resolve is missing: pass it as ?q=."
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/export/kml": {
      "get": {
        "tags": [
          "Export"
        ],
        "summary": "Parcel as KML file",
        "description": "Downloads the parcel as a KML file. Costs 1 unit.",
        "operationId": "exportKML",
        "parameters": [
          {
            "name": "reference",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "9872023VH5797S"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country: ES, PV, NA, FR, IT, DE, AT, PT, PL, NL, CH, BE, CZ, DK, FI, EE, SI, LT, LU, SK, BG, LI, IS, CY, GR, LV, IE, SE. Detected from the reference when omitted; required for GR, LV and IE. Coverage table in the description of this API and at https://parcelgps.com/developers.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "KML file",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/vnd.google-earth.kml+xml": {
                "schema": {
                  "type": "string"
                },
                "example": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<kml xmlns=\"http://www.opengis.net/kml/2.2\"><Document><Placemark><name>9872023VH5797S</name></Placemark></Document></kml>"
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    },
    "/export/gpx": {
      "get": {
        "tags": [
          "Export"
        ],
        "summary": "Parcel as GPX file",
        "description": "Downloads the parcel as a GPX file. Costs 1 unit.",
        "operationId": "exportGPX",
        "parameters": [
          {
            "name": "reference",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "9872023VH5797S"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "ISO code of the country: ES, PV, NA, FR, IT, DE, AT, PT, PL, NL, CH, BE, CZ, DK, FI, EE, SI, LT, LU, SK, BG, LI, IS, CY, GR, LV, IE, SE. Detected from the reference when omitted; required for GR, LV and IE. Coverage table in the description of this API and at https://parcelgps.com/developers.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "GPX file",
            "headers": {
              "X-Quota-Limit": {
                "$ref": "#/components/headers/X-Quota-Limit"
              },
              "X-Quota-Remaining": {
                "$ref": "#/components/headers/X-Quota-Remaining"
              },
              "X-Quota-Reset": {
                "$ref": "#/components/headers/X-Quota-Reset"
              },
              "X-Quota-Tier": {
                "$ref": "#/components/headers/X-Quota-Tier"
              }
            },
            "content": {
              "application/gpx+xml": {
                "schema": {
                  "type": "string"
                },
                "example": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<gpx version=\"1.1\"><wpt lat=\"38.6401\" lon=\"-3.4633\"><name>9872023VH5797S</name></wpt></gpx>"
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "VALIDATION_ERROR",
                  "message": "A Spanish cadastral reference has at least 14 characters. For any other country add ?country=XX (coverage: https://parcelgps.com/developers)."
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key (UNAUTHORIZED, KEY_AUTH_001, KEY_AUTH_002, KEY_AUTH_003).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_002",
                  "message": "Invalid API key"
                }
              }
            }
          },
          "404": {
            "description": "Nothing found (NOT_FOUND).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "NOT_FOUND",
                  "message": "No parcel was found for this reference or location."
                }
              }
            }
          },
          "429": {
            "description": "Quota used up with no prepaid balance (KEY_AUTH_004) or too many requests per minute (KEY_RATE_002, RATE_LIMIT_EXCEEDED).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "KEY_AUTH_004",
                  "message": "Monthly quota used up (5000/5000). Upgrade at https://parcelgps.com/developers"
                }
              }
            }
          },
          "503": {
            "description": "The official source is temporarily unavailable (SERVICE_UNAVAILABLE, TRN_040, GMV_040). Retry after the Retry-After seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "success": false,
                  "code": "SERVICE_UNAVAILABLE",
                  "message": "The official cadastre service for this country is temporarily unavailable. Please retry in a few seconds."
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Create keys at https://www.parcelgps.com/app/developer"
      }
    },
    "headers": {
      "X-Quota-Limit": {
        "description": "Monthly units of your plan",
        "schema": {
          "type": "integer"
        }
      },
      "X-Quota-Remaining": {
        "description": "Monthly units left",
        "schema": {
          "type": "integer"
        }
      },
      "X-Quota-Reset": {
        "description": "When the quota resets (ISO 8601, UTC)",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      },
      "X-Quota-Tier": {
        "description": "Plan of the organisation",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "Point": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          }
        },
        "required": [
          "latitude",
          "longitude"
        ]
      },
      "AvailableFields": {
        "type": "object",
        "properties": {
          "use": {
            "type": "boolean"
          },
          "landClass": {
            "type": "boolean"
          },
          "yearBuilt": {
            "type": "boolean"
          },
          "builtArea": {
            "type": "boolean"
          },
          "ownershipShare": {
            "type": "boolean"
          },
          "dwellings": {
            "type": "boolean"
          },
          "floors": {
            "type": "boolean"
          },
          "address": {
            "type": "boolean"
          },
          "addressSearch": {
            "type": "boolean"
          }
        },
        "description": "Which optional fields this country can return; `true` means the field is filled when the source has it."
      },
      "Subparcel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Subparcel code, e.g. `a`"
          },
          "cropCode": {
            "type": "string",
            "description": "Stable crop/land-use code. Spanish common territory: the Catastro code (e.g. `G-`, `NR`). Foral territories: namespaced, e.g. `NA:1501`, `AL:8`, `GI:MM`, `BI:Q:pino-radiata`. Other countries: namespaced by country and catalogue, e.g. `AT:52`, `EE:haritav`, `GR:1112`, `DE:wald:nadelholz`, `CZ:dp:2`, `NL:BGT:begroeid:bouwland`, `FR:RPG:BTH`, `PT:IFAP:143`, `SE:50`, `CH:LNF:613`, `FI:1310`, `BE:311`, `IE:grass`, `SI:RABA:1100`. Look it up in GET /v1/reference/crops"
          },
          "crop": {
            "type": "string",
            "description": "Crop or land use in the requested language (`lang` / Accept-Language, English by default)"
          },
          "cropOriginal": {
            "type": "string",
            "description": "Crop or land use exactly as the source writes it, in its own language (e.g. `Agrios regadío`, `Gärten`)"
          },
          "intensity": {
            "type": "integer",
            "description": "Productive intensity (integer)"
          },
          "area": {
            "type": "integer",
            "description": "Area in m² (integer)"
          },
          "landType": {
            "type": "string",
            "description": "Land type, Spanish foral territories only (Navarre: irrigated, dry, forest-pasture...)"
          },
          "landClass": {
            "type": "string",
            "description": "Land class as the cadastre writes it (number or letter), Spanish foral territories only"
          },
          "kind": {
            "type": "string",
            "enum": [
              "cadastral",
              "declaredCrop",
              "landCover"
            ],
            "description": "What the row is: `cadastral` = an official part of the parcel recorded by the cadastre (Spain, Austria, Germany, Czechia, Estonia, Greece); `declaredCrop` = a farmer's declared crop field (EU agricultural payments register) intersected with the parcel; `landCover` = mapped land cover intersected with the parcel. For the last two, `area` is the overlap with the parcel"
          },
          "useClass": {
            "type": "string",
            "enum": [
              "arable",
              "farmland",
              "vegetables",
              "grassland",
              "vineyard",
              "olive",
              "orchard",
              "permanentCrop",
              "forest",
              "shrubland",
              "fallow",
              "garden",
              "leisure",
              "built",
              "transport",
              "water",
              "wetland",
              "bare",
              "other"
            ],
            "description": "Common land-use class across countries (see `useClasses` in GET /v1/reference/crops)"
          },
          "useClassName": {
            "type": "string",
            "description": "`useClass` in the requested language"
          },
          "source": {
            "type": "string",
            "description": "Who publishes the data, its licence and the date it was read or published, e.g. `BEV – Grundstücksverzeichnis (Nutzungen), CC BY 4.0, 2026-10-21`"
          },
          "geometry": {
            "type": "object",
            "properties": {},
            "additionalProperties": true,
            "description": "GeoJSON Polygon or MultiPolygon in WGS84 (EPSG:4326). Omitted when there is no geometry (always in Gipuzkoa)"
          }
        },
        "required": [
          "id",
          "area",
          "kind"
        ]
      },
      "PortugalRecord": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "officialCadastre": {
            "type": "boolean"
          },
          "nic": {
            "type": "string"
          },
          "rggProcess": {
            "type": "integer"
          },
          "articles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "section": {
            "type": "string"
          },
          "cadastreId": {
            "type": "string"
          },
          "dicofre": {
            "type": "string"
          },
          "parish": {
            "type": "string"
          },
          "municipality": {
            "type": "string"
          }
        },
        "required": [
          "source",
          "officialCadastre"
        ]
      },
      "Parcel": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "Official cadastral reference"
          },
          "parcelReference": {
            "type": "string",
            "description": "14-character parcel reference (coordinate and address searches)"
          },
          "country": {
            "type": "string",
            "description": "ISO code; PV and NA for the Basque Country and Navarre foral cadastres"
          },
          "address": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "municipality": {
            "type": "string"
          },
          "region": {
            "type": "string",
            "description": "Province, Land, canton or region, depending on the country"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "googleMapsUrl": {
            "type": "string",
            "format": "uri"
          },
          "propertyType": {
            "type": "string",
            "description": "Urban/rustic type (coordinate searches)"
          },
          "use": {
            "type": "string",
            "description": "Main use, in the source language"
          },
          "landClass": {
            "type": "string",
            "description": "Cadastral class (urban/rustic), in the source language"
          },
          "builtArea": {
            "type": "integer",
            "description": "Built area, m²"
          },
          "parcelArea": {
            "type": "integer",
            "description": "Parcel area, m²"
          },
          "yearBuilt": {
            "type": "integer"
          },
          "ownershipShare": {
            "type": "number",
            "description": "Ownership share of the unit, %"
          },
          "staircase": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "door": {
            "type": "string"
          },
          "dwellings": {
            "type": "integer"
          },
          "floors": {
            "type": "integer"
          },
          "source": {
            "type": "string",
            "description": "Name of the data provider when it is not the national cadastre"
          },
          "fromOwnCopy": {
            "type": "boolean",
            "description": "Served from the Parcel GPS copy of the cadastre"
          },
          "ruralPolygon": {
            "type": "string"
          },
          "ruralParcel": {
            "type": "string"
          },
          "placeName": {
            "type": "string"
          },
          "polygon": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "description": "Outline as [latitude, longitude] pairs"
          },
          "subparcelCount": {
            "type": "integer",
            "description": "Spain only (foral territories included): number of crop subparcels. Omitted when there are none. Full list with geometry: GET /v1/parcels/{reference}/subparcels"
          },
          "cropSummary": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CropShare"
            },
            "description": "Spain only: area and share of the parcel per crop, biggest first, no geometry. Omitted when there are no subparcels"
          },
          "portugal": {
            "$ref": "#/components/schemas/PortugalRecord"
          },
          "availableFields": {
            "$ref": "#/components/schemas/AvailableFields"
          }
        },
        "required": [
          "reference",
          "latitude",
          "longitude"
        ]
      },
      "Unit": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "staircase": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "door": {
            "type": "string"
          },
          "use": {
            "type": "string"
          },
          "area": {
            "type": "integer",
            "description": "m²"
          },
          "description": {
            "type": "string"
          },
          "ownershipShare": {
            "type": "number",
            "description": "%"
          },
          "yearBuilt": {
            "type": "integer"
          },
          "address": {
            "type": "string"
          }
        },
        "required": [
          "reference",
          "staircase",
          "floor",
          "door",
          "use",
          "area",
          "description"
        ]
      },
      "Construction": {
        "type": "object",
        "properties": {
          "staircase": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "door": {
            "type": "string"
          },
          "use": {
            "type": "string"
          },
          "area": {
            "type": "integer",
            "description": "m²"
          },
          "description": {
            "type": "string"
          }
        },
        "required": [
          "staircase",
          "floor",
          "door",
          "use",
          "area",
          "description"
        ]
      },
      "UnitsPage": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "municipality": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "mainUse": {
            "type": "string"
          },
          "totalArea": {
            "type": "integer",
            "description": "m²"
          },
          "yearBuilt": {
            "type": "integer"
          },
          "ownershipShare": {
            "type": "string"
          },
          "unitCount": {
            "type": "integer",
            "description": "Units in this page"
          },
          "propertyUnitCount": {
            "type": "integer",
            "description": "Units in the whole property"
          },
          "units": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Unit"
            }
          },
          "constructions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Construction"
            }
          },
          "truncated": {
            "type": "boolean",
            "description": "More units remain: repeat with cursor=nextCursor"
          },
          "nextCursor": {
            "type": "string"
          },
          "dataSource": {
            "type": "string"
          },
          "dataDate": {
            "type": "string",
            "format": "date"
          },
          "attribution": {
            "type": "string"
          }
        },
        "required": [
          "reference",
          "address",
          "postalCode",
          "municipality",
          "region",
          "mainUse",
          "totalArea",
          "yearBuilt",
          "unitCount",
          "propertyUnitCount",
          "units",
          "truncated",
          "dataSource",
          "dataDate",
          "attribution"
        ]
      },
      "OutlineFeature": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Feature"
            ]
          },
          "geometry": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "Polygon"
                ]
              },
              "coordinates": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  }
                },
                "description": "[longitude, latitude] rings"
              }
            },
            "required": [
              "type",
              "coordinates"
            ]
          },
          "properties": {
            "type": "object",
            "properties": {
              "reference": {
                "type": "string"
              },
              "area": {
                "type": "integer"
              },
              "centroid": {
                "$ref": "#/components/schemas/Point"
              }
            },
            "required": [
              "reference",
              "centroid"
            ]
          }
        },
        "required": [
          "type",
          "geometry",
          "properties"
        ]
      },
      "ParcelOutline": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "centroid": {
            "$ref": "#/components/schemas/Point"
          },
          "area": {
            "type": "integer",
            "description": "m²"
          },
          "geojson": {
            "$ref": "#/components/schemas/OutlineFeature"
          },
          "officialRecordUrl": {
            "type": "string",
            "format": "uri"
          },
          "cadastreUrl": {
            "type": "string",
            "format": "uri"
          },
          "googleMapsUrl": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "reference",
          "centroid"
        ]
      },
      "SolarEconomics": {
        "type": "object",
        "properties": {
          "selfConsumptionKwhYear": {
            "type": "number"
          },
          "selfConsumptionSavingsEur": {
            "type": "number"
          },
          "surplusKwhYear": {
            "type": "number"
          },
          "surplusPriceEurKwh": {
            "type": "number"
          },
          "surplusIncomeEur": {
            "type": "number"
          },
          "capexEur": {
            "type": "number"
          },
          "annualMaintenanceEur": {
            "type": "number"
          },
          "netAnnualIncomeEur": {
            "type": "number"
          },
          "paybackYears": {
            "type": "number"
          },
          "irrPct": {
            "type": "number"
          },
          "totalReturn25YearsEur": {
            "type": "number"
          },
          "landLeaseAvailable": {
            "type": "boolean",
            "description": "Paid plans only; omitted for Free-plan keys."
          },
          "landLeaseEurPerHaYear": {
            "type": "number",
            "description": "Paid plans only; omitted for Free-plan keys."
          },
          "landLeaseTotalEurYear": {
            "type": "number",
            "description": "Paid plans only; omitted for Free-plan keys."
          },
          "note": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SolarPotential": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "description": "ok, no_data, unavailable, insufficient_power, area_unavailable"
          },
          "annualProductionKwh": {
            "type": "number"
          },
          "installableKw": {
            "type": "number"
          },
          "annualSavingsEur": {
            "type": "number"
          },
          "paybackYears": {
            "type": "number"
          },
          "co2AvoidedKg": {
            "type": "number"
          },
          "irradiationKwhM2": {
            "type": "number",
            "description": "Mean irradiation, kWh/m² per year"
          },
          "solarGrade": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5,
            "description": "1 (poor) to 5 (excellent)"
          },
          "optimalOrientation": {
            "type": "string",
            "enum": [
              "south",
              "north"
            ]
          },
          "tiltAngleDeg": {
            "type": "number"
          },
          "installationCostEur": {
            "type": "number"
          },
          "source": {
            "type": "string"
          },
          "economics": {
            "$ref": "#/components/schemas/SolarEconomics"
          }
        },
        "required": [
          "available",
          "status",
          "annualProductionKwh",
          "installableKw",
          "annualSavingsEur",
          "paybackYears",
          "co2AvoidedKg",
          "irradiationKwhM2",
          "solarGrade"
        ]
      },
      "DataSource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "license": {
            "type": "string"
          },
          "attribution": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "resolution": {
            "type": "string"
          },
          "edition": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "provider",
          "license",
          "attribution",
          "url"
        ]
      },
      "Agriculture": {
        "type": "object",
        "properties": {
          "landUse": {
            "type": "string",
            "description": "Land use, in the source language"
          },
          "mainCrop": {
            "type": "string",
            "description": "Main crop or crop group, in the source language"
          },
          "areaHa": {
            "type": "number"
          },
          "irrigationCoefficient": {
            "type": "number"
          },
          "plot": {
            "type": "object",
            "properties": {
              "province": {
                "type": "integer"
              },
              "municipality": {
                "type": "integer"
              },
              "polygon": {
                "type": "integer"
              },
              "parcel": {
                "type": "integer"
              },
              "enclosure": {
                "type": "integer"
              },
              "meanSlopePct": {
                "type": "number"
              },
              "altitudeM": {
                "type": "number"
              },
              "pastureEligibilityPct": {
                "type": "number"
              },
              "pastureRegion": {
                "type": "integer"
              },
              "incidents": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "parcel": {
            "type": "object",
            "properties": {
              "country": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "parts": {
                "type": "object",
                "properties": {},
                "additionalProperties": {
                  "type": "string"
                }
              },
              "source": {
                "type": "string"
              },
              "year": {
                "type": "integer"
              },
              "origin": {
                "$ref": "#/components/schemas/DataSource"
              },
              "geometry": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              "organic": {
                "type": "boolean"
              }
            },
            "required": [
              "country",
              "id",
              "source"
            ]
          },
          "ndvi": {
            "type": "object",
            "properties": {
              "mean": {
                "type": "number"
              },
              "cropHealth": {
                "type": "string",
                "enum": [
                  "excellent",
                  "good",
                  "moderate",
                  "low",
                  "very_low"
                ]
              },
              "updatedAt": {
                "type": "string"
              },
              "method": {
                "type": "string"
              }
            },
            "required": [
              "mean",
              "cropHealth",
              "updatedAt"
            ]
          },
          "cropPrice": {
            "type": "object",
            "properties": {
              "pricePerKgEur": {
                "type": "number"
              },
              "trend": {
                "type": "string"
              },
              "method": {
                "type": "string"
              },
              "isEstimate": {
                "type": "boolean"
              },
              "referenceDate": {
                "type": "string"
              }
            },
            "required": [
              "pricePerKgEur",
              "isEstimate"
            ],
            "description": "Market price of the main crop per kg. Paid plans only; omitted for Free-plan keys."
          },
          "nitrateVulnerableZone": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "intersects": {
                "type": "boolean"
              },
              "inside": {
                "type": "boolean"
              },
              "wholeTerritory": {
                "type": "boolean"
              },
              "maxOverlapPct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "zones": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                }
              },
              "method": {
                "type": "string"
              },
              "source": {
                "$ref": "#/components/schemas/DataSource"
              }
            },
            "additionalProperties": true
          }
        },
        "required": [
          "landUse",
          "mainCrop"
        ]
      },
      "MarketSale": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "parcelId": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "priceEur": {
            "type": "number"
          },
          "builtAreaM2": {
            "type": "number"
          },
          "propertyType": {
            "type": "string"
          },
          "rooms": {
            "type": "integer"
          },
          "address": {
            "type": "string"
          },
          "municipality": {
            "type": "string"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          }
        }
      },
      "OfficialZonePrice": {
        "type": "object",
        "description": "Official average price of the zone for one kind of land, as published by the authority.",
        "properties": {
          "pricePerM2Eur": {
            "type": "number",
            "description": "EUR per m². Urban: per built m² of free-market housing. Rural: per m² of farmland."
          },
          "pricePerHaEur": {
            "type": "number",
            "description": "EUR per hectare (rural only)."
          },
          "statistic": {
            "type": "string",
            "description": "Name of the official statistic"
          },
          "authority": {
            "type": "string",
            "description": "Publishing authority"
          },
          "period": {
            "type": "string",
            "description": "Reference period, e.g. 2026-Q1 or 2024"
          }
        },
        "required": [
          "pricePerM2Eur",
          "statistic",
          "authority",
          "period"
        ]
      },
      "ZonePrices": {
        "type": "object",
        "description": "Official zone price statistics for the parcel's zone (Spain: province).",
        "properties": {
          "zone": {
            "type": "string",
            "description": "Zone name, e.g. the province"
          },
          "zoneLevel": {
            "type": "string",
            "description": "province"
          },
          "municipality": {
            "type": "string"
          },
          "urban": {
            "$ref": "#/components/schemas/OfficialZonePrice"
          },
          "rural": {
            "$ref": "#/components/schemas/OfficialZonePrice"
          }
        },
        "required": [
          "zone",
          "zoneLevel"
        ]
      },
      "MarketReference": {
        "type": "object",
        "properties": {
          "available": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "description": "available, complete, reference_only, zone_reference (only official zone prices), unavailable"
          },
          "estimatedPriceEur": {
            "type": "number"
          },
          "pricePerM2Eur": {
            "type": "number"
          },
          "salesCount": {
            "type": "integer"
          },
          "lastSaleDate": {
            "type": "string"
          },
          "granularity": {
            "type": "string",
            "description": "parcel, section, zone, municipality, province"
          },
          "source": {
            "type": "string"
          },
          "sales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketSale"
            }
          },
          "message": {
            "type": "string"
          },
          "dataQuality": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "zonePrices": {
            "$ref": "#/components/schemas/ZonePrices"
          },
          "cropPrices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CropLandPrice"
            },
            "description": "Spain (common regime), rustic parcels: official price per hectare by crop for each crop group of the parcel. Paid plans only. Not a valuation of the parcel."
          },
          "priceNote": {
            "type": "string",
            "description": "What the figures value: the land by crop, not the buildings on the parcel."
          }
        },
        "required": [
          "available",
          "status",
          "estimatedPriceEur",
          "pricePerM2Eur",
          "salesCount"
        ]
      },
      "InvestmentScore": {
        "type": "object",
        "properties": {
          "score": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "0-100"
          },
          "rating": {
            "type": "string",
            "enum": [
              "excellent",
              "good",
              "moderate",
              "low",
              "very_low",
              "no_data"
            ]
          },
          "recommendation": {
            "type": "string"
          },
          "components": {
            "type": "object",
            "properties": {
              "solar": {
                "type": "number",
                "description": "0-10"
              },
              "agriculture": {
                "type": "number",
                "description": "0-10"
              },
              "market": {
                "type": "number",
                "description": "0-10"
              },
              "accessibility": {
                "type": "number",
                "description": "0-10"
              },
              "risk": {
                "type": "number",
                "description": "0-10"
              }
            },
            "required": [
              "solar",
              "agriculture",
              "market",
              "accessibility",
              "risk"
            ]
          },
          "availableComponents": {
            "type": "object",
            "properties": {
              "solar": {
                "type": "boolean"
              },
              "agriculture": {
                "type": "boolean"
              },
              "market": {
                "type": "boolean"
              },
              "accessibility": {
                "type": "boolean"
              },
              "risk": {
                "type": "boolean"
              }
            },
            "required": [
              "solar",
              "agriculture",
              "market",
              "accessibility",
              "risk"
            ]
          },
          "riskFactors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "opportunityFactors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "score",
          "rating",
          "recommendation",
          "components",
          "availableComponents",
          "riskFactors",
          "opportunityFactors"
        ]
      },
      "ValueHistoryEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "cadastralValueEur": {
            "type": "number"
          },
          "area": {
            "type": "number",
            "description": "m²"
          },
          "use": {
            "type": "string"
          },
          "capturedOn": {
            "type": "string",
            "format": "date"
          },
          "source": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "reference",
          "country",
          "cadastralValueEur",
          "area",
          "use",
          "capturedOn",
          "source",
          "createdAt"
        ]
      },
      "ValueHistory": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValueHistoryEntry"
            }
          },
          "totalEntries": {
            "type": "integer"
          },
          "areaChangePct": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "reference",
          "country",
          "entries",
          "totalEntries",
          "areaChangePct"
        ]
      },
      "ComparedParcel": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "parcel": {
            "$ref": "#/components/schemas/Parcel"
          },
          "solar": {
            "$ref": "#/components/schemas/SolarPotential"
          },
          "agriculture": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "status": {
                "type": "string"
              },
              "isAgricultural": {
                "type": "boolean"
              },
              "landUse": {
                "type": "string"
              },
              "cropGroup": {
                "type": "string"
              },
              "crop": {
                "type": "string"
              },
              "areaHa": {
                "type": "number"
              }
            },
            "required": [
              "available",
              "status",
              "isAgricultural"
            ]
          },
          "score": {
            "type": "object",
            "properties": {
              "available": {
                "type": "boolean"
              },
              "score": {
                "type": "number"
              },
              "rating": {
                "type": "string"
              }
            },
            "required": [
              "available",
              "score",
              "rating"
            ]
          },
          "error": {
            "type": "string",
            "description": "Set when this parcel was not found; the others are still compared"
          }
        },
        "required": [
          "reference",
          "country"
        ]
      },
      "Comparison": {
        "type": "object",
        "properties": {
          "parcels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComparedParcel"
            }
          },
          "total": {
            "type": "integer"
          }
        },
        "required": [
          "parcels",
          "total"
        ]
      },
      "AddressMatch": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "parcelReference": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "municipality": {
            "type": "string"
          },
          "streetType": {
            "type": "string"
          },
          "streetName": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "floor": {
            "type": "string"
          },
          "door": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          }
        },
        "required": [
          "reference"
        ]
      },
      "AddressCandidate": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "number": {
            "type": "integer"
          },
          "postalCode": {
            "type": "string"
          },
          "municipality": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "0-1"
          },
          "numberMatches": {
            "type": "boolean"
          },
          "municipalityMatches": {
            "type": "boolean"
          },
          "inOwnCopy": {
            "type": "boolean"
          },
          "cadastreAddress": {
            "type": "string"
          },
          "use": {
            "type": "string"
          },
          "dwellings": {
            "type": "integer"
          },
          "yearBuilt": {
            "type": "integer"
          }
        },
        "required": [
          "reference",
          "country",
          "address",
          "municipality",
          "region",
          "latitude",
          "longitude",
          "confidence",
          "numberMatches",
          "municipalityMatches",
          "inOwnCopy"
        ]
      },
      "AddressCandidates": {
        "type": "object",
        "properties": {
          "query": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string"
              },
              "street": {
                "type": "string"
              },
              "number": {
                "type": "integer"
              },
              "municipality": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              }
            },
            "required": [
              "text"
            ]
          },
          "candidates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AddressCandidate"
            }
          },
          "attribution": {
            "type": "string"
          }
        },
        "required": [
          "query",
          "candidates",
          "attribution"
        ]
      },
      "Resolution": {
        "type": "object",
        "properties": {
          "input": {
            "type": "string"
          },
          "ambiguous": {
            "type": "boolean"
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "country": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "reference",
                    "coordinates",
                    "place_name"
                  ]
                },
                "normalized": {
                  "type": "string"
                },
                "confidence": {
                  "type": "number"
                },
                "supported": {
                  "type": "boolean"
                }
              },
              "required": [
                "country",
                "kind",
                "normalized",
                "confidence",
                "supported"
              ]
            }
          }
        },
        "required": [
          "input",
          "ambiguous",
          "candidates"
        ]
      },
      "Terrain": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "relief": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "ok",
                  "no_data",
                  "unavailable"
                ]
              },
              "elevationM": {
                "type": "object",
                "properties": {
                  "mean": {
                    "type": "number"
                  },
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  }
                }
              },
              "slope": {
                "type": "object",
                "properties": {
                  "meanPct": {
                    "type": "number"
                  },
                  "meanDeg": {
                    "type": "number"
                  },
                  "maxPct": {
                    "type": "number"
                  },
                  "class": {
                    "type": "string"
                  },
                  "maxClass": {
                    "type": "string"
                  },
                  "shareOver10Pct": {
                    "type": "number"
                  },
                  "classesPct": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Share per slope class (flat, gentle, moderate, steep, very_steep)"
                  }
                },
                "additionalProperties": true
              },
              "aspect": {
                "type": "object",
                "properties": {
                  "dominant": {
                    "type": "string"
                  },
                  "dominantSharePct": {
                    "type": "number"
                  },
                  "meanDeg": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "flatSharePct": {
                    "type": "number"
                  },
                  "sectorsPct": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "number"
                    },
                    "description": "Share per compass sector (N, NE, ...)"
                  }
                },
                "additionalProperties": true
              },
              "sample": {
                "type": "object",
                "properties": {
                  "method": {
                    "type": "string"
                  },
                  "cells": {
                    "type": "integer"
                  },
                  "resolutionM": {
                    "type": "number"
                  }
                }
              },
              "source": {
                "$ref": "#/components/schemas/DataSource"
              }
            },
            "additionalProperties": true
          },
          "protectedAreas": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "intersects": {
                "type": "boolean"
              },
              "inside": {
                "type": "boolean"
              },
              "maxOverlapPct": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "natura2000": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "designation": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "overlapPct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "code",
                    "name",
                    "country"
                  ]
                }
              },
              "national": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "designation": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "overlapPct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "code",
                    "name",
                    "country"
                  ]
                }
              },
              "method": {
                "type": "string"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DataSource"
                }
              }
            },
            "additionalProperties": true
          },
          "climate": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "nitrateZones": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "calculatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "provenance": {
            "type": "string"
          }
        },
        "required": [
          "reference",
          "country"
        ],
        "additionalProperties": true
      },
      "GroundMotion": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "no_data",
              "unavailable"
            ]
          },
          "reason": {
            "type": "string"
          },
          "period": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string"
              },
              "to": {
                "type": "string"
              },
              "label": {
                "type": "string"
              }
            }
          },
          "groundMotion": {
            "type": "object",
            "properties": {
              "class": {
                "type": "string"
              },
              "worstClass": {
                "type": "string"
              },
              "vertical": {
                "type": "object",
                "properties": {
                  "meanMmYear": {
                    "type": "number"
                  },
                  "maxSubsidenceMmYear": {
                    "type": "number"
                  },
                  "maxUpliftMmYear": {
                    "type": "number"
                  },
                  "stdMmYear": {
                    "type": "number"
                  },
                  "accelerationMmYear2": {
                    "type": "number"
                  },
                  "rmseMm": {
                    "type": "number"
                  }
                }
              },
              "eastWest": {
                "type": "object",
                "properties": {
                  "meanMmYear": {
                    "type": "number"
                  },
                  "stdMmYear": {
                    "type": "number"
                  }
                }
              },
              "yearlyDisplacement": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "year": {
                      "type": "integer"
                    },
                    "mm": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "year",
                    "mm"
                  ]
                }
              },
              "cellsWithData": {
                "type": "integer"
              },
              "cellsConsidered": {
                "type": "integer"
              },
              "coveragePct": {
                "type": "number"
              },
              "basis": {
                "type": "string"
              },
              "cellSizeM": {
                "type": "number"
              }
            },
            "additionalProperties": true
          },
          "source": {
            "$ref": "#/components/schemas/DataSource"
          },
          "calculatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "provenance": {
            "type": "string"
          }
        },
        "required": [
          "reference",
          "country",
          "status"
        ],
        "additionalProperties": true
      },
      "ErrorDetails": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "feature": {
            "type": "string"
          },
          "supported": {
            "type": "boolean"
          },
          "supportedCountries": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "type": "string"
          },
          "place": {
            "type": "string"
          },
          "parcelNumber": {
            "type": "string"
          },
          "location": {
            "type": "object",
            "properties": {
              "latitude": {
                "type": "number"
              },
              "longitude": {
                "type": "number"
              },
              "address": {
                "type": "string"
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "latitude",
              "longitude"
            ]
          },
          "candidates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "country": {
                  "type": "string"
                },
                "confidence": {
                  "type": "number"
                },
                "supported": {
                  "type": "boolean"
                }
              },
              "required": [
                "country",
                "confidence",
                "supported"
              ]
            }
          },
          "reason": {
            "type": "string",
            "description": "Why the request could not be answered, for example why a price cannot be estimated."
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              false
            ]
          },
          "code": {
            "type": "string",
            "description": "Stable machine code"
          },
          "message": {
            "type": "string",
            "description": "English text"
          },
          "details": {
            "$ref": "#/components/schemas/ErrorDetails"
          }
        },
        "required": [
          "success",
          "code",
          "message"
        ]
      },
      "ParcelResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Parcel"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "UnitsPageResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/UnitsPage"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "ParcelOutlineResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/ParcelOutline"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "TerrainResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Terrain"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "GroundMotionResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/GroundMotion"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "SolarPotentialResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/SolarPotential"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "AgricultureResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Agriculture"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MarketReferenceResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/MarketReference"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "InvestmentScoreResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/InvestmentScore"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "ValueHistoryResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/ValueHistory"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "ComparisonResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Comparison"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "AddressMatchResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/AddressMatch"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "AddressCandidatesResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/AddressCandidates"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "ResolutionResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Resolution"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "Neighbor": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          }
        },
        "required": [
          "reference",
          "latitude",
          "longitude"
        ]
      },
      "Neighbors": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string"
          },
          "supported": {
            "type": "boolean",
            "description": "false when neighbours cannot be listed for this country; the list is then empty"
          },
          "count": {
            "type": "integer"
          },
          "neighbors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Neighbor"
            }
          }
        },
        "required": [
          "country",
          "supported",
          "count",
          "neighbors"
        ]
      },
      "Province": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "Provinces": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "provinces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Province"
            }
          }
        },
        "required": [
          "total",
          "provinces"
        ]
      },
      "Municipality": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Cadastre municipality code"
          },
          "ineCode": {
            "type": "string",
            "description": "INE municipality code"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "name"
        ]
      },
      "Municipalities": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "municipalities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Municipality"
            }
          }
        },
        "required": [
          "total",
          "municipalities"
        ]
      },
      "Street": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "Street type abbreviation of the cadastre (CL, AV, PZ...)"
          },
          "name": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "type",
          "name",
          "fullName"
        ]
      },
      "Streets": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "streets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Street"
            }
          }
        },
        "required": [
          "total",
          "streets"
        ]
      },
      "NeighborsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Neighbors"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "ProvincesResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Provinces"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "MunicipalitiesResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Municipalities"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "StreetsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "data": {
            "$ref": "#/components/schemas/Streets"
          },
          "remainingSearches": {
            "type": "integer",
            "description": "Monthly API quota left (same as X-Quota-Remaining); omitted when unknown"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "CropShare": {
        "type": "object",
        "properties": {
          "cropCode": {
            "type": "string",
            "description": "Stable crop code (see GET /v1/reference/crops)"
          },
          "crop": {
            "type": "string",
            "description": "Crop in the requested language"
          },
          "cropOriginal": {
            "type": "string",
            "description": "Crop as the source writes it, in its own language"
          },
          "useClass": {
            "type": "string",
            "description": "Common land-use class across countries"
          },
          "area": {
            "type": "integer",
            "description": "Total area of this crop in m²"
          },
          "share": {
            "type": "number",
            "description": "Percentage of the parcel area (0-100, one decimal)"
          }
        },
        "required": [
          "area",
          "share"
        ]
      },
      "ParcelSubparcels": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string",
            "description": "Cadastral reference"
          },
          "country": {
            "type": "string",
            "description": "Country (ISO 3166-1 alpha-2) or Spanish foral cadastre code (PV, NA)"
          },
          "parcelArea": {
            "type": "integer",
            "description": "Parcel area in m²"
          },
          "count": {
            "type": "integer",
            "description": "Number of subparcels; 0 (and no units charged) when the parcel has none"
          },
          "subparcels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Subparcel"
            }
          }
        },
        "required": [
          "reference",
          "count",
          "subparcels"
        ]
      },
      "ParcelSubparcelsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/ParcelSubparcels"
          },
          "remainingSearches": {
            "type": "integer"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "CropReference": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable crop code, as in `cropCode`"
          },
          "source": {
            "type": "string",
            "description": "ES (Spanish common territory), AL, BI, GI, NA (Spanish foral territories) or the country code of the catalogue (e.g. AT, DE, FR)"
          },
          "name": {
            "type": "string",
            "description": "Name in the requested language"
          },
          "original": {
            "type": "string",
            "description": "Label as the source writes it, in its own language"
          },
          "useClass": {
            "type": "string",
            "description": "Common land-use class of the code (European catalogues)"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Name in every supported language, keyed by language code"
          }
        },
        "required": [
          "code",
          "source",
          "name",
          "original",
          "labels"
        ]
      },
      "CropCatalog": {
        "type": "object",
        "properties": {
          "locale": {
            "type": "string"
          },
          "locales": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "count": {
            "type": "integer"
          },
          "useClasses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UseClassReference"
            }
          },
          "crops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CropReference"
            }
          }
        },
        "required": [
          "locale",
          "locales",
          "sources",
          "count",
          "useClasses",
          "crops"
        ]
      },
      "CropCatalogResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/CropCatalog"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "UseClassReference": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Name in the requested language"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "code",
          "name",
          "labels"
        ]
      },
      "SIGPACParcelKey": {
        "type": "object",
        "properties": {
          "province": {
            "type": "integer",
            "description": "Province code (INE)"
          },
          "municipality": {
            "type": "integer",
            "description": "Municipality code as SIGPAC uses it (the cadastral municipality code)"
          },
          "aggregate": {
            "type": "integer",
            "description": "Aggregate (agregado); 0 except in merged municipalities"
          },
          "zone": {
            "type": "integer",
            "description": "Zone (zona); 0 except in land-consolidation areas"
          },
          "polygon": {
            "type": "integer"
          },
          "parcel": {
            "type": "integer"
          }
        },
        "required": [
          "province",
          "municipality",
          "aggregate",
          "zone",
          "polygon",
          "parcel"
        ]
      },
      "SIGPACIncident": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer"
          },
          "description": {
            "type": "string",
            "description": "Official FEGA text of the incident (Spanish). Empty for codes not in the published list."
          }
        },
        "required": [
          "code"
        ]
      },
      "SIGPACEnclosure": {
        "type": "object",
        "description": "One SIGPAC enclosure (recinto): the smallest unit of the CAP land parcel identification system, with a single land use.",
        "properties": {
          "id": {
            "type": "string",
            "description": "province:municipality:aggregate:zone:polygon:parcel:enclosure"
          },
          "province": {
            "type": "integer",
            "description": "Province code (INE)"
          },
          "municipality": {
            "type": "integer",
            "description": "Municipality code as SIGPAC uses it (the cadastral municipality code)"
          },
          "aggregate": {
            "type": "integer",
            "description": "Aggregate (agregado); 0 except in merged municipalities"
          },
          "zone": {
            "type": "integer",
            "description": "Zone (zona); 0 except in land-consolidation areas"
          },
          "polygon": {
            "type": "integer"
          },
          "parcel": {
            "type": "integer"
          },
          "enclosure": {
            "type": "integer",
            "description": "Enclosure (recinto) number"
          },
          "landUseCode": {
            "type": "string",
            "description": "SIGPAC land-use code (uso_sigpac), e.g. TA, OV, VI, FY, PS, ZU"
          },
          "landUse": {
            "type": "string",
            "description": "Land-use name in the requested language (10 languages)"
          },
          "cropCode": {
            "type": "string",
            "description": "Code in GET /reference/crops (SIGPAC:<code>), omitted for a code not in the catalogue"
          },
          "useClass": {
            "type": "string",
            "description": "Common land-use class shared with /subparcels"
          },
          "useClassName": {
            "type": "string"
          },
          "areaHa": {
            "type": "number",
            "description": "Area in hectares as SIGPAC records it"
          },
          "irrigationPct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Irrigation coefficient of the enclosure (coef_regadio), 0–100. null when SIGPAC does not apply one (non-agricultural uses); 0 means rainfed."
          },
          "meanSlopePct": {
            "type": [
              "number",
              "null"
            ],
            "description": "Mean slope in %"
          },
          "altitudeM": {
            "type": [
              "number",
              "null"
            ],
            "description": "Altitude in metres"
          },
          "pastureEligibilityPct": {
            "type": [
              "number",
              "null"
            ],
            "description": "CAP pasture eligibility coefficient (admisibilidad), 0–100; null where it does not apply"
          },
          "capRegion": {
            "type": [
              "integer",
              "null"
            ],
            "description": "CAP basic income support region (SIGPAC region)"
          },
          "incidents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SIGPACIncident"
            }
          },
          "geometry": {
            "type": [
              "object",
              "null"
            ],
            "description": "GeoJSON Polygon or MultiPolygon of the enclosure, lon/lat"
          }
        },
        "required": [
          "id",
          "province",
          "municipality",
          "aggregate",
          "zone",
          "polygon",
          "parcel",
          "enclosure",
          "landUseCode",
          "areaHa",
          "irrigationPct",
          "meanSlopePct",
          "altitudeM",
          "pastureEligibilityPct",
          "capRegion",
          "incidents",
          "geometry"
        ]
      },
      "ParcelSIGPAC": {
        "type": "object",
        "properties": {
          "reference": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "enum": [
              "ES",
              "PV",
              "NA"
            ]
          },
          "sigpacParcel": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SIGPACParcelKey"
              },
              {
                "type": "null"
              }
            ],
            "description": "The SIGPAC parcel read; null when none was found"
          },
          "match": {
            "type": "string",
            "enum": [
              "reference",
              "point"
            ],
            "description": "reference: the SIGPAC parcel has the same province, municipality, polygon and parcel as the cadastral reference. point: it is the SIGPAC parcel under the cadastral parcel's point (urban references, foral territories, merged municipalities)."
          },
          "count": {
            "type": "integer"
          },
          "totalAreaHa": {
            "type": "number"
          },
          "crs": {
            "type": "string"
          },
          "retrievedAt": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "$ref": "#/components/schemas/DataSource"
          },
          "enclosures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SIGPACEnclosure"
            }
          }
        },
        "required": [
          "reference",
          "country",
          "sigpacParcel",
          "count",
          "totalAreaHa",
          "crs",
          "source",
          "enclosures"
        ]
      },
      "ParcelSIGPACResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/ParcelSIGPAC"
          },
          "remainingSearches": {
            "type": "integer"
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "CropLandPrice": {
        "type": "object",
        "description": "Official price per hectare of one crop group of the parcel.",
        "properties": {
          "cropGroup": {
            "type": "string",
            "description": "Crop group code (TAS, TAR, OLS, OLR, VIS, VIR, CIT, FCS, FCR, FSS, FSR, HUE, PST, PRD, MTR, CON…)"
          },
          "cropGroupName": {
            "type": "string"
          },
          "landUseCodes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Cadastral crop codes (or SIGPAC:<code>) of the parcel grouped here"
          },
          "basis": {
            "type": "string",
            "enum": [
              "cadastral_subparcels",
              "sigpac_enclosures"
            ],
            "description": "Where the parcel's crops come from"
          },
          "areaHa": {
            "type": "number",
            "description": "Area of the parcel in this crop group"
          },
          "pricePerHaEur": {
            "type": "number"
          },
          "salesCount": {
            "type": "integer",
            "description": "Registered sales behind the figure (agricultural_zone level only)"
          },
          "level": {
            "type": "string",
            "enum": [
              "agricultural_zone",
              "province_median"
            ],
            "description": "agricultural_zone: figure of the rural market area the municipality belongs to. province_median: median of the province's areas, when the parcel's area has no figure for that crop."
          },
          "zone": {
            "type": "string",
            "description": "Code of the rural market area"
          },
          "period": {
            "type": "string"
          },
          "authority": {
            "type": "string"
          },
          "statistic": {
            "type": "string"
          }
        },
        "required": [
          "cropGroup",
          "landUseCodes",
          "basis",
          "areaHa",
          "pricePerHaEur",
          "level",
          "period",
          "authority",
          "statistic"
        ]
      }
    }
  }
}