다크 모드
Multi-Destination
This API provides route summary information from a single origin to one or more destinations. You can set up to 100 destinations. For multi-destination routes, only summary information is provided. To obtain detailed route information, you need to make an additional request to Driving Directions.
DANGER
A REST API key is required to use this API. Please refer to Getting Started for instructions on how to register an app and obtain a REST API key.
Request
This section describes the request method and the required request headers. If the request fails, see Troubleshooting for detailed error information.
Request Method
| Method | URL |
|---|---|
POST | https://apis-navi.kakaomobility.com/affiliate/v1/destinations/directions100 |
Request Headers
| Parameter | Description |
|---|---|
| Authorization | KakaoAK ${REST_API_KEY} {REST_API_KEY}: The API key issued from Kakao Developers |
| Content-Type | application/json |
Sample request
bash
curl -v -X POST "https://apis-navi.kakaomobility.com/v1/destinations/directions" \
-H "Content-Type: application/json" \
-H "Authorization: KakaoAK ${REST_API_KEY}" \ // The API key issued from Kakao Developers
-d '{
"origin": {
"x": "127.13144306487084",
"y": " 37.44134209110179"
},
"destinations": [
{
"x": "127.14112393388389",
"y": "37.44558371517034",
"key": "0"
},
{
"x": "127.14192737519186",
"y": "37.4401766683372",
"key": "1"
}
],
"radius": 5000
}'The request parameters are as follows:
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
origins | Object | Departure point | O |
name | String | Origin name | X |
x | Double | X coordinate (longitude) | O |
y | Double | Y coordinate (latitude) | O |
destinations | Object[] | Arrival point. Up to 100 destinations are allowed. | O |
key | String | Random number to identify each destination | O |
x | Double | X coordinate (longitude) | O |
y | Double | Y coordinate (latitude) | O |
radius | Int | Radius to find routes in meters (Maximum: 20000) | O |
priority | String | Set priority options for navigation. Use one of the following: TIME: The fastest routeDISTANCE: The shortest routeNO_TRAFFIC_INFO: The fastest route without considering real-time traffic information(Default: TIME) | X |
avoid | String[] | Set restriction options for navigation. Use one or more of the following in the array: ferries: Exclude sea routetoll: Exclude toll roadmotorway: Exclude motorwayschoolzone: Exclude school zoneuturn: Exclude U-turns(Default: null)Use multiple restriction options by connecting them like this: (Example: [" ferries", "motorway"]) | X |
roadevent | Int | Road Blockage Information Option Due to Incidents (e.g., traffic accidents, events, disasters, or road construction):0: Reflect full road closures1: Do not reflect full road closures near the origin and destination.2: Do not reflect any full road closures.(Default: 0) | X |
Response
Upon successful response, the success status is delivered via HTTP status code, and the request body is delivered in JSON format.
Sample response
bash
{
"trans_id": "e01afd8505b14269bd17741d3ad712f3",
"routes": [
{
"result_code": 0,
"result_msg": "길찾기 성공",
"key": "0",
"summary": {
"distance": 1307,
"duration": 354
}
},
{
"result_code": 0,
"result_msg": "길찾기 성공",
"key": "1",
"summary": {
"distance": 1323,
"duration": 401
}
}
]
}The response object information is as follows:
Response object
| Name | Type | Description | Required |
|---|---|---|---|
trans_id | String | Unique identifier of a direction request | O |
routes | Object[] | Route Information When the alternativesparameter is set to true, one or more routes may be provided. | O |
result_code | Int | Result code | O |
result_msg | String | Result message | O |
key | String | The value of key specified for destination | O |
summary | Object | Summary information of directions | O |
distance | Int | Distance between sections in meters | O |
duration | Int | Total required time in seconds | O |