Unable to retrieve arrival times for a majority of bus stops

So I used the blog - Unified API Part 5: AoT – Arrivals of Things – TfL Digital to try and set up a basic arrival time fetcher.

In the example it gives 490006170S the arrival time returns an array that displays the data.

However, when I try and use a bus stop like 490G00062G (common name: North Common Road) the array is empty.
Same with 490G00005936 (Dalgarno Gardens) and many others I’ve tried.

Is it something with my code?

I think that you are looking for the wrong thing in your original URL - OnStreetBusCoachStopPair is a ParentId for a group (typically two) of bus stops on opposite sides of the road.The actual bus stops are the siblings. Broadly 490Gxxx is a parent and 4900xxx is an actual bus stop

Even when I hard code it to 490000062C (one of the children of the bus stop 490G00062G) it still gives an empty array

I am wondering whether you have just been unlucky with the choice of stop. 490000062C is the first stop at Ealing Broadway Station on the 65. It so happens that the stops used at Ealing Broadway are about to change and it may be that preparatory work has taken that stop out of service. Its SMS code is 50606 and I also see no arrivals (on London Vehicle Finder). I do however see arrivals at the next stop which has SMS code 58330 and Naptan/Atco code 490006291L. Do you still get an empty array if you try this code?

There is a broader issue here - should it not be possible to retrieve arrivals at ALL stops within the parent rather than zero on on one particular stop? If I want to go from Enfield Town to near Highlands Village I can do it by 456 or W9 but they serve different stops in Enfield Town, just tens of metres apart on the same side of Cecil Road. There are three different stops (probably not with the same parent, admittedly) offering services to Chase Farm, two to Brimsdown, two to Palmers Green, three to Edmonton Green…

1 Like

hi @McNav

The stop is closed at the moment - https://api.tfl.gov.uk/StopPoint/490000062C/Disruption gives the following:

    "$type": "Tfl.Api.Presentation.Entities.DisruptedPoint, Tfl.Api.Presentation.Entities",
    "atcoCode": "490000062C",
    "fromDate": "2023-04-11T08:00:00Z",
    "toDate": "2023-04-29T17:00:00Z",
    "description": "Until 18:00 Saturday 29 April,\\nbus 65 is not serving this stop\\n  and bus 65 will depart from\\nEaling Broadway Centre (Stop L).",
    "commonName": "Ealing Broadway Station",
    "type": "Closure",
    "mode": "bus",
    "stationAtcoCode": "490G00062G",
    "appearance": "Information"

Hope that helps. 

1 Like

Thanks for your reply!

I did manage to get it working, I think it was a joint issue of the stops I was picking to be closed and also me using the pair cluster naptanId as you said! As soon as I used the stop you mentioned and used the child Id instead of the parent one it worked!

Appreciate it!

I’ll incorporate the distruption possibility into my code now, thank you :slight_smile:

Good to hear @McNav !

There may be some data mismatches between our API and the source system (Countdown) that would cause this behaviour. We’re looking into getting data aligned properly at the moment, so hopefully that would minimise these cases.