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

user323075 picture user323075 · Apr 22, 2010 · Viewed 13.1k times · Source

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.

Answer

Mathias Conradt picture Mathias Conradt · Jun 22, 2010

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