Key takeaways
- Separate two data types: scheduled data describes the timetable, real-time data describes the deviation from it. Almost every project needs both – and linking them is the real work.
- GTFS is the standard to start with: a ZIP archive of CSV files that any spreadsheet can open and any programming language can read.
- Real time means GTFS-Realtime or SIRI: both are additional streams that reference an existing scheduled-timetable base – without that base they're worthless.
- Licence before code: openly available doesn't automatically mean freely usable. Attribution, redistribution and commercial use are governed differently for each dataset.
- Vehicle data is missing everywhere: no official interface tells you which class is running on a service. That layer of knowledge only comes from observation.
Contents
- 1.Open railway data: what data even exists
- 2.The data sources at a glance
- 3.Understanding GTFS: the five files that matter
- 4.From download to your own departure board
- 5.Connecting real-time data: what matters
- 6.Infrastructure data for photo locations and maps
- 7.Common mistakes in your own data projects
- 8.Conclusion
Updated: August 2026 – At some point the app just isn’t enough: you want your own departure board for the hallway monitor, an analysis of which classes pass through your local station, or a map with your favourite lines. This guide shows which open railway data exists, how current and how accessible it is – and how to turn a download into something of your own in a short time.
Data is half the job – sightings are the other half
What no interface delivers, you document yourself: vehicle, location, time. Traintrack turns that into your searchable archive.
Open railway data: what data even exists
Open railway data falls into three categories: scheduled data (the planned timetable), real-time data (the deviation from the plan) and infrastructure data (lines, operating points, stations). For timetables, GTFS has become the standard exchange format, for real time it’s GTFS-Realtime and SIRI, and for European standardisation it’s NeTEx.
The most important starting point is a national access point, through which mobility data in Germany is made centrally discoverable; on top of that, many transport associations and operators run their own data pages. The interface standards behind them come predominantly, in German-speaking countries, from the Association of German Transport Undertakings. Which datasets currently sit there and under which licence is decided by the providers themselves – and occasionally changed. Just how differently the transport associations handle this is shown by the real-time check of the transport associations.
The data sources at a glance
The following table sorts the common source types by what actually matters for a project: format, currency, access barrier and licence situation. Concrete licences always sit with the dataset itself – the column only describes what’s typical.
| Source type | Format | Typical currency | Access barrier | Licence situation |
|---|---|---|---|---|
| Nationwide scheduled dataset | GTFS, sometimes NeTEx | Updated daily to weekly | Download, usually no registration | open licence, usually with attribution |
| Transport-association scheduled data | GTFS | as above, sometimes maintained in finer detail | Association’s data page | varies by association |
| Real-time feeds | GTFS-Realtime, SIRI | Seconds to a few minutes | often registration required | often with terms of use |
| Operator interfaces | JSON, XML | close to the operations control system | Registration, sometimes quotas | provider-specific |
| Infrastructure from OpenStreetMap | Raw OSM data, vector tiles | ongoing, community-maintained | free, but needs processing | open data licence with share-alike |
| Station data | CSV, JSON | rare, planning-driven | mostly open | open licence, check the terms |
| Vehicle and sighting knowledge | Lists, forums, apps | ongoing, but incomplete | freely readable, barely machine-readable | copyright-protected, clarify use |
The last row is the decisive gap: everything to do with specific vehicles is completely missing from the official data streams. That’s exactly why communities exist – see the overview of live sightings in trainspotting.
Understanding GTFS: the five files that matter
A GTFS archive usually contains a dozen files, but to start with you only need five. They’re linked by IDs, like tables in a database.
- stops.txt – all stops with ID, name and coordinates. Your entry point when you’re thinking from a location.
- routes.txt – the routes with short name, long name and mode of transport. This is where you separate rail from bus and tram.
- trips.txt – the individual trips of a route, each with a direction and a reference to a calendar entry.
- stop_times.txt – by far the largest file: every arrival and departure of every trip at every stop. This is where the actual information sits.
- calendar.txt and calendar_dates.txt – which days of the week a trip runs on and which exceptions apply. Without these files, you’ll accidentally build a board that shows school buses on Sundays too.
Pro tip for your first attempt
Don't start with the nationwide dataset – use the smallest regional one you can find. The stop_times.txt file can have tens of millions of rows in large datasets – enough to make any spreadsheet program give up. With a city network, you learn the same structure in seconds instead of minutes.
From download to your own departure board
The fastest route to a visible result runs through six steps. Each one is small on its own – the trick is going through them in this order and not starting with real time.
1. Choose a dataset and read the licence
Terms of use first, download second. Note the required attribution straight into your project notes – nobody enjoys hunting for it afterwards.
2. Find the stop ID
Search for your station's name in stops.txt and note its stop_id. Watch out: large stations often have several IDs for platforms, tracks and the overarching area.
3. Filter departures
Filter all rows with that stop_id out of stop_times.txt and sort by departure_time. That's already a complete daily departure board.
4. Add routes and destinations
Link via trip_id to trips.txt and then via route_id to routes.txt. Only then does the time come with the route and destination attached.
5. Account for operating days
Check service_id against calendar.txt to see whether the trip runs at all today, and subtract exceptions from calendar_dates.txt.
6. Layer real time on top
Only now bring in the GTFS-Realtime feed. It provides the current deviation for known trip_ids – your scheduled time plus the delay gives you the live departure.
Data first, then reality
Check on the platform whether your board is right – and note straight away which vehicle actually turned up.
Connecting real-time data: what matters
Real-time feeds aren’t a standalone timetable, they’re a correction layer. GTFS-Realtime has three message types, and the differences are practically relevant:
- TripUpdate – delays, changed stops and cancelled trips. This is the type you need for a departure board.
- VehiclePosition – the current vehicle position. Only usable if the provider releases it; noticeably rarer for rail services than for buses.
- Alert – disruption and diversion messages as free text, linked to affected routes or stations.
Two pitfalls show up in almost every project. First: IDs have to match up. A real-time feed references trips from a specific scheduled dataset. If you mix a feed and a timetable from different sources, you’ll find no matches. Second: respect the query frequency. A feed that’s regenerated every 30 seconds doesn’t need to be queried more often – more frequent access doesn’t give you better data, it just costs quota.
How much data quality and presentation can differ becomes obvious the moment you compare it with finished tools. The comparison of live train radar tools shows how differently others process the same raw data, and the guide to tracking DB train numbers explains how to cleanly identify a single service.
Infrastructure data for photo locations and maps
For spotters, it’s often not the timetable that’s interesting, but the line itself. Here, community projects based on OpenStreetMap provide the most practical foundation: track layouts, electrification, line numbers, operating points and sometimes signals are mapped there and can be added as a map layer.
Three notes on that:
- Completeness isn’t guaranteed. Community maps are good, but not official. That’s enough for location planning, not for operational statements.
- Respect share-alike. Open map data is often licensed in a way that requires derived databases to be opened up again. For a map on your own website, an attribution note is usually enough; anyone processing the data further should look more closely.
- Check accessibility. A map shows tracks, but not rights of access. Track areas and operational railway land remain strictly off-limits – every location must be reachable from publicly accessible ground.
If you want to publish your own data along with a map, the technical implementation is covered in the guide to building your own spotter website. And when it’s about historical images rather than live data, it’s worth looking at the railway archive with historical railway photos.
Common mistakes in your own data projects
- Starting with real time. Without a working scheduled-data base, the real-time feed has nothing to reference. Timetable first, correction second.
- Ignoring operating days. A board without a calendar check shows trips that don’t run that day at all – the most common beginner mistake of them all.
- Confusing time zones and operating days. GTFS allows times past 24:00, such as 25:10 for a trip after midnight. Parse that naively and you lose the night services.
- Leaving out licence notices. Attribution is the rule for open data, not the exception. A sentence in the imprint costs nothing.
- Inferring vehicles from trip data. A train number tells you something about the category and route, but nothing about the class deployed. How much a number actually reveals is explained in the article on decoding train numbers.
- Overlooking tunnel and special services. Underground lines follow their own positioning principles, as the article on tracking underground trains in tunnels shows – vehicle positions are especially often missing there.
Conclusion
Open railway data is more accessible than most people assume: a GTFS archive and a spreadsheet program are enough for the first visible result, and the step up to real time is manageable after that. The real effort isn’t in the download, it’s in the care taken – with operating days, IDs and licences. And one limit remains no matter how skilled you are technically: no feed will tell you which vehicle is actually running.
In short
Start small with a regional GTFS dataset, build a static departure board and only layer real time on top once the base is solid. For anything vehicle-related, you need a second, human data source.
Summary
- The article sorts the available data sources by format, currency, access barrier and licence type.
- It shows how GTFS is structured and which files you actually need for a simple departure board.
- It explains the role of the national access point and why transport associations still run their own portals.
- And it names the limits: what open data can't provide by its very nature, and where community knowledge takes over.
Frequently asked questions
What is GTFS?
GTFS stands for General Transit Feed Specification and is the most widely used format for timetable data worldwide. A GTFS dataset is a ZIP archive with several CSV files describing stops, routes, trips, departure times and calendars. Because it's plain CSV, you can process it without any special software.
Where can I get timetable data for Germany?
Germany runs a national access point for mobility data, through which timetable datasets can be found centrally. In addition, many transport associations and individual operators provide their own open-data pages, sometimes with finer-grained or more current data for their area. Which datasets are currently available and under what conditions is always stated by the respective provider.
What's the difference between GTFS and GTFS-Realtime?
GTFS describes the planned timetable and only changes at a timetable change or for engineering-works schedules. GTFS-Realtime is a separate, continuously updated data stream with three message types: delays and trip changes, vehicle positions and disruption alerts. The two belong together – the real-time message references the trips in the scheduled dataset via IDs.
Do I need an API key for railway data?
That depends on the provider. Plain downloads of timetable datasets are often possible without registration. For real-time interfaces that get queried continuously, many providers require registration so they can attribute and limit access. Check the access terms of the specific offering before you build your project on it.
Can I use open railway data in my own app?
In principle yes, if the dataset's licence allows it – open licences requiring attribution of the data source are common. Some datasets exclude commercial use or require additional agreements. Because conditions can change, the licence file accompanying the dataset itself is authoritative; when in doubt, it's worth a quick query to the provider.
What data is there on railway infrastructure?
For lines, operating points, signals and stations there are both official publications and community projects based on OpenStreetMap. The latter are often mapped in more detail, but come with no guarantee of completeness. For planning photo locations, they're nonetheless usually the most practical source.
Can open data tell me which locomotive is hauling a train?
No. Public interfaces work at the level of the trip: train number, line, stops, delay. Class, running number or carriage formation are either not included at all or only as a rough train category. Vehicle-specific knowledge comes from observation and is shared within spotter communities.
What's the best way for a beginner to get started?
Download a GTFS dataset for your region and open the stop_times.txt file in a spreadsheet program. Look up a stop in stops.txt, note its ID and filter by it. That gives you a static departure board in ten minutes. Only once that's working does it pay off to move on to real-time data.
Read more in Platforms & alternatives
- The Best Bahnbilder.de Alternatives 2026: Platforms, Apps and Communities for Train Photos
- Train Photo Platforms Compared: Where Is It Worth Uploading?
- Bus Spotter Online: The Ultimate Guide to Bus Photography, Community & Tools
- Bus Spotter Website: The Comprehensive 2026 Guide – Platforms, Tools, Photo Tips and Legal Pointers
- The Best Strategies for Finding Stored Locomotives on Drehscheibe Online: Lists, Search Tips and Practical Advice
- Understanding and Making the Most of the Drehscheibe Online (DSO) General Forum: Rules, Tips and Search Tricks
Who is behind it
Groups, brands, manufacturers and operators – who owns whom and how to recognise them out in the field.
Banverket
Banverket managed Sweden's rail network from 1988 to 2010 and was one of the first organisations in Europe to consistently separate infrastructure from train operation. The authority no longer exists – but its name is still visible on lineside equipment to this day.
InfrastructureVerband Deutscher Verkehrsunternehmen (VDV)
The VDV is the trade association of transport operators in Germany. It doesn't run a single service or own a single vehicle, but through its technical codes and data standards it shapes how vehicles are built, how tickets are read and how departure times are transmitted.
You might also like
Regional transport authorities: how to find live departures by station
How to find the right live departure board in every transport authority area – from the VVS to the HVV, including tips for spotting trips.
Train tracking & train radarLive Tracking for Trains & Buses: The Best Apps, Tools & Tips for Precise Train and Bus Tracking
Maps, radar & live toolsLive Train Radar: The Best Tools and Maps Compared (2026)
Which train radar really shows live positions? An honest comparison of map tools for passenger and freight trains – including their limits and practical tips.




