Skip to content

Taxonomies geographical hierarchy

GET /api/taxonomies/geo/{nation}/hierarchy/lat/{lat}/lng/{lng}

This endpoint retrieves the complete administrative hierarchy for a specific set of coordinates (latitude and longitude). Based on the provided coordinates, the API returns a structured JSON payload containing the location's territorial breakdown, from the broader regional level down to specific local zones. The returned data includes name and id

Example Request

curl --location 'https://ws-osservatorio.realitycs.it/api/taxonomies/geo/IT/hierarchy/lat/45.2081156/lng/12.0291133' \
--header 'Authorization: Bearer <token>'

Request Fields

Field Required Default Description Type Example Notes
lat yes latitude number 45.2081156
nation yes Nation code string IT
lng yes longitude number 12.0291133

Example Response

{
    "_metadata": {
        "message": "",
        "query": {},
        "status": 200
    },
    "items": [
        {
            "comune": {
                "id": "28035",
                "nome": "Correzzola"
            },
            "macro": {
                "id": "28035_D040R",
                "nome": "Zona Rurale - Frazioni : Villa Del Bosco- Conca D'albero- Cive' - Branta D'abba'"
            },
            "micro": {
                "id": "28035_D040R1",
                "nome": "Zona Rurale - Frazioni : Villa Del Bosco- Conca D'albero- Cive' - Branta D'abba'"
            },
            "provincia": {
                "id": "28",
                "nome": "Padova"
            },
            "regione": {
                "id": "5",
                "nome": "Veneto"
            }
        }
    ]
}