Reputation: 61
I am trying to get bus stop details from the Google Places API. I have been able to get the actual bus stops but now I'd like to grab the details.
For example: This is the URL Google gives me from the response. https://maps.google.com/maps/place?cid=14960400563022267569
I'd like to get a JSON representation of this information (if its available). Appending output=json just returns an empty json document.
Does anyone know how to grab the info without putting it through a parser?
EDIT: So continuing to dig through the flow I got SOME information from this URL but still doesn't seem to show me the bus numbers or anything. http://maps.google.com/maps?cid=14960400563022267569&q=a&output=json
Upvotes: 4
Views: 5842
Reputation: 4779
Currently, there seems to be no option in google apis to retrieve the public transit information the way you are seeing on google maps. Your best bet is to use google places api and to filter for bus_station to get details about the bus stations , but the information returned will be limited these result details . Another option is to use google directions api, where you can search for directions by keeping your bus station as the source and a suitable destination and the returned results will provide some transit details which include departure time, headways, etc.
Upvotes: 5