Train Service via TransportAPI

Public transport

Description:
Timetabled service updates for a given service.The service returned is selected from all available services as follows:Only the services to which the given service reference (service parameter) applies are selected.Out of those, the service selected is the the one which departs/arrives/passes (type parameter) first, at or after the specified date/time (date/time parameters), at the given station of interest (station_code parameter).

More details: http://docs.transportapi.com/

Location: England (52.389538, -1.193079, 0 )

public transport train train route train service transport
UK Open Government Licence (OGL)
Additional terms: http://www.transportapi.com/terms/
ID Label Tags Unit
1 train service train route n/a
Preview JSON   




Documentation : Journeys Feeds API Overview

The Developers' API is REST-based and can be accessed by issuing HTTP GET requests. All usage is measured in volume of the data returned, including where access is free. You will need to construct a URL appropriate to the dataset you're interested in and the particular information you want to retrieve.

Journey type feeds include data about journeys - from public transport or private fleets.
BUS Journey type feeds can be access following these URL patterns for GET requests:
Path Returns
1 /journeys/feeds/{feed ID}/station/{stationid} Timetabled service updates at a given bus stop (stationid): might include departures, arrivals and passes.
stationid represents bus stop atco code, for more details please look for NaPTAN in the Data Catalogue. E.g. 1800SB45111 represents "Piccadilly Gardens" in Manchester City Centre.
/journeys/feeds/{feed ID}/station/{stationid}?{refinement parameters} Timetabled service updates at a given stop (stationid) selected according to the (optional) refinement parameters:
Parameter Value Default Example
date date Now 2016-11-01 which represents 1 November 2016
time time Now 09:05 which represents 09:05am 2016 (GMT)
group Option to group the result departures by route ("route"), or return just one 'all' group ("no"). route means results will be grouped by bus route.
limit Number of departures to return within each group (or in total if not grouped). The default value is 3 if you are grouping by route or 10 if you are not grouping. 5 means you will get total of up to 5 results per route (if grouped by route) or total of up to 5 results (if not grouped)
2 /journeys/feeds/{feed ID}/station/{stationid} Live or Timetabled service updates at a given bus stop (stationid): might include departures, arrivals and passes.
/journeys/feeds/{feed ID}/station/{stationid}?{refinement parameters} Live or Timetabled service updates at a given stop (stationid) selected according to the (optional) refinement parameters:
Parameter Value Default Example
group Option to group the result departures by route ("route"), or return just one 'all' group ("no"). route means results will be grouped by bus route.
limit Number of departures to return within each group (or in total if not grouped). The default value is 3 if you are grouping by route or 10 if you are not grouping. 5 means you will get total of up to 5 results per route (if grouped by route) or total of up to 5 results (if not grouped)
nextbuses Set this to 'no' if you want to disable expensive calls to NextBuses. yes no means the NextBuses service won't be called - you will get the data from other available services.
3 /journeys/feeds/{feed ID}/service/{serviceid}?{refinement parameters} Timetabled service updates for a selected bus serviceid (bus line). It requires refinement parameters:
Parameter Value Default Example
stationid bus stop atco code, for more details please look for NaPTAN in the Data Catalogue 1800SB45111 which represents "Piccadilly Gardens" in Manchester City Centre
direction Direction or where service is terminating.
E.g. direction can be 'inbound' or 'outbound'. This may mean the bus is roughly moving inbound towards a city centre or roughly outbound away from it, but mostly the intention is to simply distinguish between the two directions of movement. In addition to 'inbound' and 'outbound' other values such as 'clockwise' can crop up in the data. These are all valid as identifiers here.
Additionally, last stop (where terminating) can be used for some services, depending on the operator.
operator The operator code of the bus you are interested in. WRAY which represents "Arriva Yorkshire"
date (optional) date Now 2016-11-01 which represents 1 November 2016
time (optional) time Now 09:05 which represents 09:05am 2016 (GMT)
TRAIN Journey type feeds can be access following these URL patterns for GET requests:
Path Returns
1 /journeys/feeds/{feed ID}/station/{stationid} Timetabled service updates at a given station (stationid): departures, arrivals or passes.
/journeys/feeds/{feed ID}/station/{stationid}?{refinement parameters} Timetabled service updates at a given station (stationid) selected according to the refinement parameters:
Parameter Value Default Example
date date Now 2016-11-01 which represents 1 November 2016
time time Now 09:05 which represents 09:05am 2016 (GMT)
called_at station code STP which represents "London St Pancras"
calling_at station code STP which represents "London St Pancras"
destination station code where service is terminating STP which represents "London St Pancras"
from_offset Start of the time window PT00:00:00 PT00:25:00 which represents "in 25 minutes"
operator Services that are operated by the given operator. The operator is specified using its ATOC code. VT which represents "Virgin Trains"
origin station code where service is originating STP which represents "London St Pancras"
service Only include services that have the given service code. 24648004
2 /journeys/feeds/{feed ID}/service/{serviceid}?{refinement parameters} Timetabled service updates for a given service. Can be selected according to the refinement parameters:
Parameter Value Default Example
date date Now 2016-11-01 which represents 1 November 2016
time time Now 09:05 which represents 09:05am 2016 (GMT)

To read the rest, please look at the Developers' API.