다크 모드
Multi-Destination
This API provides route information from a single origin to one or more destinations. You can set up to 100 destinations.
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/walking/v1/destinations/directions |
Request Headers
| Parameter | Description |
|---|---|
| Authorization | KakaoAK ${REST_API_KEY} {REST_API_KEY}: The API key issued from Kakao Developers |
| service | An arbitrary string to distinguish the service |
| Content-Type | application/json |
Sample request
bash
curl -v -X POST "https://apis-navi.kakaomobility.com/affiliate/walking/v1/destinations/directions" \
-H "accept: application/json" \
-H "service: test" \
-H "Content-Type: application/json" \
-H "Authorization: KakaoAK ${REST_API_KEY}" \ // The API key issued from Kakao Developers
-d '{
"origin": {
"x": 127.11022639567598,
"y": 37.39404121844038
},
"destinations": [
{
"x": 127.10909763718492,
"y": 37.39589794700353
},
{
"x": 127.11374021945907,
"y": 37.39583371633596
}
]
}'The request parameters are as follows.
| Name | Type | Description | Required |
|---|---|---|---|
origin | Object | Departure point | O |
x | Double | X coordinate (longitude) | O |
y | Double | Y coordinate (latitude) | O |
destinations | Object[] | Arrival points. Up to 100 destinations are allowed. | O |
x | Double | X coordinate (longitude) | O |
y | Double | Y coordinate (latitude) | O |
radius | Integer | Radius to find routes between origin and destinations in meters (Default: 2000, Maximum: 12000) If no value is entered, or if a value of 0 or negative is entered, the default value will be set. If a value exceeding the maximum is entered, it will be fixed at the maximum value of 12000. | X |
priority | String | Set priority options for route search Use one of the following: DISTANCE: The shortest routeMAIN_STREET: Main street priority(Default: DISTANCE) | X |
summary | Boolean | 요약 정보만 제공 여부true: 요약 정보 제공false: 요약 정보 미제공(기본값: false) | X |
default_speed | float | Speed setting to be used when measuring Estimated Time of Arrival (ETA) Default: 0 (In this case, it is set to 4 km/h. If you enter a number other than 0, the estimated time will be measured at that speed.) Minimum: 0, no maximum limit. | 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": "0197c34fa122716393e8a5a06681daef",
"routes": [
{
"result_code": 0,
"result_message": "길찾기 성공",
"summary": {
"distance": 342,
"duration": 345
},
"sections": [
{
"distance": 342,
"duration": 345,
"roads": [
{
"distance": 24,
"duration": 22,
"vertexes": [
127.11020645291707,
37.39383353475566,
127.10993532242595,
37.39384050499694
]
},
{
"distance": 10,
"duration": 9,
"vertexes": [
127.10993532242595,
37.39384050499694,
127.10988961905323,
37.39388521478862,
127.10988929942614,
37.393912244671725
]
},
{
"distance": 39,
"duration": 70,
"vertexes": [
127.10988929942614,
37.393912244671725,
127.10944888509147,
37.393908928624334
]
},
{
"distance": 32,
"duration": 29,
"vertexes": [
127.10944888509147,
37.393908928624334,
127.10944547402292,
37.39419724733547
]
},
{
"distance": 19,
"duration": 17,
"vertexes": [
127.10944547402292,
37.39419724733547,
127.10945474142122,
37.39436852161211
]
},
{
"distance": 18,
"duration": 16,
"vertexes": [
127.10945474142122,
37.39436852161211,
127.10945292927894,
37.39452169091744
]
},
{
"distance": 13,
"duration": 12,
"vertexes": [
127.10945292927894,
37.39452169091744,
127.10945154351381,
37.39463882038346
]
},
{
"distance": 3,
"duration": 3,
"vertexes": [
127.10945154351381,
37.39463882038346,
127.10945122372073,
37.394665850259905
]
},
{
"distance": 25,
"duration": 23,
"vertexes": [
127.10945122372073,
37.394665850259905,
127.10947114440512,
37.394891269322756
]
},
{
"distance": 24,
"duration": 22,
"vertexes": [
127.10947114440512,
37.394891269322756,
127.10946858608143,
37.395107508322575
]
},
{
"distance": 87,
"duration": 78,
"vertexes": [
127.10946858608143,
37.395107508322575,
127.10945931192892,
37.39589137462884
]
},
{
"distance": 15,
"duration": 14,
"vertexes": [
127.10945931192892,
37.39589137462884,
127.10943512691682,
37.396026353876806
]
},
{
"distance": 33,
"duration": 30,
"vertexes": [
127.10943512691682,
37.396026353876806,
127.10935554290191,
37.39607080825963,
127.10908451095504,
37.39606876648597
]
}
]
}
]
},
{
"result_code": 0,
"result_message": "길찾기 성공",
"summary": {
"distance": 532,
"duration": 514
},
"sections": [
{
"distance": 532,
"duration": 514,
"roads": [
{
"distance": 70,
"duration": 63,
"vertexes": [
127.11020645291707,
37.39383353475566,
127.11045489156606,
37.3938354039534,
127.11057868506042,
37.39387237820778,
127.11098522129426,
37.393875435346345
]
},
{
"distance": 22,
"duration": 20,
"vertexes": [
127.11098522129426,
37.393875435346345,
127.11124495280912,
37.39387738778665
]
},
{
"distance": 32,
"duration": 29,
"vertexes": [
127.11124495280912,
37.39387738778665,
127.11123025590503,
37.39416562176231
]
},
{
"distance": 52,
"duration": 47,
"vertexes": [
127.11123025590503,
37.39416562176231,
127.11123984651228,
37.394309866061356,
127.11137312569663,
37.394500093757166,
127.11136055650292,
37.39460812845504
]
},
{
"distance": 6,
"duration": 5,
"vertexes": [
127.11136055650292,
37.39460812845504,
127.11136002465726,
37.39465317827262
]
},
{
"distance": 43,
"duration": 39,
"vertexes": [
127.11136002465726,
37.39465317827262,
127.11184572106103,
37.39464781658411
]
},
{
"distance": 61,
"duration": 55,
"vertexes": [
127.11184572106103,
37.39464781658411,
127.11202332333251,
37.3949104625554,
127.11233952266006,
37.39491283664379
]
},
{
"distance": 35,
"duration": 32,
"vertexes": [
127.11233952266006,
37.39491283664379,
127.1127348780773,
37.394906793099075
]
},
{
"distance": 8,
"duration": 7,
"vertexes": [
127.1127348780773,
37.394906793099075,
127.11274521507063,
37.39498796753231
]
},
{
"distance": 39,
"duration": 70,
"vertexes": [
127.11274521507063,
37.39498796753231,
127.11318574226435,
37.39498226141683
]
},
{
"distance": 50,
"duration": 45,
"vertexes": [
127.11318574226435,
37.39498226141683,
127.11314942212249,
37.3951892365782,
127.11314644970408,
37.39544151564964
]
},
{
"distance": 71,
"duration": 64,
"vertexes": [
127.11314644970408,
37.39544151564964,
127.11314528195813,
37.395540625281825,
127.1131893921421,
37.39563106373057,
127.11319569585727,
37.396054616833055,
127.11321817572055,
37.396063796185196
]
},
{
"distance": 26,
"duration": 23,
"vertexes": [
127.11321817572055,
37.396063796185196,
127.11325184245167,
37.39608207018842,
127.11350018260829,
37.39609294304976
]
},
{
"distance": 17,
"duration": 15,
"vertexes": [
127.11350018260829,
37.39609294304976,
127.1135020927358,
37.39593076365041
]
}
]
}
]
}
]
}The response object information is as follows.
| Name | Type | Description | Required |
|---|---|---|---|
trans_id | String | Unique identifier of a direction request | O |
routes | Object[] | Route Information | O |
result_code | Int | Result code | O |
result_message | String | Result message | O |
summary | Object | Summary information of directions | X |
distance | Int | Total distance in meters | O |
duration | Int | Total required time to destination in seconds | O |
sections | Object[] | Route information by section is provided when summary is set to false.If waypoints exist, {number of waypoints + 1} sections (route segments) are created (Example: If there are 2 waypoints, a total of 3 sections are created, section1: origin → waypoint 1 section2: waypoint 1 → waypoint 2 section3: waypoint 2 → destination) | X |
distance | Int | Section distance in meters | O |
duration | Int | Total travel time in seconds | O |
roads | Object[] | Road information | O |
distance | Int | Road length in meters | O |
duration | Int | Estimated travel time in seconds Currently, the estimated travel time and actual travel time are set to the same value | O |
vertexes | Double[] | One-dimensional array composed of X and Y coordinates (Example: [127.10966790676201, 37.394469584427156, 127.10967141980313, 37.39512739646385] ) | O |