● Travel Never Stops. Neither Do We. 365 Days a Year.

Train Search API: Places, Timetables and Fare Offers

Plan train search API with TravelTech365. Review provider access, supported workflows, data mapping, testing and production support.

Traveler checking a map inside a railway station

Show the difference between a train someone can find and a fare they can buy

A train search API connects journey discovery to current selling options. It should tell the traveler which stations are being used, when the planned trains run, and whether an approved operator or distributor has returned a fare for the selected leg. Those facts can come from distinct suppliers, transit feeds and commercial contracts. Search is easier to trust when the interface keeps their sources and current states visible instead of making every timetable entry appear bookable.

Consider an online travel agency offering long-distance rail alongside other services. It can recognize a station, assemble scheduled journeys, and find an offer on one of them while another partner is temporarily unavailable. The traveler should still have a useful route comparison and a precise message about the unavailable options. Good integration design starts by defining what each returned result proves, then applies those rules to pricing, checkout handoff and customer support.

Resolve origins and destinations before shopping for fares

Station resolution is a separate task from typing a city name. A city can refer to a collection of stations, an airport rail stop, a suburban terminal or an unofficial user-entered alias. Normalize spelling and diacritics for lookup, then present a clear choice of candidate stations. Retain the supplier's station code behind the chosen display value so the scheduled path and commercial request use the intended place.

Give each canonical place an internal identifier and a table of documented provider references. Keep short names, official names and alternate labels for search display where your source licences permit it. Assign each mapping a status, review history and owning team so an ambiguous import can be held. Geographic proximity can guide human review, but it should not automatically merge two stations on different rail networks. A customer could arrive at the wrong station even when its name and city look completely plausible.

Keep a clear mapping between area searches and individual stops. A search for all stations in a city can expand to one defined station group and still tell the traveler which station each journey departs from. A station-specific search should preserve that explicit choice when the same result is used for repricing or handing off to sales. A nearby departure may be a reasonable alternate option, displayed separately and labeled as such.

The OSDM requirements provide useful details for understanding place references and interoperable rail distribution. Verify the exact reference syntax and supported coverage with the commercial provider for your account. A search implementation's place catalogue can support some standard references and rely on an explicit mapping for other stops, without implying that every supported station can be sold on every channel.

Represent operating days without losing calendar dates

Rail distribution requires more than sorting times labeled 12-hour or 24-hour. The service can belong to one operating day while a following stop time falls after midnight. A timetable can describe its service day consistently using an extended hour, but the traveler needs the corresponding local calendar date. Preserving both sets of details also helps your support team explain why the train was found under one search date and arrives on the next.

The GTFS Schedule reference defines fields for trips, services, stop times, dates and provider information. Its frequency and scheduling data support discovery where the publisher supplies them. An authorized timetable is still a different source from a commercial fare inventory. Use your appropriate supplier rules for reservations, ticket conditions and actual availability.

Do not load a service calendar by testing one weekday repeat alone. Apply explicit exception ranges and included or excluded dates with the feed's documented convention. A reasonable acceptance set includes a weekend closure, a holiday extra service, a replacement bus, an operating day with no configured timetable, and an overnight departure that appears after 24:00 in the feed. Keep the schedule feed revision visible in diagnostic records so an operator can reproduce what the search knew at that time.

Store local departure and arrival with each applicable stop zone and the corresponding machine-comparable time under the agency's supported conversion rules. In international rail, the two stations can use different zones. During a change to or from daylight saving time, a local time can be ambiguous or skipped. Test a named local zone and actual operating calendar rather than assuming that all trains on a route share one UTC offset throughout the year.

Train approaching a regional station platform

Work through the East Junction search fixture

In fictional case RAIL-1502, a traveler chooses East Junction for an overnight leg to North Quay. The text box presents East Junction Main and East Junction Airport Terminal, each with recognizably distinct labels. She chooses the main station, and the platform preserves the supplier mapping EAST-MAIN. The next screen shows Saturday 00:15 at departure and Saturday 02:05 at arrival, while the operational service day in the timetable remains Friday with a departure value of 24:15.

The timetable supplies two departure candidates. The first is direct and maps to a sellable offer returned by an approved partner for EUR 46. An optional seat reservation costs EUR 8, for EUR 54 if selected. The provider supporting the second candidate provides schedule detail but no buyable fare for this request. The application shows the second journey with its schedule label and no Buy button. This preserves a meaningful alternative for comparison without implying that a confirmed price or reservation is available.

Change the fixture by making the second provider attempt time out. A provider timeout should produce a partial search result indicator. It is evidence of a check the application could not finish, which differs from an authoritative result indicating zero offers under the agreed query. The direct EUR 46 result remains useful while valid. A retry of the unavailable provider should reuse the intended place, passenger and service constraints rather than silently expediting a different search.

