Call it
curl https://api.peume.com/v1/call/google-maps-get-route-directions \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"end_addr": "your end addr",
"hl": "your hl"
}
}'const res = await fetch("https://api.peume.com/v1/call/google-maps-get-route-directions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"end_addr": "your end addr",
"hl": "your hl"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-maps-get-route-directions",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"end_addr": "your end addr",
"hl": "your hl"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: google-maps-get-route-directions.
Parameters
end_addrstringThe 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. Alternatively, you can use `end_data_id` or `end_coords`.
hlstringThe language to use for the Google Maps Directions search. It's a two or three-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French), optionally followed by a two-letter or three-digit region code (e.g., `en-gb` for British English, or `es-419` for Latin American Spanish).
end_coordsstringThe GPS coordinates of the ending point for the direction you want to search. The format is `latitude,longitude`. E.g. `30.197471099,-97.66635289`. Alternatively, you can use `end_addr` or `end_data_id`.
preferstringPreferred 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`). Parameter works only if `travel_mode` parameter is set to: `3` (Transit)
glstringThe 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)
start_coordsstringThe GPS coordinates of the starting point for the direction you want to search. The format is `latitude,longitude`. E.g. `30.197471099,-97.66635289`. Alternatively, you can use `start_addr` or `start_data_id`.
routestringRoute options. Available options: `2` - Fewer transfers `3` - Less walking `4` - Wheelchair accessible Parameter works only if `travel_mode` parameter is set to: `3` (Transit)
travel_modestringThe travel mode. Available options: `6` - Best (Default) `0` - Driving `9` - Two-wheeler `3` - Transit `2` - Walking `1` - Cycling `4` - Flight
end_data_idstringThe data ID of the ending point for the direction you want to search. Find the data ID of a place using our Google Maps API. Alternatively, you can use `end_addr` or `end_coords`.
avoidstringAvoid 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`).
timestringThe 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)
start_addrstringThe 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. Alternatively, you can use `start_data_id` or `start_coords`.
distance_unitstringThe displayed distance unit. Available options: `1` - miles `0` - km
start_data_idstringThe data ID of the starting point for the direction you want to search. Find the data ID of a place using our Google Maps API. Alternatively, you can use `start_addr` or `start_coords`.
json_restrictorstringThe fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
