v51

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-012281206.0 KB
timetable

Get the next N departures or arrivals of a stop sorted by time

get/api/v6/stoptimes

Query parameters

stopIdstring

stop id of the stop to retrieve departures/arrivals for

centerstring

Anchor coordinate. Format: latitude,longitude pair. Used as fallback when stopId is missing or can't be found. If both are provided and stopId resolves, stopId is used. If stopId does not resolve, center is used instead. radius is required when querying by "center" (i.e. without a valid stopId). This can be used to hedge against changing stopIds. Use with a small radius and exactRadius=false to still only return the original stop and stops that MOTIS considers equivalent (parent/children or due to similar name, even outside the radius).

timestring date-time

Optional. Defaults to the current time.

arriveByboolean

Optional. Default is false.

  • arriveBy=true: the parameters date and time refer to the arrival time
  • arriveBy=false: the parameters date and time refer to the departure time
bothboolean

Optional. Default is false. If set to true, returns both arrivals and departures, ignoring arriveBy.

direction'EARLIER' | 'LATER'

This parameter will be ignored in case pageCursor is set.

Optional. Default is

  • LATER for arriveBy=false
  • EARLIER for arriveBy=true

The response will contain the next n arrivals / departures in case EARLIER is selected and the previous n arrivals / departures if LATER is selected.

windowinteger

Optional. Window in seconds around time. Limiting the response to those that are at most window seconds aways in time. If both n and window are set, it uses whichever returns more.

modeMode[]

Optional. Default is all transit modes.

Only return arrivals/departures of the given modes.

ninteger

Minimum number of events to return. If both n and window are provided, the API uses whichever returns more events.

radiusinteger

Optional. Radius in meters.

Default is that only stop times of the parent of the stop itself and all stops with a similar name (+ their child stops) are returned.

If set, all stops at parent stations and their child stops in the specified radius are returned.

exactRadiusboolean

Optional. Default is false.

If set to true, only stations that are phyiscally in the radius are considered. If set to false, additionally to the stations in the radius, equivalences with a similar name and children are considered. Use exactRadius=true with radius=0 if you really only want to get events for the given stopId (platform or bay) and nothing from stops considered equivalent.

fetchStopsboolean

Experimental. Expect unannounced breaking changes (without version bumps).

Optional. Default is false. If set to true, the following stops are returned for departures and the previous stops are returned for arrivals.

pageCursorstring

Use the cursor to go to the next "page" of stop times. Copy the cursor from the last response and keep the original request as is. This will enable you to search for stop times in the next or previous time-window.

withScheduledSkippedStopsboolean

Optional. Include stoptimes where passengers can not alight/board according to schedule.

realtimeMode'OFF' | 'REALTIME_ANNOTATION_ONLY' | 'REALTIME'

Controls whether realtime data (delays, cancellations, added/changed trips) is used.

  • REALTIME: use realtime data for routing/sorting.
  • REALTIME_ANNOTATION_ONLY: route, sort and window on the scheduled timetable only, but still annotate the response with realtime data.
  • OFF: use the scheduled timetable only, with no realtime annotation.

Optional. Default is REALTIME.

Controls whether realtime data is used.

  • REALTIME: realtime data (delays, cancellations) is used stop times are returned and sorted by their realtime time.
  • REALTIME_ANNOTATION_ONLY: stop times are returned, windowed and sorted by their planned time, but each stop time is annotated with realtime data.
  • OFF: only scheduled data is used; stop times are returned and sorted by their planned time, with no realtime annotation.
languagestring[]

language tags as used in OpenStreetMap / GTFS (usually BCP-47 / ISO 639-1, or ISO 639-2 if there's no ISO 639-1)

withAlertsboolean

Optional. Default is true. If set to false, alerts are omitted in the metadata of place for all stopTimes.

Response

A list of departures/arrivals

previousPageCursorstring required

Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page. The previous page is a set of stop times BEFORE the first stop time in the result.

nextPageCursorstring required

Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page. The next page is a set of stop times AFTER the last stop time in this result.