A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/maps/documentation/directions/intro below:

Directions API (Legacy) overview | Google for Developers

Skip to main content Directions API (Legacy) overview

Stay organized with collections Save and categorize content based on your preferences.

The Directions API (Legacy) is a service that accepts an HTTP request and returns JSON or XML-formatted directions between locations.

Why use the Directions API

With the Directions API, you can get directions for several modes of transportation, such as transit, driving, walking, or bicycling.

What you can do with the Directions API?

With the Directions API, you can calculate directions between locations, including the following details:

How the Directions API works

The Directions API returns the most efficient routes when calculating directions. The product factors in the following travel elements when determining the most efficient route:

The following example request returns driving directions from Toronto, Ontario to Montreal, Quebec in JSON format:

https://maps.googleapis.com/maps/api/directions/json
  ?destination=Montreal
  &origin=Toronto
  &key=YOUR_API_KEY
Resources

The following table summarizes the resources available through the Directions API along with the data it returns.

Data resources Data returned Return format Directions

Supply origins and destinations in the form of place IDs, addresses, or latitude/longitude coordinates. See required parameters for details.

Detailed directions, broken into routes, legs, and steps. See Directions responses for details. How to use the Directions API 1 Get set up. Start with Set up your Google Cloud project and complete the setup instructions that follow. 2 Try the demo Once you have an API key and a cloud project you try out the directions demo at no charge. See The Directions API demo. 3 Build a request See the example requests and learn about the available options you can supply, such as travel modes, waypoints, and route restrictions. See Directions examples. 4 Understand response basics Explore the data responses to prepare to use directions data for your app. See Directions responses for details. 5 Incorporate direction data into your own app! You can use this data to calculate travel distance and time. Available client libraries

Call this API in the language of your choice through one of the following client libraries:

The Java Client, Python Client, Go Client and Node.js Client for Google Maps Services are community-supported client libraries, open sourced under the Apache 2.0 License. Download them from GitHub, where you can also find installation instructions and sample code.

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-14 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["The Directions API provides route information between locations using various transportation modes like driving, walking, transit, or bicycling."],["You can customize your requests by specifying origins, destinations, waypoints, and travel preferences."],["The API calculates the most efficient routes based on travel time, distance, and the number of turns."],["Results are available in JSON or XML format and include detailed directions, routes, legs, and steps."],["Client libraries are available in Java, Python, Go, and Node.js for easy integration into your applications."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4