# Get Google Maps directions by API as JSON

**Use case:** 

Call a simple API to get Google Maps directions as JSON. One lookup returns every route option with distance, duration, and turn-by-turn steps.

## Input

```json
{
  "start_addr": "Chicago, IL",
  "end_addr": "Milwaukee, WI",
  "travel_mode": "driving",
  "distance_unit": "auto",
  "avoid_tolls": false,
  "avoid_highways": false,
  "avoid_ferries": false,
  "transit_prefer": "none",
  "transit_routing": "none",
  "time_type": "leave_now",
  "hl": "en",
  "gl": "us"
}
```

## Output

```json
{
  "result_type": {
    "label": "Result Type",
    "format": "string"
  },
  "start": {
    "label": "Start",
    "format": "string"
  },
  "end": {
    "label": "End",
    "format": "string"
  },
  "travel_mode": {
    "label": "Travel Mode",
    "format": "string"
  },
  "directions_count": {
    "label": "Route Options",
    "format": "integer"
  },
  "best_duration": {
    "label": "Best Duration",
    "format": "string"
  },
  "best_distance": {
    "label": "Best Distance",
    "format": "string"
  },
  "google_maps_directions_url": {
    "label": "Google Maps URL",
    "format": "string"
  },
  "fetched_at": {
    "label": "Fetched At",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [Google Maps Directions API](https://apify.com/johnvc/google-maps-directions-api) with a specific input configuration. Visit the [Actor detail page](https://apify.com/johnvc/google-maps-directions-api) to learn more, explore other use cases, and run it yourself.