views:

1343

answers:

6

Hi guys, im wondering if there is any online service who provide API about the train timetables (arrivals, departure, etch..), at least for the european stations.

I know www.bahn.de, who provide the accurated timetables for many european countries, but i didin't find any similar to a api service.

My goal (well, just a future-project) is to develope an application like gmaps, but instead of giving the car-trip i would like to give the train-trip.. you know, the user set the departure day, time and station, then the first arrival, maybe then add another one, and so on.

So, there is something like, that can be queryed by php/python/javascript?

Edit: if can help, im wondering to build a service to plan an inter-rail trip! (and any help will be really appreciate)

Im stuck. Google's public-service api rely on the information that every local company makes avaiable, much branches are missing (for example, is almost impossible to use it to build an itinerary that touches two or more regions of Europe. As i said before, the only service that i know doing it good is the bahn.de, they really have all the data.. but no api. I tryed to parse theyre result page (in order to use them as API), but seem like the markup is been build exactly to avoid that.. maybe they have business plans behind that or whatever, but i dont think they will ever release some API.. so, my project is going on without this function (p.s: my project is about non-profit cultural organizations, we wont make war to anyone ;P)

@El Goorf: if you find a way, and consider the idea of sharing it, count on my hand if need help!

+1  A: 

Something in a common format like Google Transit Feed?, there are some US based ones, as well as one I found for London.

garrow
Yes, something like GTF but worldwide -or at least- to the europe...Well, seem like google is 'waiting' that the public agency give he the data, so should be just a matter of time.
DaNieL
+2  A: 

FYI. National Rail in the UK don't provide an API for their UK train data and get very funny about developers calling forms/scraping pages from third party apps. It's a very strange closed model. Google or the BBC might be your best bet, although the BBC provide travel information as opposed to time tables.

andrewdotcom
Frankly the UK train system in it's entirety is a very strange closed model, and that's the family friendly version.
annakata
@annakata: LOL! +1
Pekka
+1  A: 

Unfortunately, as far as I know there is no publicly-available timetable data in Europe so far. As garrow pointed out above, many agencies in the U.S., Australia, and Canada have taken the lead in making this information available to developers, but other parts of the world haven't yet followed suit. I recommend following the Transit Developers group and the OpenStreetMap talk-transit list, as those are the places where developers are most likely to discuss new data releases.

Joe Hughes
For the europe, the website bahn.de seem to have the traintable for the 90% of europe (in my case, italy, the bahn.de timetables are more accurate then the trenitalia.it timetables -.-)...So there must be something outta here even for europe.. i've tryed to contact bahn.de, but no answer..
DaNieL
A: 

Daniel, have you had any luck yet? I came across this thread on google, it seems you and I have very similar idea for a web project. How's yours progressing? maybe in years to come we'll be ultimate rivals of the travel planning application :P

PS, I was thinking of a similar project for travelling in Japan, as i went there in summer. Their public and private train networks both seem to have API's, but the information is in japanese :(

El Goorf
I updated my answer ;)
DaNieL
DaNieL, is there a way i can give you my email address without everyone seeing? I'm new to this tsite (signed up just to reply to this thread :P)
El Goorf
@El Goorf: dont know, but i give it here: daniele.pignedoli gmail com... google save me from spam ;)
DaNieL
A: 

You could check http://www.hafas.de as they provide the software and information bahn.de is using. However, I doubt that they provide you any access for free.

zerm
hafas seem the company who developed the software and that provide the service.. but the traintables data should (afaik) belongs to the 'customers' (bahn.de for example)Obviously, they wont give me nothing for free; That's ironic, becose if the project would go on, it would probably increase the train ticket sells.
DaNieL
+2  A: 

Not exactly what you're looking for, but have you looked at http://www.livedepartureboards.co.uk/ldbws/? It is an API for the UK railways... but for arrivals and departures only, not planning more than a couple of hours in advance!

Still, it's a start!

John Smith