Biggleswade AWOL from JourneyResults API

I’ve been using the API to plan trains for my commute from Biggleswade for several months with queries such as to

api.tfl.gov.uk/Journey/JourneyResults/90000603/to/1023126?nationalSearch=true&mode=national-rail

(as an example - Biggleswade to Stevenage). However a few weeks ago this started returning no results. It looks like the problem is unique to Biggleswade as using other stations on the line such as Sandy (1001741) returns data OK.

The StopPoint data for Biggleswade

https://api.tfl.gov.uk/StopPoint/Search/biggleswade

Shows “icsId”: “90000603” and “id”: “910GBIGLSWD”. It seems to be the only icsId that starts with 900 - don’t know if that’s a clue to the issue?

Welcome @davidtraintracker

I note that there are some unusual format codes in the National data set

https://beta-naptan.dft.gov.uk/download/national

Perhaps the error is coming from there?

Thanks @briantist
It’s curious that up until a few weeks ago it was all working fine. I’ve tried the different ATCO codes relating to Biggleswade in that dataset but seems that none work with the /JourneyResults API anymore

I’ve got “910GBIGLSWD” down (910G being “National Rail” and “BIGLSWD” being - though no scheme I have ever worked out the rest of that scheme).

940GZZLU is London Underground + three letter code. 930G + three is a river service.

.

Spot on, and yet

https://api.tfl.gov.uk/Journey/JourneyResults/910GBIGLSWD/to/1000083?nationalSearch=true&mode=national-rail

Results in

No journey found

Yet

https://api.tfl.gov.uk/Journey/JourneyResults/910GSNDY/to/1000083?nationalSearch=true&mode=national-rail

i.e. changing the station from Biggleswade to pretty much anything else (Sandy in this case is the next station up the line) then returns the route. It was working absolutely fine until maybe 2 or 3 weeks ago

Update: the route from Sandy also shows Biggleswade as the next stop (and confirms the ID is 910GBIGLSWD) so doesn’t make much sense why putting that as the starting point fails to return data

@davidtraintracker The NRE Darwin planner might be of more use. It has an endpoint at

https://ojp.nationalrail.co.uk/webservices/jpservices.wsdl

Yes, it’s annoyingly in XML/SOAP but it stupendously fast.

You can get free credentials from https://opendata.nationalrail.co.uk/


Maybe I’m missing something obvious but I can’t seem to work out how to get the NRE / Darwin planner WSDL. I found a different ‘realtime’ WSDL which does seem to resolve but doesn’t have any journey planning. I registered an account with OpenData but none of the credentials seem to work when I try to access jpservices.wsdl from your link?

I think you need to use OLJP https://ojp.nationalrail.co.uk/webservices/jpservices.wsdl

Hi @briantist , that’s what I’m trying but it asks for a username and password, and I’ve tried all the different details shown on the OpenData login page and nothing seems to work. Assume I’m missing something??

@davidtraintracker Ah yes, of cause, the OLJP has a separate sign-in

You need to email [email protected] for a username and and password.

Whilst I remember, here’s the regex to march valid Naptan codes. I’ve used “A” to mean [A-Z] for ease of compression

 ^(9((10AAAA|30)AAAAA?|40(AAAAAAA(AA?|[45])|0AAAAAAA)|10((0AAAAAA[12A]|AAAAAAA[145])|AAAAA4AA)|10(0AAAA(AA?)?|AAAAA(AA?)?)|300AAA)|A(AAAAA)?)$

hi @davidtraintracker ,

Thanks for raising this. We found an issue with Biggleswade as well as some other stations on Thameslink that were affected (Peterborough, Flitwick, Harlington, Preston Park).

These have now been resolved and journeys are now returning for these stations.

Thanks,
James