Call it
curl https://api.peume.com/v1/call/get-google-maps-directions \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"travel_mode": "best",
"distance_unit": "auto",
"avoid_tolls": false,
"avoid_highways": false,
"avoid_ferries": false,
"transit_prefer": "none"
}
}'const res = await fetch("https://api.peume.com/v1/call/get-google-maps-directions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"travel_mode": "best",
"distance_unit": "auto",
"avoid_tolls": false,
"avoid_highways": false,
"avoid_ferries": false,
"transit_prefer": "none"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/get-google-maps-directions",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"travel_mode": "best",
"distance_unit": "auto",
"avoid_tolls": False,
"avoid_highways": False,
"avoid_ferries": False,
"transit_prefer": "none"
}
},
)
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: get-google-maps-directions.
Parameters
start_addrstringEnter the starting address or place name (e.g. 'New York, NY' or 'Empire State Building'). Provide this or `start_coords` or `start_data_id` for the origin.
end_addrstringEnter the destination address or place name (e.g. 'Boston, MA' or 'Fenway Park'). Provide this or `end_coords` or `end_data_id` for the destination.
start_coordsstringOptionally set the origin as exact GPS coordinates in 'latitude,longitude' format (e.g. '40.7128,-74.0060'). Overrides the start address when provided.
end_coordsstringOptionally set the destination as exact GPS coordinates in 'latitude,longitude' format (e.g. '42.3601,-71.0589'). Overrides the end address when provided.
start_data_idstringOptionally set the origin as a Google Maps place data ID (e.g. '0x89c24fa5d33f083b:0xc80b8f06e177fe62'). Overrides the start address when provided.
end_data_idstringOptionally set the destination as a Google Maps place data ID. Overrides the end address when provided.
travel_modestringChoose how to travel. 'Best' returns the best options across modes; the others restrict the result to one mode. Flight and two-wheeler are only available for some regions and routes.
best · driving · cycling · walking · transit · flight · two-wheeler
Example: best
distance_unitstringChoose the distance unit for the results. 'Automatic' lets the region decide.
auto · km · miles
Example: auto
avoid_tollsbooleanEnable to prefer routes without toll roads. Applied as a preference; Google may still include tolls if no alternative exists.
Example: false
avoid_highwaysbooleanEnable to prefer routes that avoid highways.
Example: false
avoid_ferriesbooleanEnable to prefer routes that avoid ferries.
Example: false
transit_preferstringSet a preferred public transit mode. Only applied when Travel Mode is 'Transit'. Leave as 'None' for no preference.
none · bus · subway · train · tram · light_rail
Example: none
transit_routingstringSet how transit routes are optimized. Only applied when Travel Mode is 'Transit'. Leave as 'None' for the default.
none · fewer_transfers · less_walking · wheelchair
Example: none
time_typestringChoose whether the time below is a departure time, an arrival time, or to leave now. 'Leave now' ignores the time value.
leave_now · depart_at · arrive_by
Example: leave_now
time_valuestringSet the departure or arrival time as an ISO 8601 datetime (e.g. '2026-06-01T09:00:00') or a Unix timestamp. Used only when Time Mode is 'Depart at' or 'Arrive by'.
hlstringSet the two-letter interface language code (ISO 639-1, e.g. 'en', 'es', 'fr'). Controls the language of instructions and place names. Defaults to 'en'.
Example: en
glstringSet the two-letter country code (ISO 3166-1, e.g. 'us', 'gb', 'ca'). Influences regional routing and defaults. Defaults to 'us'.
Example: us
