API Parameters(Google Maps Directions)
Parameters | Required | Desc |
---|---|---|
start_addr | true | Parameter defines the address of the starting point for the direction you want to search. You can use anything that you would use in a regular Google Maps Directions search. |
end_addr | true | Parameter defines the address of the ending point for the direction you want to search. You can use anything that you would use in a regular Google Maps Directions search. |
gl | false | Parameter defines the country to use for the Google search. It's a two-letter country code. (e.g., us for the United States, uk for United Kingdom, or fr for France). It defaults to us |
hl | false | Parameter defines the language to use for the Google Maps Directions search. It's a two-letter language code. (e.g., en for English, es for Spanish, or fr for French). It defaults to en |
travel_mode | false | Parameter defines the travel mode. Available options: 6 - Best (Default), 0 - Driving, 9 - Two-wheeler, 3 - Transit, 2 - Walking, 1 - Cycling, 4 - Flight. |
avoid | false | Parameter defines avoid options. Available options: highways - Highways, tolls - Tolls, ferries - Ferries. You can also combine multiple options by joining them with a comma (e.g.: highways,tolls). |
prefer | false | Parameter defines preferred transit options. Available options: bus - Bus, subway - Subway, train - Train, tram_light_rail - Tram and light rail. You can also combine multiple options by joining them with a comma (e.g.: subway,train). |
route | false | Parameter defines route options. Available options: 2 - Fewer transfers, 3 - Less walking, 4 - Wheelchair accessible. Parameter works only if travel_mode parameter is set to: 3 (Transit) |
time | false | Parameter defines the time to travel. Available options: depart_at:xxxxxx - Specifies the departure time, where xxxxxx is the timestamp. E.g. depart_at:1698229538 specifies the departure time to 2023-10-25 10:25:38 GMT+0000. arrive_by:xxxxxx - Specifies the arrival time, where xxxxxx is the timestamp. E.g. arrive_by:1698229538 specifies the arrival time to 2023-10-25 10:25:38 GMT+0000. last_available - Takes the last available transit. This option works only if travel_mode parameter is set to: 3 (Transit) |
engine | true | Set parameter to google_maps_directions to use the Google Maps Directions API engine. |
Modified at 2025-02-06 11:42:11