Trains

The Trains widget will display arrival, departure and disruptions data for all train stations in The Netherlands. For this widget a NS accountopen in new window is required.

Currently only working with public transport in The Netherlands. Do you know a datasource or open API for other countries? Let us know and we might add the functionality.

Screenshot

Trains WidgetTrains Widget

Functionality

The Trains widget has the following functionality:

  • Choose Station from list of known NS Stations
  • Display arrivals on a station
  • Display departures from a station
  • Display disruptions around a station
  • Filter departure station to show commute

How to use

  1. Create an account at NS API Portalopen in new window. Select the option "Externe Bezoeker".

  2. Click "Sign Up Now" in order to start creating an account.

  3. Provide the details and verify your email address.

  4. Navigate to the Product Pageopen in new window.

  5. Select the "NS-App" product and click "Abonneren" (subscribe). If you want you can specify a name, this is option and you can leave this as "NS-App"

  6. Click on "Bevestigen". The page will now redirect to your profile where you can see your keys.

  7. Click on "weergeven" under "Primaire Sleuten" and copy the API Key.

  8. Provide (paste) the key in the Trains Widget.

Configuration

The following configuration options are available for this widget.

SettingDescription
Widget TitleWidget header title
API KeySpecify the API Key from NS API Portaalopen in new window
Station NameAfter provided a valid API Key this list will display all stations. Use the search to typeahead and select the station. Please note: first save the widget after providing the API Key.
Show ArrivalsToggle on this option to show the arrivals
Show DeparturesToggle on this option to show the departures
Show DisruptionsToggle on this option to show the disruptions
Arrivals LimitLimit the amount of items to be displayed for arrivals
Departures LimitLimit the amount of items to be displayed for departures
Stations FilterSpecify a station (name) to show this station in the departures list
Show IconsToggle on this option to show the icons in the lists
IntervalSpecify the interval in between the widget will poll for new data.

All other configuration settings are explained here.