In another variant, the EUR 46 offer expires as the traveler compares it with a bus itinerary. When the traveler continues, the app requests a current offer through the configured path. The returned option costs EUR 49 with otherwise equivalent fictional conditions. The user sees the changed fare, any applicable seat cost and conditions, and confirms the new selection before any booking action. No automatic purchase follows from a stale result or a timetabled departure appearing available.

RAIL-1502 train search and offer acceptance checks
Search evidenceTraveler resultRequired next action
Two East Junction station matchesMain and Airport Terminal shown distinctlyUse explicit station choice before fetching offers
Friday service time 24:15Saturday 00:15 departure and Saturday arrivalRetain Friday service day for provider context
Live EUR 46 fare and optional EUR 8 seatEUR 46 base and an explained optional selectionShow applicable conditions and current offer validity
Journey available in timetable onlyPlan visible with no purchase actionWait for actual offer or use an approved alternative
Second supplier times outResults marked partialTrack a bounded supplier retry if supported
Old fare expires, replacement at EUR 49Refreshed details before sales handoffRequest acceptance of price and any condition change

Normalize search inputs to the trip the traveler meant

Build a request model that can represent a single passenger or a party. Age or date-of-birth requirements, discount card eligibility, class preference, travel zones, and operator rules can affect options. Collect only the inputs needed by the approved search path and explain why a fare may depend on them. A partner that cannot sell a selected discount should not be represented as quoting the same product as a partner that accepts it.

Set explicit limits for departure and arrival windows, legs, modes, accessibility assumptions, and connection preferences. A journey planner can reasonably return candidate paths through multiple operators, but a shopping response should show if the entire route is quoted, only certain legs are quoted, or tickets would have to be purchased separately. Two overlapping timetables establish a possible schedule, while an actual through fare or connection protection needs provider-backed evidence.

Ask the agency which ticket presentation it wants when multiple journeys are eligible. The fastest train, the least expensive valid offer, and a later service with more flexible cancellation can all be useful as different options. Design ranking around the actual returned fare and conditions instead of creating a synthetic base price by blending fares from unrelated providers. Preserve taxes, charges, ancillary choices and currency as the supplier documented under the commercial arrangement.

Build a separate workflow for unknown or ineligible search inputs. If a requested station has no authorized mapping, tell the traveler why the exact trip could not be checked and present candidates only when valid. A pricing gap is different from a station lookup problem. In dealer portals, supply the corresponding normalized status together with the provider's permitted reason code for trained operators to investigate.

Keep commercial offers tied to the request that produced them

Use the OSDM process guide to understand how trip search and offers fit alongside later booking and fulfillment phases. Adapt only the parts documented for the contracted supplier. Search responses can include several linked components, including an admission and a reservation or other fare detail. Preserve their identifiers and suitability rules when ranking, comparing and forwarding an offer for the next stage.

Retain a commercial snapshot containing source, currency, quote time, returned condition fragments the selling flow relies on, passenger mix, selected origin and destination, and expiry where supplied. Present whether a reserved seat is required, included, or optionally purchasable when the provider reliably defines the relationship. The route fare's stated flexibility or entitlement can also differ from a separately purchased seat supplement. Inform the traveler using the verified wording or data rules approved for display.

Give price displays a clear scope. In the RAIL-1502 fixture, an optional seat brings the displayed price from EUR 46 to EUR 54 only after selection. The consumer should understand if another fee, tax, or separate payment applies before continuing. Use provider currency and compare ranges carefully after any documented platform conversion. The integration should avoid describing a single-person quote as a total for two travelers.

Speed and freshness need separate measures. You can keep a versioned timetable in a discovery cache when the agreement permits it. On the offer side, key results to defined commercial factors and limit any cached selection to the supplier's allowed freshness. If scheduled service changes, purge or revisit relevant combinations according to their impact. An offer that has timed out or expired needs a documented refresh or a new selection before committing to later operations.

Respond cleanly when an independent supplier fails

Set a time budget for each provider, assign retry behavior by failure category, and define a maximum time the combined search waits for any remaining supplier. Offer useful confirmed results where appropriate, mark an incomplete exploration visibly, and avoid declaring a journey fully sold out based on an unresponsive partner. A healthy second source may return a materially different product, which remains a separate option under its own rules.

Protect supplier limits by collapsing equivalent concurrent work where contract and security rules allow. A controlled cache of allowed responses can make a popular calendar search more efficient. Different passenger conditions should remain distinct where they influence fares. Review which fields and data are permitted to be cached, purge protected information when required, and ensure an agency's contracted rates never leak into another seller's profile.

Give operators clear purpose-built search diagnostics. One view can summarize volume and response time per provider; a second restricted view can explain one failed request with the selected station mapping version, accepted passenger category, query window and provider-friendly trace. Avoid leaking sensitive raw messages to the traveler. Use authorized ticketing support processes when the underlying provider can confirm why a journey is not offered.

