Get all tube stoppoints naptan
I’m using the above link for naptanId to feed into my other endpoints to get other data such as live crowding but I’ve noticed that most of these naptanId codes aren’t useful. Is there a way to get simple naptanId for all tube stations?

example: 0400ZZLUAMS0 - Amersham Underground Station gets no results

Hello, and welcome to the forum!

The data returned by that first URL contains many types of StopPoint, including station entrances and platforms, for which crowding data are not available.

What you could do is filter the StopPoints and only look at those with a stopType of NaptanMetroStation:

  stopPoint => stopPoint.stopType == "NaptanMetroStation")

I have filtered down to NaptanMetroEntrance codes only. But they are still not helpful when I plug them into the crowding endpoint.

Apologies. I meant NaptanMetroStation rather than NaptanMetroEntrance. I’ve fixed my code. :slight_smile:

1 Like

Perfect, thanks a lot!