Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Google Maps Public Transit Directions by HTTP server-side request

I use such urls like:

http://maps.google.com/?saddr=546%206th%20Avenue,%20New%20York,%20NY%2010011%20(Sixth%20Avenue,%20New%20York)&daddr=W%20103rd%20St,%20New%20York,%20NY%20&dirflg=r

But it returns full html page. Does anybody know how to get such info in json or xml or any parsable format?

I need public transit.

like image 353
user323075 Avatar asked Apr 22 '10 09:04

user323075


1 Answers

You just add &output=json to the end of the url.

like image 150
Mathias Conradt Avatar answered Nov 15 '22 23:11

Mathias Conradt