Basically a hub comprises by definition more than one StopPoint (as children) each of which you can find from the API. The API URL for your example is https://api.tfl.gov.uk/StopPoint/HUBWHD which produces a long list of “Entities” at that hub including bus routes. Using the API in this way is more complicated than searching for individual bus stops by name.
Ah! I thought that it’d be too good to be true that I could find bus routes/directions from searching a stop with just two API requests. Thanks so much for both your help!
You can get what I think you want quite easily by using the Legacy (Countdown) API. For example this URL will return all the stops named “Eden Street”, listing the Towards text for each stop and all the routes it serves. https://countdown.api.tfl.gov.uk/interfaces/ura/instant_V1?StopAlso=1&ReturnList=StopCode2,StopPointName,Towards,LineName,DestinationName&StopPointName=eden street
You can still download very useful documentation from TfL.
Thanks so much @misar - that’s a great help! However, I’m trying to allow users to search for a bus stop; filter out the routes which they’re interested in; and then get bus times for that (it’s just for messing around with an Alexa skill).
I already told you that using the API to search on hubs is complicated. To see how complicated it becomes even for a “simple” search like your example (Waterloo) use the TfL website journey planner (Stations, stops & piers - Transport for London). The first of many options in the list it offers is plain “Waterloo”. Click on that one then select “Other transport options, Bus” to get another page (https://tfl.gov.uk/bus/stop/HUBWAT/waterloo) with a list of bus stops and their routes. If you want bus routes around Waterloo Station this hub (“HUBWAT”) is probably the one you need but that is not the same as searching for stops with names which include the word “Waterloo”.
What you want is really a bus stop search based on location (“Waterloo”). That is also easy with the Countdown API if you convert the location to a map reference. This URL will return the same data as before for all bus stops within 250m of Waterloo Station. https://countdown.api.tfl.gov.uk/interfaces/ura/instant_V1?StopAlso=1&ReturnList=StopCode2,StopPointName,Towards,LineName,DestinationName&Circle=51.504359,-0.113742,250