PeumeAPI

Places & travel · Google Maps

Get Google Maps Directions

Get Google Maps directions between an origin and a destination.

From $0.022 per unit

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"
  }
}'

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_addrstring

Enter 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_addrstring

Enter 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_coordsstring

Optionally set the origin as exact GPS coordinates in 'latitude,longitude' format (e.g. '40.7128,-74.0060'). Overrides the start address when provided.

end_coordsstring

Optionally 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_idstring

Optionally set the origin as a Google Maps place data ID (e.g. '0x89c24fa5d33f083b:0xc80b8f06e177fe62'). Overrides the start address when provided.

end_data_idstring

Optionally set the destination as a Google Maps place data ID. Overrides the end address when provided.

travel_modestring

Choose 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_unitstring

Choose the distance unit for the results. 'Automatic' lets the region decide.

auto · km · miles

Example: auto

avoid_tollsboolean

Enable to prefer routes without toll roads. Applied as a preference; Google may still include tolls if no alternative exists.

Example: false

avoid_highwaysboolean

Enable to prefer routes that avoid highways.

Example: false

avoid_ferriesboolean

Enable to prefer routes that avoid ferries.

Example: false

transit_preferstring

Set 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_routingstring

Set 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_typestring

Choose 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_valuestring

Set 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'.

hlstring

Set 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

glstring

Set the two-letter country code (ISO 3166-1, e.g. 'us', 'gb', 'ca'). Influences regional routing and defaults. Defaults to 'us'.

Example: us

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.