Show live departures at a Munich public transport stop.
Next departures at a stop in Munich's network like MVG's departure monitor: line, type, direction, platform, planned and live time (epoch milliseconds), delay in minutes, cancellations and notices.
- Site
- MVG (Munich public transport), Germany
- Version
- v1
- Runs, last 7 days
- No reports yet
- sha256
- 3b6e60e33bcb…
Run it with your agent
after installing WieldAsk in plain words. Your agent finds this recipe and calls it:
“Show live departures at a Munich public transport stop.”
Read-only: it changes nothing on the site. No login needed.
{ "tool": "run", "arguments": { "recipe_id": "mvg.de/get-departures", "params": { "limit": 10, "station": "Marienplatz" } } }
Requests
sent from your browser, in order- 1GET/api/bgw-pt/v3/locations?queryMVG's stop search.
- 2GET/api/bgw-pt/v3/departures?globalId&limit&transportTypesMVG's departure monitor API. It applies limit before its (loose) transport-type filter, so the recipe asks for 40 and filters and cuts itself.
Parameters
from your agentlimitenum 5 | 10 | 20 = 10
stationstringrequiredStop name, e.g. 'Marienplatz', 'Ostbahnhof'
transport_typesstring[] = ["UBAHN","SBAHN","TRAM","BUS","REGIONAL_BUS","BAHN"]
Returns
to your agentdeparturesobject[]cancelled, delay_min, direction, line, notices, planned_ms, platform, realtime, realtime_ms, type
stationstring
Where it can send
- www.mvg.de
Anything else is blocked by the extension.
Reads from your session
Nothing. Your browser attaches the site's cookies by itself.
Used only in requests to the addresses on the left. Never sent to wield.run or your agent.
Checks
a run passes when- length(output.departures) > `3`
- output.departures[0].planned_ms > `1700000000000`
- length(output.departures[?line != `null`]) == length(output.departures)
- contains(output.station, 'Marienplatz')
Raw recipe
Served as canonical JSON from /api/v1/recipes/mvg.de/get-departures, so its sha256 matches the ETag and the index.
Check it yourself
curl -s https://wield.run/api/v1/recipes/mvg.de/get-departures | shasum -a 256 # 3b6e60e33bcb70f2204a846520daa6821597a034837bb6f4e9f25087501828b4
mvg.de/get-departures.json, v1
{ "description": "Next departures at a stop in Munich's network like MVG's departure monitor: line, type, direction, platform, planned and live time (epoch milliseconds), delay in minutes, cancellations and notices.", "effect": "read", "id": "mvg.de/get-departures", "keywords": [ "mvg", "abfahrten", "abfahrtsmonitor", "münchen", "munich", "u-bahn", "s-bahn", "tram", "bus", "departures", "next train", "live", "delay", "public transport" ], "output": { "schema": { "properties": { "departures": { "items": { "properties": { "cancelled": { "type": "boolean" }, "delay_min": { "description": "Only when MVG has live data for this departure", "type": [ "integer", "null" ] }, "direction": { "type": "string" }, "line": { "type": "string" }, "notices": { "items": { "type": "string" }, "type": "array" }, "planned_ms": { "type": "integer" }, "platform": { "type": [ "integer", "string", "null" ] }, "realtime": { "type": "boolean" }, "realtime_ms": { "type": [ "integer", "null" ] }, "type": { "type": "string" } }, "type": "object" }, "type": "array" }, "station": { "type": "string" } }, "type": "object" }, "value": "let $types = params.transport_types || `[\"UBAHN\", \"SBAHN\", \"TRAM\", \"BUS\", \"REGIONAL_BUS\", \"BAHN\"]`, $lim = params.limit || `10` in let $all = map(&{line: label, type: transportType, direction: destination, platform: platform || `null`, planned_ms: plannedDepartureTime, realtime_ms: realtimeDepartureTime || `null`, delay_min: (realtime == `true` && floor((realtimeDepartureTime - plannedDepartureTime) / `60000`)) || (realtime == `true` && `0`) || `null`, realtime: realtime == `true`, cancelled: cancelled == `true`, notices: (messages || `[]`)[].text}, steps.departures.list || `[]`)[?contains($types, type)] in {station: join(', ', [steps.stop.name, steps.stop.place]), departures: ($lim == `5` && $all[:5]) || ($lim == `20` && $all[:20]) || $all[:10]}" }, "params": { "additionalProperties": false, "properties": { "limit": { "default": 10, "enum": [ 5, 10, 20 ], "type": "integer" }, "station": { "description": "Stop name, e.g. 'Marienplatz', 'Ostbahnhof'", "maxLength": 80, "minLength": 2, "type": "string" }, "transport_types": { "default": [ "UBAHN", "SBAHN", "TRAM", "BUS", "REGIONAL_BUS", "BAHN" ], "items": { "enum": [ "UBAHN", "SBAHN", "TRAM", "BUS", "REGIONAL_BUS", "BAHN", "SCHIFF" ], "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "station" ], "type": "object" }, "provenance": { "method": "browser-inspect", "notes": "MVG's departure monitor calls www.mvg.de/api/bgw-pt/v3/locations?query= and /api/bgw-pt/v3/departures?globalId&limit&transportTypes. Times are epoch milliseconds (plannedDepartureTime, realtimeDepartureTime). Public JSON, answers servers; robots.txt allows everything.", "recorded_at": "2026-11-07T19:04:00+01:00", "recorded_by": "C4" }, "requires_login": false, "schema": "https://wield.run/schema/recipe/v1.json", "site": { "country": "DE", "id": "mvg.de", "language": "de", "name": "MVG (Munich public transport)", "origin": "https://www.mvg.de", "origins": [ "https://www.mvg.de" ] }, "steps": [ { "description": "MVG's stop search.", "expect": { "assert": "length(body[?type == 'STATION']) > `0`", "content_type": "json", "status": [ 200 ] }, "extract": { "json": { "id": "[?type == 'STATION'] | [0].globalId", "name": "[?type == 'STATION'] | [0].name", "place": "[?type == 'STATION'] | [0].place" } }, "id": "stop", "request": { "headers": { "Accept": "application/json" }, "method": "GET", "query": { "query": "{{params.station}}" }, "url": "/api/bgw-pt/v3/locations" } }, { "description": "MVG's departure monitor API. It applies limit before its (loose) transport-type filter, so the recipe asks for 40 and filters and cuts itself.", "expect": { "content_type": "json", "status": [ 200 ] }, "extract": { "json": { "list": "@" } }, "id": "departures", "request": { "headers": { "Accept": "application/json" }, "method": "GET", "query": { "globalId": "{{steps.stop.id}}", "limit": "40", "transportTypes": "{{params.transport_types | join:,}}" }, "url": "/api/bgw-pt/v3/departures" } } ], "task": "Show live departures at a Munich public transport stop", "tos": { "notes": "Two small requests per run, the same ones the MVG website makes.", "reviewed": false }, "verify": { "checks": [ "length(output.departures) > `3`", "output.departures[0].planned_ms > `1700000000000`", "length(output.departures[?line != `null`]) == length(output.departures)", "contains(output.station, 'Marienplatz')" ], "example_params": { "limit": 10, "station": "Marienplatz" }, "max_ms": 3000 }, "version": 1 }