Get Google Maps directions
Input
mode requiredHow to travel. transit is public transport.
origin requiredWhere the trip starts: an address, a place name with its city (e.g. 'Marienplatz, München'), or coordinates as 'lat,lng' (e.g. '48.1371,11.5754'). Coordinates are the most exact.
destination requiredWhere the trip ends, in the same forms as origin.
gl optionalRegion, e.g. 'de'. Empty: the browser's region.
hl optionalLanguage of the texts Maps writes (vehicle names, instructions, fares), e.g. 'en'. Empty: the browser's language.
date optionalDay of the trip, YYYY-MM-DD, for depart_at, arrive_by and last_available. Default: today. Do not pass with daysFromToday.
time optionalLocal time at the trip, HH:MM (24 h), for depart_at and arrive_by.
timeMode optionaltransit and driving only. depart_at and arrive_by take time and a day; last_available (transit only) finds the last departures of the day.
Default: "leave_now"avoidTolls optionaldriving only.
Default: falseavoidFerries optionaldriving only.
Default: falseincludeStops optionaltransit: also return the stops each vehicle passes between boarding and alighting (intermediateStops). Off by default to keep the answer short.
Default: falsetransitRoute optionaltransit only: how Maps ranks the routes.
Default: "best"avoidHighways optionaldriving only.
Default: falsedaysFromToday optionalDay of the trip as a number of days after today (0 is today), for searches that run on a schedule. Do not pass with date.
transitVehicles optionaltransit only: the vehicles to prefer (Maps' Prefer options; tram includes light rail). Empty: no preference.
Output
mode requiredorigin requiredThe place Maps resolved for the origin text.
routes requireddestination requireddurationsByMode optionalSeconds Maps shows on each travel mode tab for this trip; a mode Maps does not offer is absent.
