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-25T04:03:52.7786109+00:00
[locationName] => London Paddington
[crs] => PAD
[nrccMessages] => stdClass Object
(
[message] => Array
(
[0] => stdClass Object
(
[_] =>
Severe weather is disrupting trains in south west England. The full impact can be found in <a href="https://www.nationalrail.co.uk/service-disruptions/plymouth-20260123/">Status and Disruptions</a>.
)
)
)
[platformAvailable] => 1
[trainServices] => stdClass Object
(
[service] => Array
(
[0] => stdClass Object
(
[std] => 04:55
[etd] => On time
[operator] => Heathrow Express
[operatorCode] => HX
[serviceType] => train
[serviceID] => 4745590PADTON__
[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
)
)
)
)
[1] => stdClass Object
(
[std] => 05:10
[etd] => On time
[operator] => Heathrow Express
[operatorCode] => HX
[serviceType] => train
[serviceID] => 4761620PADTON__
[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] => 05:12
[etd] => On time
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 4752303PADTON__
[rsid] => XR110200
[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] => 05:25
[etd] => On time
[operator] => Heathrow Express
[operatorCode] => HX
[serviceType] => train
[serviceID] => 4761623PADTON__
[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
)
)
)
)
[4] => stdClass Object
(
[std] => 05:27
[etd] => On time
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 4752142PADTON__
[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
)
)
)
)
[5] => stdClass Object
(
[std] => 05:40
[etd] => On time
[operator] => Heathrow Express
[operatorCode] => HX
[serviceType] => train
[serviceID] => 4761626PADTON__
[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
)
)
)
)
[6] => stdClass Object
(
[std] => 05:42
[etd] => On time
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 4752312PADTON__
[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
)
)
)
)
[7] => stdClass Object
(
[std] => 05:55
[etd] => On time
[operator] => Heathrow Express
[operatorCode] => HX
[serviceType] => train
[serviceID] => 4761629PADTON__
[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
)
)
)
)
[8] => stdClass Object
(
[std] => 05:57
[etd] => On time
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 4752151PADTON__
[rsid] => XR098500
[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
)
)
)
)
)
)
)
)