이 제품 또는 기능은 기존 상태입니다. 기존 상태 및 기존 서비스에서 최신 서비스로 이전하는 방법에 대한 자세한 내용은
기존 제품 및 기능을 참고하세요.
Directions API (기존) 개요
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.

Directions API (기존)는 HTTP 요청을 수락하고 위치 간의 경로를 JSON 또는 XML 형식으로 반환하는 서비스입니다.
Directions API를 사용해야 하는 이유
Directions API를 사용하면 대중교통, 운전, 도보, 자전거 등 여러 교통수단 모드의 경로를 확인할 수 있습니다.
Directions API로 무엇을 할 수 있나요?
Directions API를 사용하면 다음 세부정보를 비롯해 위치 간 경로를 계산할 수 있습니다.
- 대중교통, 운전, 도보, 자전거 등 여러 교통수단의 경로
- 일련의 경유지를 사용하는 멀티파트 경로입니다.
- 텍스트 문자열 (예: 'Chicago, IL' 또는 'Darwin, NT, Australia'), 장소 ID 또는 위도/경도 좌표 등 다양한 방법으로 출발지, 목적지, 경유지를 지정합니다.
Directions API 작동 방식
경로 API는 경로를 계산할 때 가장 효율적인 경로를 반환합니다. 제품은 가장 효율적인 경로를 결정할 때 다음 여행 요소를 고려합니다.
다음 예시 요청은 온타리오주 토론토에서 퀘벡주 몬트리올까지의 운전 경로를 JSON 형식으로 반환합니다.
https://maps.googleapis.com/maps/api/directions/json
?destination=Montreal
&origin=Toronto
&key=YOUR_API_KEY
리소스
다음 표에는 Directions API를 통해 사용할 수 있는 리소스와 반환되는 데이터가 요약되어 있습니다.
데이터 리소스 |
반환된 데이터 |
반환 형식 |
경로
장소 ID, 주소 또는 위도/경도 좌표 형식으로 출발지와 도착지를 제공합니다. 자세한 내용은 필수 매개변수를 참고하세요.
|
경로, 구간, 단계로 구분된 자세한 안내입니다. 자세한 내용은 경로 응답을 참고하세요.
|
|
Directions API 사용 방법
1 |
설정하기 |
Google Cloud 프로젝트 설정하기로 시작하여 이어지는 설정 안내를 완료합니다. |
2 |
데모 사용해 보기 |
API 키와 클라우드 프로젝트가 있으면 경로 데모를 무료로 사용해 볼 수 있습니다. Directions API 데모를 참고하세요.
|
3 |
요청 빌드 |
요청 예시를 확인하고 이동 수단, 경유지, 경로 제한과 같이 제공할 수 있는 옵션을 알아보세요. 경로 예시를 참고하세요.
|
4 |
대답 기본사항 이해하기 |
데이터 응답을 살펴보고 앱에서 경로 데이터를 사용할 준비를 합니다. 자세한 내용은 경로 응답을 참고하세요.
|
5 |
방향 데이터를 자체 앱에 통합하세요. |
이 데이터를 사용하여 이동 거리와 시간을 계산할 수 있습니다.
|
사용 가능한 클라이언트 라이브러리
다음 클라이언트 라이브러리 중 하나를 통해 원하는 언어로 이 API를 호출합니다.
Google 지도 서비스용 Java Client, Python Client, Go Client, Node.js Client는 커뮤니티 지원 클라이언트 라이브러리로, Apache 2.0 라이선스에 따라 오픈 소스로 제공됩니다.
GitHub에서 다운로드하세요. GitHub에서는 설치 안내와 샘플 코드도 찾을 수 있습니다.
다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThe Directions API provides route information between locations using various transportation modes like driving, walking, transit, or bicycling.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize your requests by specifying origins, destinations, waypoints, and travel preferences.\u003c/p\u003e\n"],["\u003cp\u003eThe API calculates the most efficient routes based on travel time, distance, and the number of turns.\u003c/p\u003e\n"],["\u003cp\u003eResults are available in JSON or XML format and include detailed directions, routes, legs, and steps.\u003c/p\u003e\n"],["\u003cp\u003eClient libraries are available in Java, Python, Go, and Node.js for easy integration into your applications.\u003c/p\u003e\n"]]],[],null,["# Directions API (Legacy) overview\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nThe Directions API (Legacy) is a service that accepts an HTTP request and returns JSON or XML-formatted directions between locations.\n\nWhy use the Directions API\n--------------------------\n\nWith the Directions API, you can get directions for several modes of\ntransportation, such as transit, driving, walking, or bicycling.\n\nWhat you can do with the Directions API?\n----------------------------------------\n\nWith the Directions API, you can calculate directions between locations,\nincluding the following details:\n\n- Directions for several modes of transportation, including transit, driving, walking or bicycling.\n- Multipart directions using a series of waypoints.\n- Specify origins, destinations, and waypoints in multiple ways, including as text strings (for example, \"Chicago, IL\" or \"Darwin, NT, Australia\"), place IDs, or latitude/longitude coordinates.\n\nHow the Directions API works\n----------------------------\n\nThe Directions API returns the most efficient routes when\ncalculating directions. The product factors in the following travel elements\nwhen determining the most efficient route:\n\n- Travel time (primary)\n- Distance\n- Number of turns\n\nThe following example request returns driving directions from Toronto, Ontario to Montreal, Quebec in JSON format: \n\n```scdoc\nhttps://maps.googleapis.com/maps/api/directions/json\n ?destination=Montreal\n &origin=Toronto\n &key=YOUR_API_KEY\n```\n\n### Resources\n\nThe following table summarizes the resources available through the\nDirections API along with the data it returns.\n\n\u003cbr /\u003e\n\n| Data resources | Data returned | Return format |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|\n| [Directions](/maps/documentation/directions/get-directions#DirectionsRequests) Supply origins and destinations in the form of place IDs, addresses, or latitude/longitude coordinates. See [required parameters](/maps/documentation/directions/get-directions#required-parameters) for details. | Detailed directions, broken into routes, legs, and steps. See [Directions responses](/maps/documentation/directions/get-directions#DirectionsResponses) for details. | - JSON - XML |\n\n\u003cbr /\u003e\n\nHow to use the Directions API\n-----------------------------\n\n|---|---------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1 | **Get set up.** | Start with [Set up your Google Cloud project](/maps/documentation/directions/cloud-setup) and complete the setup instructions that follow. |\n| 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](/maps/documentation/directions/start). |\n| 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](/maps/documentation/directions/get-directions#ExampleRequests). |\n| 4 | **Understand response basics** | Explore the data responses to prepare to use directions data for your app. See [Directions responses](/maps/documentation/directions/get-directions#DirectionsResponses) for details. |\n| 5 | **Incorporate direction data into your own app!** | You can use this data to calculate travel distance and time. |\n\n#### Available client libraries\n\nCall this API in the language of\nyour choice through one of the following client libraries:\n\n- [Java\n Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-java)\n- [Python\n Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-python)\n- [Go Client\n for Google Maps Services](https://github.com/googlemaps/google-maps-services-go)\n- [Node.js\n Client for Google Maps Services](https://github.com/googlemaps/google-maps-services-js)\n\nThe Java Client, Python Client, Go Client and Node.js Client for Google Maps\nServices are community-supported client libraries, open sourced under the\n[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).\nDownload them from GitHub, where you can also find installation instructions and sample code.\n\nWhat's next\n-----------\n\n- **Start using the Directions API** : Go to [Get started](/maps/documentation/directions/start).\n- **Start making Directions requests** : Go to [Get\n directions](/maps/documentation/directions/get-directions).\n- **Follow best practices** : Go to [Web service best\n practices](/maps/documentation/directions/web-service-best-practices)."]]