Search train solutions (SSE stream)

Initiate a train search and stream normalised solutions back as Server-Sent Events. Each data: event is a JSON-encoded train solution object. The stream ends with event: done.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

POST body for /v1/trains/search.

itinerary
array of objects
required
length ≥ 1

One leg for one-way, two for round-trip, more for multi-leg.

Itinerary*
passengers
object

Passenger type counts.

enum

Preferred travel class. Fares not matching this class are suppressed by Mercury when travelClass is also provided to /trains/fares.

enum

Booking profile context. personal for non-business bookings, business for business bookings.

Responses

401

Missing or invalid authentication

422

Invalid search parameters

503

Train search provider unavailable

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here!