Everyday journeys
Leave now
Section titled “Leave now”Search from Utrecht Centraal to Utrecht Science Park. Choose Depart at, select the current time and press Search.
const request = { fromPlace: '52.0894,5.1102', toPlace: '52.0925,5.1813', timestamp: new Date().toISOString(), arriveBy: false, timeSlack: 0};Arrive by 09:00
Section titled “Arrive by 09:00”Choose Arrive by and set tomorrow at 09:00. In the API, send arriveBy: true with that time in timestamp. Set timeSlack: 0 to use the requested time directly.
Make the journey more comfortable
Section titled “Make the journey more comfortable”Add these preferences to your request:
{ "lessWalking": true, "userPreferences": { "walkingSpeed": "SLOW" }, "transferSlack": 120}This uses a slower walking pace and allows two extra minutes to transfer. Compare the walking time and transfers in the returned journeys.
Choose your transit modes
Section titled “Choose your transit modes”To look for a journey using bus, tram or metro instead of train, add:
{ "excludeModes": ["RAIL"] }The debug UI offers the same choice under Excluded Transit Modes.
An arrival-time search from Utrecht Centraal to Science Park, with the requested time and returned journey options.