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

↓ Output (cached 60s)


<?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-05T01:42:12.990204+00:00
            [locationName] => London Paddington
            [crs] => PAD
            [nrccMessages] => stdClass Object
                (
                    [message] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [_] => 
Wintry weather to affect services across England, Scotland and Wales until Tuesday 6 January. More details and the full impact to your journey can be found in <a href="https://www.nationalrail.co.uk/service-disruptions/wintry-weather-20251231/">Status and Disruptions.</a>
                                )

                        )

                )

            [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] => 4091924PADTON__
                                    [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
                                                        )

                                                )

                                        )

                                )

                        )

                )

        )

)