Please note: Rail Delivery Group plans to retire the National Rail Data Portal (including OpenLDBWS) in early 2026. Alternatives are now available via the Rail Data Marketplace
<?php
require("OpenLDBWS.php");
$OpenLDBWS = new OpenLDBWS("YOUR_ACCESS_TOKEN");
$response = $OpenLDBWS->GetFastestDepartures("PAD",array("RDG","BRI"));
header("Content-Type: text/plain");
print_r($response);
?>
stdClass Object
(
[DeparturesBoard] => stdClass Object
(
[generatedAt] => 2026-01-29T22:41:27.2364514+00:00
[locationName] => London Paddington
[crs] => PAD
[nrccMessages] => stdClass Object
(
[message] => Array
(
[0] => stdClass Object
(
[_] =>
Poor weather is impacting services running across the Great Western Railway network. More details can be found in <a href="https://www.nationalrail.co.uk/service-disruptions/gwr-weather-20260127/">Status and Disruptions</a>.
)
)
)
[platformAvailable] => 1
[departures] => stdClass Object
(
[destination] => Array
(
[0] => stdClass Object
(
[service] => stdClass Object
(
[std] => 22:49
[etd] => On time
[platform] => 5
[operator] => Great Western Railway
[operatorCode] => GW
[serviceType] => train
[serviceID] => 4871052PADTON__
[rsid] => GW636700
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Port Talbot Parkway
[crs] => PTA
)
)
)
)
[crs] => RDG
)
[1] => stdClass Object
(
[service] => stdClass Object
(
[std] => 23:32
[etd] => On time
[operator] => Great Western Railway
[operatorCode] => GW
[serviceType] => train
[serviceID] => 4873234PADTON__
[rsid] => GW437500
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Bristol Temple Meads
[crs] => BRI
)
)
)
)
[crs] => BRI
)
)
)
)
)