# Google Maps Directions

Get routes, distances and travel times between places.

by Apify Ready to run $0.0344 per search

## Example

### You ask your agent

“How long does it take to walk from the Empire State Building to Central Park?”

### You get

**Start:** Empire State Building, New York

**End:** Central Park, New York

**Country:** us

**Language:** en

**Fetched at:** 2026-11-22 00:36 UTC

**Result type:** directions

**Travel mode:** walking

**Best distance:** 2.1 km

**What your agent sends and gets back (JSON)**

Your agent works out the exact inputs, such as IDs, dates and settings, from what you ask.

### Request

```
{
  "tool_id": "apify.johnvc-google-maps-directions",
  "input": {
    "input": {
      "end_addr": "Central Park, New York",
      "start_addr": "Empire State Building, New York",
      "travel_mode": "walking",
      "distance_unit": "km"
    },
    "maxItems": 1
  }
}
```

### Response

```
{
  "items": [
    {
      "gl": "us",
      "hl": "en",
      "end": "Central Park, New York",
      "start": "Empire State Building, New York",
      "durations": [
        {
          "duration": 1075,
          "travel_mode": "Driving",
          "formatted_duration": "18 min"
        }
      ],
      "directions": [
        {
          "via": "5th Ave",
          "distance": 2072,
          "duration": 1767,
          "travel_mode": "Walking",
          "elevation_profile": {
            "ascent": 0,
            "descent": 0,
            "max_altitude": 15,
            "min_altitude": 14,
            "formatted_ascent": "0 m",
            "formatted_descent": "0 m",
            "formatted_max_altitude": "15 m",
            "formatted_min_altitude": "14 m"
          },
          "formatted_distance": "2.1 km",
          "formatted_duration": "29 min"
        }
      ],
      "fetched_at": "2026-11-22T00:36:01.228029+00:00",
      "places_info": [
        {
          "address": "Empire State Building, 20 W 34th St., New York, NY 10001",
          "data_id": "0x89c259a9b3117469:0xd134e199a405a163",
          "gps_coordinates": {
            "latitude": 40.7484405,
            "longitude": -73.98566439999999
          }
        }
      ],
      "result_type": "directions",
      "travel_mode": "walking",
      "best_distance": "2.1 km",
      "best_duration": "29 min",
      "directions_count": 2,
      "directions_found": true,
      "google_maps_directions_url": "https://www.google.com/maps/dir/Empire+State+Building%2C+20+W+34th+St.%2C+New+York%2C+NY+10001/Central+Park/data=!3m1!4b1!4m14!4m13!1m5!1m1!1s0x89c259a9b3117469:0xd134e199a405a163!2m2!1d-73.98566439999999!2d40.7484405!1m5!1m1!1s0x89c2589a018531e3:0xb9df1f7387a94119!2m2!1d-73.9…"
    }
  ],
  "item_count": 1
}
```

## Use it with your agent

Copy the prompt and paste it into your agent, then tell it what you need.

Read https://scrollport.com/start. Use my existing Scrollport connection, or help me connect if needed. Help me use Google Maps Directions (tool ID: apify.johnvc-google-maps-directions). Ask me for the details you need, then show me the result.

Provider access is included. If your agent isn't connected to Scrollport yet, it will help you set that up.

No agent yet? [Create your account on the web](https://scrollport.com/sign-up) and connect one from your dashboard later.

## Questions

**Is Google Maps Directions by Apify free?**

Scrollport has no free tier: it costs $0.0344 per search, paid per use from a prepaid wallet with no subscription. Connecting your first agent adds $1 of trial credit, so you can try it before adding funds.

**Do I need an API key from Apify?**

No. Your agent runs it through your Scrollport connection (MCP, the Scrollport CLI or the HTTP API), and Scrollport handles access to Apify, so you don't sign up with Apify or manage an API key.

## Details

**About this tool**

Get directions between a start and an end address or place by the best mode, driving, transit, walking, cycling, two-wheeler or flight, optionally avoiding tolls, highways or ferries. Each lookup returns the route options with distance, duration and step-by-step trips, the duration by each travel mode and a Google Maps link. You're charged per lookup. The worked example shows selected fields: long text is shortened, nested lists keep one item and expiring media links are left out.

**All inputs and outputs**

### Input

`input` object · required

Provider-specific public source, URL or search criteria.

`maxItems` integer · optional

Maximum number of records to return.

minimum: 1 · maximum: 1

### Output

`item_count` number

`items` array

Result records.

**Errors and limits**

- `upstream_error`: The scraper could not return usable results; the wallet was not charged.Check the input and limits, or retry later.

---

Canonical page: https://scrollport.com/tools/providers/apify/johnvc-google-maps-directions
