GET /v1/datasets — Verfügbare LoD2-Datensätze
Listet alle Bundesländer, für die Lodapi LoD2-Gebäude bereitstellt. Eine Zeile pro Bundesland, je mit dem aktuellsten Snapshot-Datum, Building-Count, Lizenz und Quell-URL. Dies ist der Discovery-Endpoint — typischerweise der erste Call jeder Lodapi-Integration.
Wann verwenden
- Frontend zeigt eine BL-Auswahl an und braucht „welche sind live”-Information.
- Pipeline-Code prüft, ob ein Snapshot-Update verfügbar ist (Compare
snapshot_date). - Compliance-Sicht: welche Lizenzen liegen pro BL an (relevant für eigene Attribution-Strings).
Examples
curl
curl -s https://api.lodapi.de/v1/datasets | jq
Python
# pip install lodapi
from lodapi import Client
with Client() as c:
for ds in c.datasets().datasets:
print(f"{ds.bundesland_code:3s} {ds.snapshot_date} {ds.building_count:>10,} {ds.license_id}")
TypeScript (fetch)
const r = await fetch("https://api.lodapi.de/v1/datasets");
const { datasets } = await r.json() as { datasets: Dataset[] };
const live = datasets.filter(d => d.snapshot_date);
console.log(`${live.length} Bundesländer live`);
Caching
/v1/ setzt keinen ETag — Conditional GET via If-None-Match/304 greift hier nicht. Caching läuft ausschließlich über Cache-Control: public, max-age=300 (5 min Browser-/CDN-Cache).
Parameters
Keine. Der Endpoint nimmt keine Query- oder Path-Parameter entgegen.
Response
200 OK · application/ — Schema-Quelle openapi.json (#/).
{
"datasets": [
{
"id": "he",
"bundesland_code": "he",
"name": "© HLBG (DL-DE/Zero 2.0)",
"license_id": "dl-de-zero-2.0",
"source_url": "https://gds.hessen.de/INTERMET/Geodaten/3D-Gebaeudemodelle/",
"snapshot_date": "2026-04-15",
"building_count": 4934236,
"validation_pass_pct": 99.7,
"last_sync": "2026-05-13T09:42:18Z"
}
],
"count": 3
}
Antwort-Header
| Header | Wert | Verwendung |
|---|---|---|
Cache-Control | public, max-age=300 | 5 min Browser-/CDN-Cache |
Stolperdrähte
validation_pass_pct: nullist legitim — manche BL haben noch keinenval3dity-Run gemacht. Frontend muss null-tolerant sein.snapshot_dateist das Datum des Quell-Downloads, nicht das Veröffentlichungsdatum der BL-Behörde. Manchmal liegen 6+ Monate dazwischen (z.B. ST liefert halbjährlich).- Welche BL fehlt: ein BL erscheint nur, wenn
import_finished_at IS NOT NULLinlodapi_meta.dataset. Bei laufendem Voll-Run fehlt der BL bis zum Abschluss — keine Teil-Daten in der API.
Verwandte Endpoints
GET /— räumliche Tileset-Suche.v1/ tilesets GET /— föderierte Building-Query.v1/ buildings GET /— Pendant für DGM1-Terrain.v1/ terrain/ datasets