This is a new service – your feedback will help us to improve it.


Data formats

Timetables

Timetables data is available in the TransXChange format. This is an XML standard used for exchanging bus schedules and related data. More information including schema guidance can be found on the TransXChange website https://www.gov.uk/government/collections/transxchange.

Where multiple TransXChange datasets exist for an operator, you can use the RevisionNumber to understand the sequence of datasets that have been supplied. This can be used alongside StartDate and EndDate values to allow you to identify which data is valid at any one time, and how datasets continue on from each other.

Fares data

Fares data is available in the NeTEx format. This is an XML standard developed during 2019 by industry standard leads to provide an interoperable format for the publication of fares data within the UK bus industry. NeTEx is a CEN standard that can be used to represent many aspects of a multi-modal transport network. The UK profile includes the elements related to fares for buses, for more information on the schema and profile use the following links:

http://netex.uk/farexchange/

http://www.transmodel-cen.eu/standards/netex/

Bus location data

Bus location data is available using the SIRI-VM profile shown in the table below. This is an XML standard for exchanging real time bus location information. More information including schema guidance can be found on the SIRI website siri.org.uk.

SIRI-VM profile Type Mandatory in Profile Description
Produce ref xsd: NMTOKEN ref Yes Codespace for dataset producer.
Vehicle Ref String Yes Reference to the Vehicle.
VehicleJourneyRef Yes Reference to the Vehicle journey.
Operator ref xsd:NMTOKEN Yes Reference to Operator in question (ID to the corresponding company in the timetable data).
Published line name Int Yes Published line name for the line the vehicle is running on.
Line Ref xsd:NMTOKEN Yes Reference to the Line in question (ID to the corresponding object in the timetable data).
Direction Ref String Yes Direction of the trip.
Origin ref Yes Reference to the first stop on the vehicle’s trip.
Origin name xsd:string Yes Reference to origin Quay in question (ID to the corresponding Quay in the timetable data and national stop place registry).
Aimed departure time xsd:dateTime Yes The schedule time of departure from the origin stop.
Destination ref xsd:NMTOKEN Yes Reference to destination Quay in question (ID to the corresponding Quay in the timetable data and national stop place registry) NAPTAN stop.
Destination name xsd:string Yes Name describing the destination of the departure.
Aimed arrival time xsd:dateTime Yes The scheduled time of arrival at the destination stop
Vehicle Location-Longitude xsd:decimal Yes Longitude (-180 to 180)
Vehicle Location-Latitude xsd:decimal Yes Latitude (-90 to 90)
Recorded at (/GPS timestamp) xsd:dateTime Yes Timestamp for when the dataset was created/published i.e. 2004-12-17T09:30:47-05:00
Speed Yes Speed of the vehicle in question.
Bearing xsd:float Current compass bearing (direction of VehicleJourney)
Block ref String Yes Reference to the block of the vehicle running as defined by the running boards.
Previous API reference
Next How to get help

Other development resources