# Google API: Get directions

> Gets up to three Google Maps routes between two places, with distances, travel times and step-by-step directions.

Unofficial. Not affiliated with or endorsed by Google.

- Page: https://fous.com/methods/google.com/get-directions
- Method: `google.com/get_directions`, version 1
- Website: google.com
- Returns: start and end address, routes with summary, distance, travel time, steps, page link
- Effect: read (it gets data and changes nothing)
- Sign-in: none needed
- Cost: 1 credit per completed run (1¢ with pay as you go); failed runs are free
- Verified: Nov 3, 2026

## Inputs

| Field | Type | Required | In the run below | Description |
|---|---|---|---|---|
| `avoid` | string | no | `"none"` | A road feature to avoid, such as tolls; defaults to none. One of "none", "tolls", "highways", "ferries". Default "none". |
| `origin` | string | yes | `"Golden Gate Bridge"` | Starting address, place name or city, such as Golden Gate Bridge. |
| `destination` | string | yes | `"Stanford University"` | Destination address, place name or city, such as Stanford University. |
| `travel_mode` | string | no | `"driving"` | How to travel, such as walking; defaults to driving. One of "driving", "walking", "cycling", "public_transit". Default "driving". |
| `departure_time` | string | no |  | Departure date and time with time zone offset, such as 2026-10-01T09:00:00-07:00; defaults to now. |

## Output

From a run on Nov 2, 2026, shortened. Its input:

```json
{
  "avoid": "none",
  "origin": "Golden Gate Bridge",
  "destination": "Stanford University",
  "travel_mode": "driving"
}
```

Its output:

