APIs / Google Maps / Directions

Google Maps: Directions

Directions from Google Maps as JSON. 1 credit per successful call.

GET /v1/google-maps/directions

Parameters

Send parameters in the query string.

ParameterTypeRequiredAllowed values
originstringRequiredUp to 500 characters
destinationstringRequiredUp to 500 characters
modestringOptionaldriving, walking, bicycling, transit
hlstringOptionalAny
glstringOptionalAny

Example request

cURLshell
curl "https://api.perceptlayer.com/v1/google-maps/directions?origin=New+York%2C+NY&destination=Boston%2C+MA" \
  -H "X-API-Key: $API_KEY"