GET /api/v1/cities/{slug}/stations
Bahnhofs-Katalog einer Stadt, alle DB-Bahnhöfe (StaDa, Tier A)
Liste ALLER DB-Bahnhöfe im Stadtgebiet (Zuordnung über den amtlichen Gemeindeschlüssel: StaDa municipalityCode == Stadt-ags), nicht nur der Fernverkehrs-Hbf. Je Bahnhof eva (EVA-Nummer, füttert GET /stations/{eva}/departures), name, category (1-7), lat, lon, zip. Quelle: Deutsche Bahn AG / StaDa (CC BY 4.0). Ohne Zugangsdaten ODER Toggle aus -> 200 source_status="disabled"; kein DB-Bahnhof im Stadtgebiet -> 200 source_status="no_data". Volle Abdeckung (alle Städte).
Parameter
| Name | In | Pflicht | Typ | Beschreibung |
|---|---|---|---|---|
slug | path | ja | string |
Code-Beispiele
curl "https://infranode.dev/api/v1/cities/hamburg/stations"const res = await fetch("https://infranode.dev/api/v1/cities/hamburg/stations");
const data = await res.json();
console.log(data);import httpx
res = httpx.get("https://infranode.dev/api/v1/cities/hamburg/stations")
res.raise_for_status()
print(res.json())