Zum Inhalt springen
Transit API

Transit API

Verbindungen mit öffentlichem Verkehr (zu Fuß oder mit dem Rad zur Haltestelle), Abfahrtstafeln und Haltestellen auf Basis des Fahrplans.

Basis-URL: https://api.mapx.at · Rate-Limit-Zone: route (5/s), search (10/s) · Guide: ÖV-Abfahrten

Public transit: walking plus transit (GTFS timetable, RAPTOR)

GET /v1/directions/transit/{coordinates}

Exactly origin and destination. Connections with walks on the GIP.at network and rides (line, stops, times). Time via depart_at (default now) or arrive_by, ISO 8601 in Vienna local time. Timetable data: OeBB-Personenverkehr AG (CC BY 4.0); data source: Mobilitaetsverbuende Oesterreich OG, data.mobilitaetsverbuende.at.

Parameter

NameOrtTypPflichtStandardBeschreibung
coordinatespathstringja–lon,lat;lon,lat (exactly origin and destination)
depart_atquerystring–Earliest departure, e.g. 2026-11-09T08:00
arrive_byquerystring–Latest arrival, instead of depart_at
routesquerystring31 to 5, default 3

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/directions/transit/16.3725,48.2085;16.4202,48.1855?depart_at=2026-11-09T08:00" | jq

Beispielantwort

{
  "code": "Ok",
  "routes": [
    {
      "duration": 2400,
      "legs": [
        {
          "mode": "walking",
          "duration": 300
        },
        {
          "mode": "transit",
          "line": "S1",
          "from": "Wien Hbf",
          "to": "Wien Floridsdorf"
        }
      ]
    }
  ],
  "waypoints": []
}

Fehler (Details: Fehlerkatalog)

StatusBedeutung
400Parameter fehlt oder ist ungültig
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
422Anfrage gültig, aber nicht beantwortbar (z. B. keine Route)
429Rate-Limit überschritten, Retry-After abwarten
502Vorgelagerter Dienst nicht erreichbar

Departure board (scheduled GTFS timetable)

GET /v1/departures

Next departures at a station (id from /v1/stops, e.g. at:43:7226) or at all stations around a coordinate. Service days follow calendar and feed period, trips past midnight included. Per departure: time, line (name, mode, route_type), headsign, destination, platform (null if unknown), operator, stop.

Mehr

No real-time data: realtime is always false. Outside the feed period 422, unknown station 404. Timetable data: OeBB-Personenverkehr AG (CC BY 4.0); data source: Mobilitaetsverbuende Oesterreich OG, data.mobilitaetsverbuende.at.

Parameter

NameOrtTypPflichtStandardBeschreibung
stopquerystringja–Station id (IFOPT at:<state>:<nr>, also platform id at:43:7226:0:2) or lon,lat
timequerystringnowStart time, ISO 8601 (Vienna local) or Unix seconds, default now
limitquerystring201 to 100, default 20
radiusquerystring300With lon,lat only: meters, 1 to 2000, default 300
horizonquerystring14400Window in seconds, 60 to 86400, default 14400

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/departures?stop=16.3725,48.2085&limit=5&radius=300" | jq

Beispielantwort

{
  "time": "2026-11-09T08:00:00+01:00",
  "realtime": false,
  "stops": [
    {
      "id": "at:43:7226",
      "name": "Melk Bahnhof"
    }
  ],
  "departures": [
    {
      "time": "2026-11-09T08:04:00+01:00",
      "line": {
        "name": "REX 1",
        "mode": "rail",
        "route_type": 2
      },
      "headsign": "Wien Westbahnhof",
      "platform": "2",
      "stop": "at:43:7226"
    }
  ]
}

Fehler (Details: Fehlerkatalog)

StatusBedeutung
400Parameter fehlt oder ist ungültig
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
404Nicht gefunden (Name, Pfad oder Position)
422Anfrage gültig, aber nicht beantwortbar (z. B. keine Route)
429Rate-Limit überschritten, Retry-After abwarten
502Vorgelagerter Dienst nicht erreichbar

Stops (GTFS stations merged by IFOPT)

GET /v1/stops

Stations in a box (bbox, by number of trip patterns descending) or around a point (near, nearest first, with distance in meters). Per station id, name, location [lon,lat], modes (rail, bus, tram, subway, …) and lines.

Parameter

NameOrtTypPflichtStandardBeschreibung
bboxquerystring–west,south,east,north in degrees, at most 1 square degree
nearquerystring–lon,lat, instead of bbox
radiusquerystring500With near only: meters, 1 to 5000, default 500
limitquerystring501 to 500, default 50

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/stops?near=16.3725,48.2085&radius=300&limit=5" | jq

Beispielantwort

{
  "stops": [
    {
      "id": "at:43:7226",
      "name": "Melk Bahnhof",
      "location": [
        15.3338,
        48.2279
      ],
      "modes": [
        "rail",
        "bus"
      ],
      "lines": [
        "REX 1",
        "S50"
      ]
    }
  ]
}

Fehler (Details: Fehlerkatalog)

StatusBedeutung
400Parameter fehlt oder ist ungültig
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
429Rate-Limit überschritten, Retry-After abwarten
502Vorgelagerter Dienst nicht erreichbar

Playground

Playground
curl
Antwort erscheint hier.