Confused with ArrivalDepartures lineIds

I’m trying to use https://api.tfl.gov.uk/StopPoint/{id}/ArrivalDepartures?lineIds={lineIds} but am confused with the lineIds parameter.

the endpoint https://api.tfl.gov.uk/StopPoint/490013766G/Arrivals returns a list of arrivals and includes lineId eg. 139

If I use https://api.tfl.gov.uk/StopPoint/490013766G/ArrivalDepartures?lineIds=139 I get the response "line id 139 is invalid"

The docs state:

A comma-separated list of line ids e.g. tfl-rail, london-overground

If I send https://api.tfl.gov.uk/StopPoint/490013766G/ArrivalDepartures?lineIds=tfl-rail I get a successful empty array.

Is the lineId parameter not actually expecting a lineId?
what are the tfl-rail, london-overground types and where can I find a list of them?

Thanks

The /StopPoint/{id}/ArrivalsDepartures API only works with TfL Rail and London Overground.

If you take a look at the docs here: APIs: Details - Transport for London - API (tfl.gov.uk), you’ll see that it says “(overground and tfl rail only)” in the API description, which is why only tfl-rail and london-overground are given as examples.

All other modes only support the /StopPoint/{id}/Arrivals endpoint

139 is a valid line ID, but it’s a bus line not TfL Rail/London Overground so the API doesn’t support it. There’s an API endpoint that will return all line IDs of a given mode if you’d like: APIs: Details - Transport for London - API (tfl.gov.uk)

Ah ok. I’m showing my naivety here sorry. I assumed overgound was buses :see_no_evil:

I’m trying to find the data to replicate what https://traintimes.org.uk/map/london-buses/ is doing to estimate a bus location due at a stop.

All I can seem to get is a list of buses and due times to a stop using StopPoint/{stopId}/Arrivals
This doesn’t include what bus stop the bus is currently at. I’m thinking there is maybe some older API’s that I can’t find documentation for. I saw another app using countdown.api.tfl.gov.uk, how can I get access/details for that?

Additionally, I need to show if a bus is On time, Late, Early. That’s where /ArrivalDepartures would have been great as it includes scheduled arrival/departure as well as Live. I assume i’ll just have to fetch a full schedule and cross reference?