GET /api/v1/cities/{slug}/traffic
Roadworks and traffic warnings per city (Autobahn API)
Roadworks and traffic warnings around a city from the Autobahn API in the canonical envelope. Items are filtered by a bounding box around the city's coordinates; data contains the matching entries. Special cases: a disabled source returns 200 with source_status="disabled"; a dead upstream with no cache returns 503 with a hint to GET /api/v1/health.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
slug | path | yes | string |
Code samples
curl "https://infranode.dev/api/v1/cities/hamburg/traffic"const res = await fetch("https://infranode.dev/api/v1/cities/hamburg/traffic");
const data = await res.json();
console.log(data);import httpx
res = httpx.get("https://infranode.dev/api/v1/cities/hamburg/traffic")
res.raise_for_status()
print(res.json())