[][src]Module google_maps::directions

The Directions API is a service that calculates directions between locations. You can search for directions for several modes of transportation, including transit, driving, walking, or cycling.

Get Started

Start coding with our client libraries

Client libraries make developing with the Google Maps web service APIs easier by providing simple, native implementations of common tasks, such as authentication, request throttling and automatic retry. The Directions API is available in the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services.

Authentication, quotas, pricing, and policies

Activate the API and get an API key

To use the Directions API, you must first activate the API in the Google Cloud Platform Console and obtain the proper authentication credentials. You need to provide an API key in each request (or a client ID if you have a Premium Plan.

Click the button below to flow through a process where you will:

  1. Create or select a project
  2. Enable the API
  3. Get an API key

Get Started

Learn more about authentication credentials.

Quotas and pricing

Review the usage and billing page for details on the quotas and pricing set for the Directions API.

Policies

Use of the Directions API must be in accordance with the API policies.

From our Terms of Service: Innovate, but don't duplicate. Don't make a substitute for Google Maps. If your app's primary purpose is navigation, a business directory, or a general purpose "maps app", it's a substitute for Google Maps. Learn more.

Learn more

There’s more you can do with the Directions API, like requesting directions via different travel modes, using waypoints to calculate routes through additional locations, and estimating travel time. See the Directions API developer guide for more examples and other details.

The Directions API developer guide is intended for website and mobile developers who want to compute direction data within maps provided by one of the Google Maps APIs. It provides an introduction to using the API and reference material on the available parameters.

Modules

error

Time Zone API error types and error messages.

request
response

Resources (enums, structs) for the client process the Directions API response from the Google Cloud server.

travel_mode
vehicle_type