Consider how any changed timetable links to fares. In a fictional test, the direct departure is moved from 00:15 to 00:40 while an older EUR 46 fare remains visible in a previous browser session. The provider's documented recheck behavior should determine whether the offer is still valid or the user must select a new option. A new timetable cannot safely replace the presented terms in an open checkout simply by changing a label in cached HTML.

Build an acceptance plan for realistic stations and journeys

Start with place fixtures that include similarly named stations, multilingual aliases, station groups, duplicate names, obsolete codes and invalid mappings. Confirm that a traveler can reach the intended route with a keyboard or touch interface. The absence of an invented supplier code should produce a useful retry option only if an alternative area or station choice has been configured. Test the selected application output and the exact provider request under each scenario.

For timetable consistency, test an operating day past midnight, timezone transition, complete or partial route diversion, and exception calendar. Include a station platform change and a journey with a bus replacement where the source supplies those details. Verify that availability can be evaluated separately from schedule data without automatically changing labels from rail to a price-bearing mixed-mode itinerary.

Then prove commercial accuracy: zero results from a successful search, partial data after an error, traveler category without approved discounts, passenger count variation, incidental costs, optional and mandatory reservation, expired offer and alternative service. Compare the displayed currency with the original offer, and ensure availability indicators never claim more than the provider returned. For proposed connections, inspect whether the supplied product actually covers all legs before labeling it as a complete fare.

For search-to-checkout handoff, require the receiving step to recognize the snapshot's identifiers, fare scope, selected passenger categories and validity. An agent reopening a trip later should be able to distinguish the last shown offer from one found on a new search. After expiry, test that a refresh asks for current availability and communicates any returned changes before the booking request goes forward.

Prepare provider onboarding and operating support

Ask each supplier about its product coverage, eligible markets, place identifiers, documentation version, sandbox capabilities, offer expiry behavior and agreed request limits. A developer can map these rules and run schedule and offer tests. The provider and account owner control credentials and production eligibility. Confirm that commercial agreements allow the intended shopper, sales territory and method of displaying the underlying schedules or branding.

Choose monitoring measures that answer operational questions. Examples are unmatched station searches per catalogue release, fare availability by provider request type, completed searches versus timeouts, schedule freshness, number of expired offers sent for recheck, and counts of empty versus partial results. Review trends with actual search examples. If only new aliases return empty results, the place-mapping owner is likely the person to investigate before the fares owner requests provider changes.

Launch with a sample of actual supported journeys that the provider and the agency can validate, alongside fictional tests for edge cases. Start with date boundaries, disruptions known to affect interpretation, and station groups consumers use often. A release review should show what shoppers can do during a supplier outage and which records the team retains to establish whether a published result was accurate at the time it was offered.

TravelTech365 can scope the work across place resolution, timetable ingestion, approved rail shopping providers, and the consumer's selection experience. Share an anonymized example of an origin group, the planned operating day, a sample commercial fare response the account can use, and how the agency wants to describe unavailable results. A focused first demonstration makes the consumer choose the right East Junction station and shows exactly what a EUR 46 rail fare includes before the purchase path begins.

Show agency teams how to investigate a misleading search result

Suppose sales staff report that an overnight journey vanished on the mobile site although they can see it in timetable data. Begin by reproducing the consumer's typed place and selected station, date selection, party composition and allowed sales territory. Confirm the station mapping before asking whether a new rate has been loaded. If the planned trip belongs to Friday 24:15, verify that both the timetable display and the provider query use the appropriate companion date labels for their interfaces. A disagreement on technical service date can look like a commercial coverage gap from the outside.

With the mapping and calendar confirmed, inspect the search result stage by stage. Did journey discovery return the expected stops? Was a commercial request issued under the right terms? Did the distributor finish its check, report no available inventory, or return a fare whose passenger or route constraint made it unsuitable? Each answer implies a distinct explanation in the application. Support should be able to reproduce that decision without opening unrestricted supplier payloads.

Document what a traveler will see when a result changes. A service moved from one station to another should explain which new origin was returned and obtain a new selection where needed. A fare with a moved departure time should be compared to the prior schedule and validated under the current provider rules. If the agency can sell a connected itinerary, state whether all components come from a single product. People who rely on the same itinerary to plan the rest of their trip need that distinction to make their own booking decision.

For ongoing quality review, sample individual journeys rather than judging the application only by shopping conversion. Compare the selected place, local date, commercial query and selling option with the documented source. Ask support to flag cases where copy implied one ticket covered separate legs or where a near-match station looked selectable as the intended place. Use those examples to refine result labels and acceptance fixtures for upcoming timetable releases.

Make any integration limits observable to the agency's own merchandising team. A product editor creating a page about East Junction should know which station group is supported, which markets can see an offer, and which entries are timetables only. When an editor links to a prefilled search, verify that its station codes and date behavior agree with the standard customer journey. This prevents marketing links from generating technically valid but misleading searches.