Skip to content

LineStop-Request

Listet alle durchfahrenen Haltestellen einer Linie bzw. Linienvariante in Reihenfolge auf.

Endpoint

  • Pfad: XML_LINESTOP_REQUEST
  • Methode: GET

Parameter (Auszug)

ParameterTypBeschreibung
lineIdstringLinien-ID inkl. Betreiber/Variante
directionstringRichtung/Headsign (optional)
includeCoords0/1Koordinaten mitliefern

Beispiel-Request

GET /XML_LINESTOP_REQUEST?lineId=VRR:196:A&includeCoords=1

Antwort (Beispiel)

json
{
  "stops": [
    { "id": "de:05513:1001", "name": "Essen Hbf", "coord": { "lat": 51.4513, "lon": 7.0128 } },
    { "id": "de:05513:1010", "name": "Ziel" }
  ]
}

JavaScript-Beispiel

js
async function getLineStops(lineId, includeCoords = 1) {
  const base = 'https://server:port/virtuellesVerzeichnis/XML_LINESTOP_REQUEST'
  const usp = new URLSearchParams({ lineId, includeCoords: String(includeCoords) })
  const res = await fetch(`${base}?${usp}`)
  if (!res.ok) throw new Error('HTTP ' + res.status)
  return res.json()
}

title: LineStop-Request (Halte einer Linie) outline: deep

LineStop-Request

Listet die durchfahrenen Haltestellen einer konkreten Linie/Variante.

Endpoint

  • Pfad: XML_LINESTOP_REQUEST
  • Methode: GET

Parameter (Auszug)

ParameterTypBeschreibung
lineIdstringLinien-ID oder -Bezeichnung (z. B. 196)
directionIdstringRichtungs-/Kurs-ID
includeCoords0/1Koordinaten der Halte mitliefern

Beispiel-Request

GET /XML_LINESTOP_REQUEST?lineId=196&directionId=K&includeCoords=1

Antwort (Beispiel)

json
{
  "stops": [
    { "id": "de:05513:1001", "name": "Essen Hbf", "coord": { "lat": 51.4513, "lon": 7.0128 } }
  ]
}

JavaScript-Beispiel

js
async function getLineStops(lineId, directionId, includeCoords = 1) {
  const base = 'https://server:port/virtuellesVerzeichnis/XML_LINESTOP_REQUEST'
  const usp = new URLSearchParams({ lineId, directionId, includeCoords: String(includeCoords) })
  const res = await fetch(`${base}?${usp}`)
  if (!res.ok) throw new Error('HTTP ' + res.status)
  return res.json()
}