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->GetDepartureBoard(10,"PAD");
header("Content-Type: text/plain");
print_r($response);
?>
stdClass Object
(
[GetStationBoardResult] => stdClass Object
(
[generatedAt] => 2026-01-12T02:57:33.7193382+00:00
[locationName] => London Paddington
[crs] => PAD
[platformAvailable] => 1
[trainServices] => stdClass Object
(
[service] => Array
(
[0] => stdClass Object
(
[std] => 03:35
[etd] => On time
[operator] => Great Western Railway
[operatorCode] => GW
[serviceType] => train
[serviceID] => 4317818PADTON__
[rsid] => GW325800
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Reading
[crs] => RDG
)
)
)
)
[1] => stdClass Object
(
[std] => 04:34
[etd] => Cancelled
[operator] => Heathrow Express
[operatorCode] => HX
[isCancelled] => 1
[serviceType] => train
[cancelReason] => This service has been cancelled because of congestion
[serviceID] => 4318963PADTON__
[rsid] => HX010000
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T5
[crs] => HWV
)
)
)
)
[2] => stdClass Object
(
[std] => 04:36
[etd] => On time
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 4318366PADTON__
[rsid] => XR273300
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T5
[crs] => HWV
)
)
)
)
[3] => stdClass Object
(
[std] => 04:40
[etd] => On time
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 4318359PADTON__
[rsid] => XR187800
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T4
[crs] => HAF
)
)
)
)
[4] => stdClass Object
(
[std] => 04:51
[etd] => Cancelled
[operator] => Heathrow Express
[operatorCode] => HX
[isCancelled] => 1
[serviceType] => train
[cancelReason] => This service has been cancelled because of congestion
[serviceID] => 4318115PADTON__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T5
[crs] => HWV
)
)
)
)
[5] => stdClass Object
(
[std] => 04:53
[etd] => On time
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 4317902PADTON__
[rsid] => XR324900
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T4
[crs] => HAF
)
)
)
)
)
)
)
)