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-06-06T14:08:11.1879549+01:00
[locationName] => London Paddington
[crs] => PAD
[nrccMessages] => stdClass Object
(
[message] => Array
(
[0] => stdClass Object
(
[_] =>
Reduced Great Western Railway service between Worcester Shrub Hill and Hereford. Latest information can be found in <a href="https://www.nationalrail.co.uk/service-disruptions/ledbury-20260606/">Status and Disruptions</a>.
)
)
)
[platformAvailable] => 1
[trainServices] => stdClass Object
(
[service] => Array
(
[0] => stdClass Object
(
[std] => 14:03
[etd] => 14:06
[platform] => A
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 3859661PADTLL__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T4
[crs] => HAF
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
)
)
)
[formation] => stdClass Object
(
[coaches] => stdClass Object
(
[coach] => Array
(
[0] => stdClass Object
(
[coachClass] => Standard
[loading] => 35
[number] => 1
)
[1] => stdClass Object
(
[coachClass] => Standard
[loading] => 52
[number] => 2
)
[2] => stdClass Object
(
[coachClass] => Standard
[loading] => 72
[number] => 3
)
[3] => stdClass Object
(
[coachClass] => Standard
[loading] => 70
[number] => 4
)
[4] => stdClass Object
(
[coachClass] => Standard
[loading] => 58
[number] => 5
)
[5] => stdClass Object
(
[coachClass] => Standard
[loading] => 54
[number] => 6
)
[6] => stdClass Object
(
[coachClass] => Standard
[loading] => 62
[number] => 7
)
[7] => stdClass Object
(
[coachClass] => Standard
[loading] => 51
[number] => 8
)
[8] => stdClass Object
(
[coachClass] => Standard
[loading] => 56
[number] => 9
)
)
)
)
[futureDelay] => 1
)
[1] => stdClass Object
(
[std] => 14:06
[etd] => On time
[platform] => B
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 3859187PADTLL__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Heathrow Airport T4
[crs] => HAF
)
)
)
[formation] => stdClass Object
(
[coaches] => stdClass Object
(
[coach] => Array
(
[0] => stdClass Object
(
[coachClass] => Standard
[loading] => 46
[number] => 1
)
[1] => stdClass Object
(
[coachClass] => Standard
[loading] => 31
[number] => 2
)
[2] => stdClass Object
(
[coachClass] => Standard
[loading] => 33
[number] => 3
)
[3] => stdClass Object
(
[coachClass] => Standard
[loading] => 33
[number] => 4
)
[4] => stdClass Object
(
[coachClass] => Standard
[loading] => 26
[number] => 5
)
[5] => stdClass Object
(
[coachClass] => Standard
[loading] => 11
[number] => 6
)
[6] => stdClass Object
(
[coachClass] => Standard
[loading] => 26
[number] => 7
)
[7] => stdClass Object
(
[coachClass] => Standard
[loading] => 31
[number] => 8
)
[8] => stdClass Object
(
[coachClass] => Standard
[loading] => 15
[number] => 9
)
)
)
)
)
[2] => stdClass Object
(
[std] => 14:06
[etd] => 14:09
[platform] => A
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 3860049PADTLL__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Shenfield
[crs] => SNF
)
)
)
[futureDelay] => 1
)
[3] => stdClass Object
(
[std] => 14:08
[etd] => On time
[operator] => Great Western Railway
[operatorCode] => GW
[serviceType] => train
[serviceID] => 3861877PADTON__
[rsid] => GW711200
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Didcot Parkway
[crs] => DID
)
)
)
)
[4] => stdClass Object
(
[std] => 14:09
[etd] => On time
[platform] => A
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 3859672PADTLL__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Maidenhead
[crs] => MAI
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
)
)
)
)
[5] => stdClass Object
(
[std] => 14:10
[etd] => On time
[platform] => 6
[operator] => Heathrow Express
[operatorCode] => HX
[serviceType] => train
[serviceID] => 3835036PADTON__
[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] => 14:12
[etd] => On time
[platform] => 8
[operator] => Great Western Railway
[operatorCode] => GW
[serviceType] => train
[serviceID] => 3839642PADTON__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Carmarthen
[crs] => CMN
)
)
)
)
[7] => stdClass Object
(
[std] => 14:12
[etd] => On time
[platform] => A
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 3859085PADTLL__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Gidea Park
[crs] => GDP
)
)
)
)
[8] => stdClass Object
(
[std] => 14:15
[etd] => On time
[platform] => A
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 3859680PADTLL__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Abbey Wood
[crs] => ABW
)
)
)
)
[9] => stdClass Object
(
[std] => 14:18
[etd] => On time
[platform] => A
[operator] => Elizabeth Line
[operatorCode] => XR
[serviceType] => train
[serviceID] => 3860057PADTLL__
[origin] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => London Paddington
[crs] => PAD
)
)
)
[destination] => stdClass Object
(
[location] => Array
(
[0] => stdClass Object
(
[locationName] => Shenfield
[crs] => SNF
)
)
)
)
)
)
)
)