The NS API
NS manages a large quantity of data consisting of information about planned and current timetables. We are more than happy to share these data with developers using a REST API.
The NS API currently features the following services:
- Current departure times
- Disruptions and engineering work
- The station list, with all stations in the Netherlands including Geodata
- Travel recommendations from station to station
A maximum of 50,000 requests per day can be made for each service. A service will stop working after 50,000 requests.
More information about the NS API
The web-service for prices can be used to request price information for a train journey.
Documentation: up to date departure times
The web-service for up to date departure times allows users to request an up to date overview for a station which shows all departing trains for the next hour.
Documentation: disruptions and engineering work
The webservice for disruptions and engineering work allows you to request information about disruptions and/or engineering work.
Documentation: station list
The webservice for the station list allows you to request the names of all of the stations. The express purpose of this service is that the users can cache the response for a limited time in order to realise auto-complete in a functional manner.
Documentation: travel recommendations
The web-service for travel recommendations can be used to employ the NS Travel planner for a train journey from one station to another. A travel recommendation consists of multiple travel options, so that the passenger can make a choice. A travel recommendation includes both planned and up to date information.
Conditions for use NS API
NS has set some conditions for using the API.