department-for-transport-BODS / bods

Bus Open Data Service
36 stars 7 forks source link

How to programmatically retrieve bus stop & line/route data? #577

Open asmith26 opened 11 months ago

asmith26 commented 11 months ago

Hi there, I'm creating an app to help people find the right bus they need.

I'm trying to display a map with bus stops and line routes, is there a way I can retrieve this data in GTFS format via the API? It looks like the Timetable data is probably what I am after (ideally I can retrieve this data in GTFS format via the API).

Many thanks for any help!

SamAllwood commented 2 weeks ago

Hi, did you ever find if there’s a way you can get the GTFS data from BODS via API?

We can download the transxchange dataset and convert, but that seems a little less reliable as the BODS to publish the GTFS timetable data themselves, though not through the API.

asmith26 commented 2 weeks ago

Hi @SamAllwood , unfortunately I never figured it out. Would be interested to learn how to do this if you learn though. Thanks

jclgoodwin commented 2 weeks ago

It's not the API as such, but the download links here all work without authentication and can be used programmatically: https://data.bus-data.dft.gov.uk/timetable/download/gtfs-file/all/ https://data.bus-data.dft.gov.uk/timetable/download/gtfs-file/north_east/ https://data.bus-data.dft.gov.uk/timetable/download/gtfs-file/east_anglia/ https://data.bus-data.dft.gov.uk/timetable/download/gtfs-file/england/ https://data.bus-data.dft.gov.uk/timetable/download/gtfs-file/wales/ etc.

SamAllwood commented 1 week ago

Unfortunately the GTFS-RT basis of the AVL data isn’t any good, and the SIRI-VM AVL data has different route numbers to the GTFS timetable feeds.