GET /v1/datasets

Status pro Bundesland (Snapshot, Coverage, Lizenz)

stable seit v0.1.0 datasets auth: none

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/datasets 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/json — Schema-Quelle openapi.json (#/components/schemas/DatasetListResponse).

{
  "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

HeaderWertVerwendung
Cache-Controlpublic, max-age=3005 min Browser-/CDN-Cache

Stolperdrähte

  • validation_pass_pct: null ist legitim — manche BL haben noch keinen val3dity-Run gemacht. Frontend muss null-tolerant sein.
  • snapshot_date ist 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 NULL in lodapi_meta.dataset. Bei laufendem Voll-Run fehlt der BL bis zum Abschluss — keine Teil-Daten in der API.

Verwandte Endpoints

Verwandt

  • /v1/tilesets
  • /v1/buildings
  • /v1/terrain/datasets

Bereit?

Der erste Call geht sofort.

LoD2-Gebäude für alle 16 Bundesländer, kostenlos und ohne Konto. Pro auf Anfrage 30 Tage testen.