```json
{
  "routes": [
    {
      "steps": [
        {
          "time": "3 min",
          "to_stop": null,
          "distance": "2.1 mi",
          "from_stop": null,
          "line_name": null,
          "instruction": "Head southeast on US-101 S",
          "time_seconds": 167,
          "departure_time": null,
          "distance_metres": 3428
        },
        {
          "time": "14 sec",
          "to_stop": null,
          "distance": "0.2 mi",
          "from_stop": null,
          "line_name": null,
          "instruction": "Use the right 2 lanes to take exit 438",
          "time_seconds": 14,
          "departure_time": null,
          "distance_metres": 288
        },
        {
          "time": "6 min",
          "to_stop": null,
          "distance": "2.5 mi",
          "from_stop": null,
          "line_name": null,
          "instruction": "Continue onto CA-1",
          "time_seconds": 359,
          "departure_time": null,
          "distance_metres": 4062
        }
      ],
      "summary": "I-280 S",
      "page_link": "https://www.google.com/maps/dir/Golden+Gate+Bridge,+Golden+Gate+Brg,+San+Francisco,+CA/Stanford+University,+450+Jane+Stanford+Way,+Stanford,+CA+94305/data=!4m14!4m13!1m5!1m1!1s0x808586deffffffc3:0xcded139783705509!2m2!1d-122.4785598!2d37.819910899999996!1m5!1m1!1s0x808fbb2a678bea9d:0x29cdf01a44fc687…",
      "distance_km": 61.9,
      "travel_time": "43 min",
      "distance_miles": 38.5,
      "distance_metres": 61933,
      "travel_time_seconds": 2606
    },
    {
      "steps": [
        {
          "time": "3 min",
          "to_stop": null,
          "distance": "2.1 mi",
          "from_stop": null,
          "line_name": null,
          "instruction": "Head southeast on US-101 S",
          "time_seconds": 167,
          "departure_time": null,
          "distance_metres": 3428
        },
        {
          "time": "14 sec",
          "to_stop": null,
          "distance": "0.2 mi",
          "from_stop": null,
          "line_name": null,
          "instruction": "Use the right 2 lanes to take exit 438",
          "time_seconds": 14,
          "departure_time": null,
          "distance_metres": 288
        },
        {
          "time": "6 min",
          "to_stop": null,
          "distance": "2.5 mi",
          "from_stop": null,
          "line_name": null,
          "instruction": "Continue onto CA-1",
          "time_seconds": 359,
          "departure_time": null,
          "distance_metres": 4062
        }
      ],
      "summary": "CA-1 and I-280 S",
      "page_link": "https://www.google.com/maps/dir/Golden+Gate+Bridge,+Golden+Gate+Brg,+San+Francisco,+CA/Stanford+University,+450+Jane+Stanford+Way,+Stanford,+CA+94305/data=!4m14!4m13!1m5!1m1!1s0x808586deffffffc3:0xcded139783705509!2m2!1d-122.4785598!2d37.819910899999996!1m5!1m1!1s0x808fbb2a678bea9d:0x29cdf01a44fc687…",
      "distance_km": 60.9,
      "travel_time": "47 min",
      "distance_miles": 37.8,
      "distance_metres": 60870,
      "travel_time_seconds": 2828
    },
    {
      "steps": [
        {
          "time": "6 min",
          "to_stop": null,
          "distance": "3.7 mi",
          "from_stop": null,
          "line_name": null,
          "instruction": "Head southeast on US-101 S",
          "time_seconds": 353,
          "departure_time": null,
          "distance_metres": 6019
        },
        {
          "time": "4 min",
          "to_stop": null,
          "distance": "0.9 mi",
          "from_stop": null,
          "line_name": null,
          "instruction": "Use any lane to turn slightly left onto Lombard St",
          "time_seconds": 246,
          "departure_time": null,
          "distance_metres": 1524
        },
        {
          "time": "11 min",
          "to_stop": null,
          "distance": "1.9 mi",
          "from_stop": null,
          "line_name": null,
          "instruction": "Turn right onto Gough St",
          "time_seconds": 665,
          "departure_time": null,
          "distance_metres": 3117
        }
      ],
      "summary": "US-101 S",
      "page_link": "https://www.google.com/maps/dir/Golden+Gate+Bridge,+Golden+Gate+Brg,+San+Francisco,+CA/Stanford+University,+450+Jane+Stanford+Way,+Stanford,+CA+94305/data=!4m14!4m13!1m5!1m1!1s0x808586deffffffc3:0xcded139783705509!2m2!1d-122.4785598!2d37.819910899999996!1m5!1m1!1s0x808fbb2a678bea9d:0x29cdf01a44fc687…",
      "distance_km": 63.3,
      "travel_time": "49 min",
      "distance_miles": 39.3,
      "distance_metres": 63284,
      "travel_time_seconds": 2962
    }
  ],
  "end_address": "Stanford University, 450 Jane Stanford Way, Stanford, CA 94305",
  "start_address": "Golden Gate Bridge, Golden Gate Brg, San Francisco, CA"
}
```

## Run it

From code, with a Fous API key in `FOUS_API_KEY`; the answer's `data` holds the output:

```bash
curl https://api.fous.com/v1/runs \
  -H "Authorization: Bearer $FOUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"google.com/get_directions","input":{"avoid":"none","origin":"Golden Gate Bridge","destination":"Stanford University","travel_mode":"driving"}}'
```

From an AI agent connected to the Fous MCP server: its `run` with the same method and input. To connect one, give it `set up https://fous.com/SKILL.md`.

## Ask your agent

- How long does it take to drive from Lisbon airport to the old town center, and what are the turn-by-turn steps?
- Walking route from Central Park South to the Brooklyn Bridge, with distance and estimated time please.
- Find me a driving route from Seattle to Portland that avoids tolls, leaving at 7:30 AM Pacific on October 3, 2026.
- What are the cycling options from Amsterdam Centraal to Vondelpark, and which one is shortest?
- Get public transit directions from 221B Baker Street, London to King's Cross Station for a departure at 8:15 AM on 2026-10-05 in GMT+1, showing all the steps.

