When processing the bus-stops.csv and bus-sequences.csv data files, ensure that you remove any extra “newline” character in the Naptan_Atco column. The Naptan_Atco field is very important when retrieving various data from the API, so it’s vital to store/use the correct value.
Another gotcha is a NAPTAN code of the form 490001089E4. If you are not careful some software will interpret this as a number in scientific notation, in this case 4900010890000, or as it may appear, 4.90E+12. There arenpt many of these - mainly in the Croydon and Sutton areas - but they are a pain.
I have a vague memory of a similar interpretation issue with codes ending in (say) F4 but cannot remember the details. There would be far less of these because E is used much more often as a qualifier than F.
My advice is to read and store it in a string format. I know some applications will “cleverly” (automatically) interpret it as a “number” format because there are no quotes - at least you can override this default behaviour.
Anyway…thanks for sharing your pain and…others…beware!
You’ll need some special credentials . See https://api-portal.tfl.gov.uk/docs - scroll down to Bus, Coach and River and then see the second (“stream”) link. It is all documented, but it’s much more fun to guess!