Transport for The Netherlands

API

Official Nederlandse Spoorwegen (NS) Train Data API

Visit Website

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)

script.js JS

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

OV Info API (covers all Dutch public transport) Search Google

People Also Ask about Transport for The Netherlands

Transport for The Netherlands vs OV Info API (covers all Dutch public transport) Transport for The Netherlands 2025 review

Tool Info

Pricing Free (Non-commercial)
Category Transportation
Platform Public API

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

More Transportation Tools