Query Austria's public transport for trip planning, station departures, and service alerts via the HAFAS mgate API.
json
{
"id": "1",
"ver": "1.67",
"lang": "deu",
"auth": {"type": "AID", "aid": "OWDL4fE4ixNiPBBm"},
"client": {"id": "OEBB", "type": "WEB", "name": "webapp", "l": "vs_webapp"},
"formatted": false,
"svcReqL": [...]
}
Search for stations, stops, addresses, or POIs by name.
bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
-H "Content-Type: application/json" \
-d '{
"id":"1","ver":"1.67","lang":"deu",
"auth":{"type":"AID","aid":"OWDL4fE4ixNiPBBm"},
"client":{"id":"OEBB","type":"WEB","name":"webapp","l":"vs_webapp"},
"formatted":false,
"svcReqL":[{
"req":{"input":{"field":"S","loc":{"name":"Wien Hbf","type":"ALL"},"maxLoc":10}},
"meth":"LocMatch"
}]
}'
json
{
"svcResL": [{
"res": {
"match": {
"locL": [{
"lid": "A=1@O=Wien Hbf (U)@X=16377950@Y=48184986@U=181@L=1290401@",
"type": "S",
"name": "Wien Hbf (U)",
"extId": "1290401",
"crd": { "x": 16377950, "y": 48184986 },
"pCls": 6015
}]
}
}
}]
}
Plan a journey between two locations.
bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
-H "Content-Type: application/json" \
-d '{
"id":"1","ver":"1.67","lang":"deu",
"auth":{"type":"AID","aid":"OWDL4fE4ixNiPBBm"},
"client":{"id":"OEBB","type":"WEB","name":"webapp","l":"vs_webapp"},
"formatted":false,
"svcReqL":[{
"req":{
"depLocL":[{"lid":"A=1@O=Wien Hbf@L=8103000@","type":"S"}],
"arrLocL":[{"lid":"A=1@O=Salzburg Hbf@L=8100002@","type":"S"}],
"jnyFltrL":[{"type":"PROD","mode":"INC","value":"1023"}],
"getPolyline":false,
"getPasslist":true,
"outDate":"20260109",
"outTime":"080000",
"outFrwd":true,
"numF":5
},
"meth":"TripSearch"
}]
}'
Use
for all products, or sum specific bits.
json
{
"svcResL": [{
"res": {
"outConL": [{
"date": "20260109",
"dur": "025200",
"chg": 0,
"dep": {
"dTimeS": "075700",
"dPltfS": {"txt": "8A-B"}
},
"arr": {
"aTimeS": "104900",
"aPltfS": {"txt": "7"}
},
"secL": [{
"type": "JNY",
"jny": {
"prodX": 0,
"dirTxt": "Salzburg Hbf",
"stopL": [...]
}
}]
}],
"common": {
"locL": [...],
"prodL": [...]
}
}
}]
}
Important: The
field in journey sections is an index into the
array, NOT the train name itself. To get the actual train name (e.g., "S7", "RJX 662"), you must look up
.
The raw TripSearch response is very verbose. Use this jq filter to extract a concise summary with resolved train names:
bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
-H "Content-Type: application/json" \
-d '{ ... }' | jq '
.svcResL[0].res as $r |
$r.common.prodL as $prods |
[$r.outConL[] | {
dep: .dep.dTimeS,
arr: .arr.aTimeS,
depPlatform: .dep.dPltfS.txt,
arrPlatform: .arr.aPltfS.txt,
dur: .dur,
chg: .chg,
legs: [.secL[] | select(.type == "JNY") | {
train: $prods[.jny.prodX].name,
dir: .jny.dirTxt,
dep: .dep.dTimeS,
arr: .arr.aTimeS,
depPlatform: .dep.dPltfS.txt,
arrPlatform: .arr.aPltfS.txt
}]
}]'
json
[
{
"dep": "213900",
"arr": "221100",
"depPlatform": "1",
"arrPlatform": "3A-B",
"dur": "003200",
"chg": 0,
"legs": [{"train": "S 7", "dir": "Flughafen Wien Bahnhof", "dep": "213900", "arr": "221100", ...}]
}
]
Get departures or arrivals at a station.
bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
-H "Content-Type: application/json" \
-d '{
"id":"1","ver":"1.67","lang":"deu",
"auth":{"type":"AID","aid":"OWDL4fE4ixNiPBBm"},
"client":{"id":"OEBB","type":"WEB","name":"webapp","l":"vs_webapp"},
"formatted":false,
"svcReqL":[{
"req":{
"stbLoc":{"lid":"A=1@O=Wien Hbf@L=8103000@","type":"S"},
"date":"20260109",
"time":"080000",
"type":"DEP",
"maxJny":20
},
"meth":"StationBoard"
}]
}'
json
{
"svcResL": [{
"res": {
"jnyL": [{
"prodX": 0,
"dirTxt": "Salzburg Hbf",
"stbStop": {
"dTimeS": "080000",
"dPltfS": {"txt": "8A-B"}
}
}],
"common": {
"prodL": [{
"name": "RJX 662",
"cls": 1,
"prodCtx": {"catOutL": "Railjet Xpress"}
}]
}
}
}]
}
Get current disruptions and service information.
bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
-H "Content-Type: application/json" \
-d '{
"id":"1","ver":"1.67","lang":"deu",
"auth":{"type":"AID","aid":"OWDL4fE4ixNiPBBm"},
"client":{"id":"OEBB","type":"WEB","name":"webapp","l":"vs_webapp"},
"formatted":false,
"svcReqL":[{
"req":{
"himFltrL":[{"type":"PROD","mode":"INC","value":"255"}],
"maxNum":20
},
"meth":"HimSearch"
}]
}'