Transport for The Netherlands
APIOfficial Nederlandse Spoorwegen (NS) Train Data API
Overview
The Transport for The Netherlands (NS) API provides access to official Dutch train data, including real-time timetables, journey planning, station details, and disruption updates. Key endpoints include /ns-api-stations (station list), /ns-api-avt (arrivals/departures), and /ns-api-treinplanner (route planning). Responses are in XML format. Ideal for developers building apps to help users plan train journeys, track real-time statuses, receive delay notifications, or integrate station info into tools—focused exclusively on NS train services.
Example Integration (JavaScript)
fetch('http://www.ns.nl/reisinformatie/ns-api')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err)); Key Features
- Real-time train timetables
- Journey planning
- Station information
- Disruption alerts
- XML response support
Frequently Asked Questions
? Is the Transport for The Netherlands API free to use?
Yes, it is free for non-commercial purposes. Commercial usage requires a separate license agreement with Nederlandse Spoorwegen (NS).
? Does it require an API Key?
Yes, you must register on the NS developer platform to obtain a valid API key before accessing any endpoints.
? What is the response format?
The API exclusively returns data in XML format; JSON is not supported at this time.
Top Alternatives
People Also Ask about Transport for The Netherlands
Tool Info
Pros
- ⊕ Official NS data source
- ⊕ Free non-commercial access
- ⊕ Comprehensive journey details
- ⊕ Real-time delay updates
Cons
- ⊖ XML-only responses
- ⊖ Requires API key registration
- ⊖ Limited to train services
- ⊖ Non-commercial use restriction