## Input schema

```json
{
  "type": "object",
  "required": [
    "origin",
    "destination"
  ],
  "properties": {
    "avoid": {
      "enum": [
        "none",
        "tolls",
        "highways",
        "ferries"
      ],
      "type": "string",
      "default": "none",
      "description": "A road feature to avoid, such as tolls; defaults to none."
    },
    "origin": {
      "type": "string",
      "minLength": 1,
      "description": "Starting address, place name or city, such as Golden Gate Bridge."
    },
    "destination": {
      "type": "string",
      "minLength": 1,
      "description": "Destination address, place name or city, such as Stanford University."
    },
    "travel_mode": {
      "enum": [
        "driving",
        "walking",
        "cycling",
        "public_transit"
      ],
      "type": "string",
      "default": "driving",
      "description": "How to travel, such as walking; defaults to driving."
    },
    "departure_time": {
      "type": "string",
      "description": "Departure date and time with time zone offset, such as 2026-10-01T09:00:00-07:00; defaults to now."
    }
  }
}
```

## Output schema

```json
{
  "type": "object",
  "required": [
    "start_address",
    "end_address",
    "routes"
  ],
  "properties": {
    "routes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "time": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "to_stop": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "distance": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "from_stop": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "line_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "instruction": {
                  "type": "string"
                },
                "time_seconds": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "departure_time": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "distance_metres": {
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              }
            }
          },
          "summary": {
            "type": "string"
          },
          "page_link": {
            "type": "string"
          },
          "distance_km": {
            "type": "number"
          },
          "travel_time": {
            "type": "string"
          },
          "distance_miles": {
            "type": "number"
          },
          "distance_metres": {
            "type": "integer"
          },
          "travel_time_seconds": {
            "type": "integer"
          }
        }
      }
    },
    "end_address": {
      "type": "string"
    },
    "start_address": {
      "type": "string"
    }
  }
}
```

## See more

- [Google API: Search Google Flights](https://fous.com/methods/google.com/search-flights.md): Finds Google Flights options for a route and date with prices, local times, stops and emissions. Round-trip searches list outbound choices with their displayed round-trip fares.
- [Google API: Get place](https://fous.com/methods/google.com/get-place.md): Looks up a public Google Maps place by name and location and returns its profile: address, rating, hours, phone, website and photos.
- [Google API: Search places](https://fous.com/methods/google.com/search-places.md): Finds businesses and places near a location on Google Maps, in Google Maps order, with rating, hours, contact details and links when shown.
- [Google API: List cheap flight destinations](https://fous.com/methods/google.com/list-cheap-destinations.md): Lists cheap round-trip destinations from a city on Google Travel Explore, sorted by fare, optionally within a region, travel month, trip length and nonstop only. Links search Google Flights for the shown dates.
- [Google API: Search Google Hotels](https://fous.com/methods/google.com/search-hotels.md): Finds places to stay in a city or area for given dates on Google Hotels, with nightly and total prices, hotel class, guest ratings, amenities, address and cheapest booking site. Optional filters for price, stars and rating; vacation rentals are left out. Prices and availability can change.
- [Google API: Get place reviews](https://fous.com/methods/google.com/get-place-reviews.md): Finds a place on Google Maps by name and location and returns its public reviews in the chosen order.
- [Google API: Get cheapest flight dates in a month](https://fous.com/methods/google.com/get-cheapest-dates.md): Finds the lowest Google Flights fare for each departure date in a month between two places, for one-way trips or a fixed trip length, with the cheapest option and any price insight shown.
- [Google API: Get hotel reviews from Google Hotels](https://fous.com/methods/google.com/get-hotel-reviews.md): Finds a hotel on Google Hotels by name and city and returns its guest reviews in the chosen order, its Google rating and review count, and topic ratings averaged from the returned reviews that rate each topic.
- [All Google methods](https://fous.com/methods/google.com.md)
