You're all set!

To start developing, please head over to our developer documentation.

Activate the Google Maps Directions API

To get you started we'll guide you through the Google Developers Console to do a few things first:

  1. Create or choose a project
  2. Activate the Google Maps Directions API
  3. Create appropriate keys

Get Started

The Google Maps 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.

This service is also available as part of the client-side Google Maps JavaScript API, or for server-side use with the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services.

Sample request and response

You access the Google Maps Directions API through an HTTP interface, with requests constructed as a URL string, using text strings or latitude/longitude coordinates to identify the locations, along with your API key.

The following example requests the driving directions from Disneyland to Universal Studios Hollywood, in JSON format:

Try it! You can test this request by entering the URL into your web browser (be sure to replace ‘YOUR_API_KEY’ with your actual API key). The response returns the driving directions.

View the developer's guide for more information about building request URLs and available parameters and understanding the response.

Below is a sample response, in JSON:

   "geocoded_waypoints" : [
         "geocoder_status" : "OK",
         "place_id" : "ChIJRVY_etDX3IARGYLVpoq7f68",
         "types" : [
         "geocoder_status" : "OK",
         "partial_match" : true,
         "place_id" : "ChIJp2Mn4E2-woARQS2FILlxUzk",
         "types" : [ "route" ]
   "routes" : [
         "bounds" : {
            "northeast" : {
               "lat" : 34.1330949,
               "lng" : -117.9143879
            "southwest" : {
               "lat" : 33.8068768,
               "lng" : -118.3527671
         "copyrights" : "Map data ©2016 Google",
         "legs" : [
               "distance" : {
                  "text" : "35.9 mi",
                  "value" : 57824
               "duration" : {
                  "text" : "51 mins",
                  "value" : 3062
               "end_address" : "Universal Studios Blvd, Los Angeles, CA 90068, USA",
               "end_location" : {
                  "lat" : 34.1330949,
                  "lng" : -118.3524442
               "start_address" : "Disneyland (Harbor Blvd.), S Harbor Blvd, Anaheim, CA 92802, USA",
               "start_location" : {
                  "lat" : 33.8098177,
                  "lng" : -117.9154353

  ... Additional results truncated in this example[] ...

         "overview_polyline" : {
            "points" : "knjmEnjunUbKCfEA?_@]@kMBeE@qIIoF@wH@eFFk@WOUI_@?u@j@k@`@EXLTZHh@Y`AgApAaCrCUd@cDpDuAtAoApA{YlZiBdBaIhGkFrDeCtBuFxFmIdJmOjPaChDeBlDiAdD}ApGcDxU}@hEmAxD}[tt@yNb\\yBdEqFnJqB~DeFxMgK~VsMr[uKzVoCxEsEtG}BzCkHhKWh@]t@{AxEcClLkCjLi@`CwBfHaEzJuBdEyEhIaBnCiF|K_Oz\\
         "summary" : "I-5 N and US-101 N",
         "warnings" : [],
         "waypoint_order" : []
   "status" : "OK"

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 Google Maps Directions API is available in the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services.

Authentication, quotas, and policies

Activate the API and get an API key

To use the Google Maps Directions API, you must first activate the API in the Google API 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 follow a process where you will:

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

Learn more about authentication credentials.


Review the usage limits page for details on the quotas set for the Google Maps Directions API.


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

From our Terms of Service

Innovate, but don't

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’s guide for more examples and other details.

Send feedback about...

Google Maps Directions API
Google Maps Directions API
Need help? Visit our support page.