---
title: "Google Maps API: Directions | Perceptlayer"
description: "Directions from Google Maps as JSON. 1 credit per successful call."
url: https://perceptlayer.com/apis/google-maps/directions
---

[APIs](https://perceptlayer.com/apis) / [Google Maps](https://perceptlayer.com/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.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `origin` | string | Required | Up to 500 characters |
| `destination` | string | Required | Up to 500 characters |
| `mode` | string | Optional | driving, walking, bicycling, transit |
| `hl` | string | Optional | Any |
| `gl` | string | Optional | Any |

## Example request

cURL shell 

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

[Run this endpoint in the playground](https://perceptlayer.com/apis/google-maps?try=directions#playground) with your own parameters. 1 credit per successful call; failed calls are free.
