Get nearby bus stations

Hello,i am new here and from outside UK.i am developing an android app which returns nearby bus stations to user based on tha lat,lng of user.I want to know exactly which parameters we pass here as i see there were many modes containing bus and i did not know which one is for my requirement.Thank you

Welcome @hassan

Actuallty, this isn’t too hard. There is a call to get things near a lat,long which is documented here

https://api.tfl.gov.uk/swagger/ui/index.html?url=/swagger/docs/v1#!/StopPoint/StopPoint_GetByGeoPoint

I’m guessing you are looking for NaptanBusCoachStation. Does this help?

For example this works for me to find Stratford City Bus Station

https://api.tfl.gov.uk/StopPoint?lat=51.547031&lon=-0.005540&stopTypes=NaptanBusCoachStation&radius=1000&useStopPointHierarchy=True&returnLines=True

Thank you for reply.I need to clear couple of things.why you use NaptanBusCoachStation and not NaptanPublicBusCoachTram.secondly can you please explain usestoppointhierarchy and returnlines.Thank you

The NAPTAN codes are designated by the DfT

http://naptan.dft.gov.uk/naptan/schema/2.5/doc/NaPTANSchemaGuide-2.5-v0.67.pdf

usestoppointhierarchy is used to show the relationship between items. If a bus stop is inside a bus station, perhaps. Or a tram stop inside a train station. For tube/rail/tflrail/overground it also shows where the how gatelines and platforms relate to each other.

hello @briantist can you please tellme which API is used for finding the timetables of stoppoints?Thanks

Hi

The example link is

https://api.tfl.gov.uk/line/24/timetable/490000036s

"Could not find a matching ICS code for the Naptan Id 490000036s. Argument name: fromNaptanId. "
can you please explain this?

Can you tell me what you were using for input?