Documentation API
Référence complete de l'API cadastrale
Base URL
https://api.parcelgps.comReference des endpoints
| Método | Endpoint | Auth | Descripción |
|---|---|---|---|
| GET | /api/catastro/:refcat?country=XX | API Key | Parcel lookup |
| GET | /api/catastro/:refcat/solar?country=XX | API Key + Pro | Solar potential |
| GET | /api/catastro/:refcat/agro?country=XX | API Key + Pro | Agricultural data |
| GET | /api/catastro/:refcat/market?country=XX | API Key + Pro | Market data |
| GET | /api/catastro/:refcat/score?country=XX | API Key + Pro | Investment score |
| POST | /api/catastro/compare | API Key + Pro | Compare parcels |
| GET | /api/export/kml?refcat=X&country=X | API Key + Pro | Export KML/GPX/PDF |
Authentification
Toutes les requêtes API nécessitent une API key envoyee dans l'en-tete X-API-Key.
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/catastro/9872023VH5797S"Obtenez votre API key gratuite sur votre tableau de bord developpeur.
Codes d'erreur
| Status | Code | Description |
|---|---|---|
| 200 | — | OK — La petición se ha completado correctamente. |
| 400 | VALIDATION_ERROR | Bad Request — Parámetros inválidos o referencia catastral con formato incorrecto. |
| 401 | UNAUTHORIZED | Unauthorized — API key inválida, expirada o no proporcionada. |
| 404 | NOT_FOUND | Not Found — No se encontró la parcela con la referencia o coordenadas indicadas. |
| 429 | KEY_AUTH_004 | Quota Exceeded — Has alcanzado el límite mensual de tu plan. Comprueba las cabeceras X-RateLimit-Remaining y X-RateLimit-Reset para saber cuándo se reinicia. |
| 500 | INTERNAL_ERROR | Internal Server Error — Error en nuestro servidor. Si persiste, contacta soporte. |
| 503 | SERVICE_UNAVAILABLE | Service Unavailable — El servicio catastral externo del país consultado no está disponible temporalmente. Estos servicios son gestionados por organismos públicos (Catastro, DGT, Géoportail, Agenzia Entrate, ALKIS...) y están fuera de nuestro control. Reintenta en unos minutos. |
Cabeceras de rate limit
Cada respuesta incluye cabeceras que indican el estado de tu quota:
| Header | Description |
|---|---|
| X-RateLimit-Limit | Límite mensual total de tu plan (ej: 5000). |
| X-RateLimit-Remaining | Llamadas restantes este mes. |
| X-RateLimit-Reset | Fecha de reinicio de la quota (ISO 8601). |
| X-Quota-Tier | Nombre del tier actual (free, basic, pro, business). |
Spain (ES)
Spanish Cadastre — Direccion General del Catastro
/api/catastro/:refcatObtenir les données d'une parcelle par référence cadastrale (14 ou 20 caracteres).
Paramètres
| :refcat | string | Cadastral reference (e.g. 9872023VH5797S0001WX) |
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/catastro/9872023VH5797S0001WX"Exemple de réponse
{
"success": true,
"data": {
"refCatastral": "9872023VH5797S0001WX",
"pais": "ES",
"direccion": "CL GRAN VIA 1",
"codigoPostal": "28013",
"municipio": "MADRID",
"provincia": "MADRID",
"latitud": 40.4168,
"longitud": -3.7038,
"googleMapsUrl": "https://maps.google.com/?q=40.4168,-3.7038",
"uso": "Residencial",
"clase": "Urbana",
"superficieConstruida": 125,
"superficieParcela": 200,
"anioConstruccion": 1920,
"coefParticipacion": "12.50",
"poligono": [[-3.704, 40.416], [-3.703, 40.416], ...],
"availableFields": {
"uso": true, "clase": true, "anioConstruccion": true,
"superficieConstruida": true, "coefParticipacion": true,
"direccion": true, "busquedaDireccion": true
}
},
"searchesRemaining": 4
}/api/search/coordinatesGeocodage inverse : trouver la parcelle cadastrale à des coordonnées GPS.
Paramètres
| latitude | number | Latitude (WGS84) |
| longitude | number | Longitude (WGS84) |
| country | string | Country code (default: ES) |
curl -X POST -H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"latitude": 40.4168, "longitude": -3.7038, "country": "ES"}' \
"https://api.parcelgps.com/api/search/coordinates"Exemple de réponse
{
"success": true,
"data": {
"referenciaCatastral": "9872023VH5797S0001WX",
"refCat14": "9872023VH5797S",
"direccion": "CL GRAN VIA 1",
"municipio": "MADRID",
"tipoInmueble": "",
"coordenadas": { "latitud": 40.4168, "longitud": -3.7038 },
"googleMapsUrl": "https://maps.google.com/?q=40.4168,-3.7038"
},
"searchesRemaining": 3
}/api/search/address/parseRechercher une parcelle cadastrale par adresse postale.
Paramètres
| direccion | string | Free-text address (Spain only) |
curl -X POST -H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"direccion": "Gran Via 1, Madrid"}' \
"https://api.parcelgps.com/api/search/address/parse"Exemple de réponse
{
"success": true,
"data": {
"referenciaCatastral": "9872023VH5797S0001WX",
"direccion": "CL GRAN VIA 1",
"municipio": "MADRID",
"provincia": "MADRID"
},
"searchesRemaining": 2
}Portugal (PT)
Portuguese Cadastre — Direcao-Geral do Territorio
/api/catastro/:refcat?country=PTObtenir les données d'une parcelle portugaise par référence cadastrale.
Paramètres
| :refcat | string | Portuguese cadastral reference (NIP) |
| country | string | Must be "PT" |
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/catastro/U0512N0003200?country=PT"Exemple de réponse
{
"success": true,
"data": {
"refCatastral": "U0512N0003200",
"pais": "PT",
"latitud": 38.7223,
"longitud": -9.1393,
"googleMapsUrl": "https://maps.google.com/?q=38.7223,-9.1393",
"municipio": "LISBOA",
"superficieParcela": 450,
"poligono": [[-9.14, 38.72], ...]
},
"searchesRemaining": 4
}France (FR)
French Cadastre — Cadastre / Geoplateforme
/api/catastro/:refcat?country=FRObtenir les données d'une parcelle française par référence cadastrale.
Paramètres
| :refcat | string | French cadastral reference (e.g. 750560000AB0001) |
| country | string | Must be "FR" |
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/catastro/750560000AB0001?country=FR"Exemple de réponse
{
"success": true,
"data": {
"refCatastral": "750560000AB0001",
"pais": "FR",
"latitud": 48.8566,
"longitud": 2.3522,
"googleMapsUrl": "https://maps.google.com/?q=48.8566,2.3522",
"municipio": "PARIS",
"provincia": "Paris",
"superficieParcela": 320,
"poligono": [[2.35, 48.85], ...]
},
"searchesRemaining": 4
}Italy (IT)
Italian Cadastre — Agenzia delle Entrate
/api/catastro/:refcat?country=ITObtenir les données d'une parcelle italienne par référence catastale.
Paramètres
| :refcat | string | Italian cadastral reference |
| country | string | Must be "IT" |
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/catastro/A0420001?country=IT"Exemple de réponse
{
"success": true,
"data": {
"refCatastral": "A0420001",
"pais": "IT",
"latitud": 41.9028,
"longitud": 12.4964,
"googleMapsUrl": "https://maps.google.com/?q=41.9028,12.4964",
"municipio": "ROMA",
"superficieParcela": 180,
"poligono": [[12.49, 41.90], ...]
},
"searchesRemaining": 4
}Germany (DE)
German Cadastre — ALKIS (8 Bundesländer)
/api/catastro/:refcat?country=DEObtenir les données d'une parcelle allemande (NRW) par référence cadastrale.
Paramètres
| :refcat | string | German cadastral reference (Flurstückskennzeichen) |
| country | string | Must be "DE" |
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/catastro/05315000200001?country=DE"Exemple de réponse
{
"success": true,
"data": {
"refCatastral": "05315000200001",
"pais": "DE",
"latitud": 50.9375,
"longitud": 6.9603,
"googleMapsUrl": "https://maps.google.com/?q=50.9375,6.9603",
"municipio": "KÖLN",
"superficieParcela": 520,
"poligono": [[6.96, 50.93], ...]
},
"searchesRemaining": 4
}Polygon / Solar / Export
Endpoints supplémentaires (plan Pro ou supérieur requis).
/api/catastro/:refcat/polygonObtenir le polygone GeoJSON d'une parcelle.
Paramètres
| :refcat | string | Cadastral reference |
| country | string | Country code (query param, default: ES) |
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/catastro/9872023VH5797S/polygon"Exemple de réponse
{
"success": true,
"data": {
"refCatastral": "9872023VH5797S",
"pais": "ES",
"latitud": 40.4168,
"longitud": -3.7038,
"poligono": [[-3.704, 40.416], [-3.703, 40.416], ...]
},
"searchesRemaining": 4
}/api/catastro/:refcat/solarObtenir les données de potentiel solaire (PVGIS) d'une parcelle européenne.
Paramètres
| :refcat | string | Cadastral reference |
| country | string | Country code (query param, default: ES) |
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/catastro/9872023VH5797S/solar"Exemple de réponse
{
"success": true,
"data": {
"kwh_year": 4200.0,
"kw_instalables": 3.5,
"ahorro_anual_eur": 680.0,
"amortizacion_anos": 8.5,
"co2_evitado_kg": 1890.0,
"irradiacion_media": 1650.5,
"nota_solar": 4,
"disponible": true,
"estado": "ok"
}
}/api/export/kml?refcat=:refcatExporter les données de parcelle au format KML (Google Earth).
Paramètres
| refcat | string | Cadastral reference |
| country | string | Country code (default: ES) |
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/export/kml?refcat=9872023VH5797S" -o parcel.kmlExemple de réponse
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark>
<name>9872023VH5797S</name>
...
</Placemark>
</Document>
</kml>/api/export/gpx?refcat=:refcatExporter les données de parcelle au format GPX (navigateurs GPS).
Paramètres
| refcat | string | Cadastral reference |
| country | string | Country code (default: ES) |
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.parcelgps.com/api/export/gpx?refcat=9872023VH5797S" -o parcel.gpxExemple de réponse
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1">
<wpt lat="40.4168" lon="-3.7038">
<name>9872023VH5797S</name>
</wpt>
</gpx>