National Public Transport Data Repository data

·

To get the full list of stops for every UK bus route, you can ask the Department of Transport for the National Public Transport Data Repository (NPTDR) data: a snapshot of bus information taken every October.

There are:

  1. CIF files which list the stops and timing of each route.
  2. A CSV file which contains information about each stop (though the data in the NaPTAN files is better).

I only managed to get a sample of the data (London) so far, but for completeness here's the code for parsing out the useful information into a TSV file, which can then be loaded into MySQL.