다크 모드
Walking Directions
This API provides detailed route information from a single origin through multiple waypoints to a single destination. When using the Walking Directions API, you can add up to 5 waypoints.
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 |
|---|---|
GET | https://apis-navi.kakaomobility.com/affiliate/walking/v1/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 GET "https://apis-navi.kakaomobility.com/affiliate/walking/v1/directions?origin=127.11015314141542,37.39472714688412&destination=127.10824367964793,37.401937080111644&waypoints=&radius=5000&priority=DISTANCE&summary=false" \
-H 'accept: application/json' \
-H 'service: test' \
-H "Authorization: KakaoAK ${REST_API_KEY}"The request parameters are as follows:
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
origin | String | Departure point Use the format ${X coordinate},${Y coordinate} in longitude, latitude order(Example: 127.111202,37.394912) | O |
destination | String | Arrival point Use the format ${X coordinate},${Y coordinate} in longitude, latitude order(Example: 127.111202,37.394912) | O |
waypoints | String | Waypoint information. Up to 5 waypoints are allowed. To specify multiple waypoints, separate them with | using the format ${X coordinate},${Y coordinate} in longitude, latitude order(Example: 127.111202,37.394912|127.112275,37.392815) | X |
priority | String | Set priority options for navigation Use one of the following: DISTANCE: The shortest routeMAIN_STREET: Prioritizes main streets(Default: DISTANCE) | X |
summary | Boolean | Determines whether the response includes only the route summary or both the summary and detailed route information.true: Returns summary information only (excludes roads in sections).false: Returns summary information together with detailed route information (includes roads in sections).(Default: false) | X |
default_speed | float | Sets the walking speed for calculating estimated time of arrival (ETA) Default: 0 (which sets the speed to 4 km/h. Entering a number other than 0 will measure the estimated time using 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": "0197c33e771679cdbcccc7a8531b72ca",
"routes": [
{
"result_code": 0,
"result_message": "길찾기 성공",
"summary": {
"distance": 1281,
"duration": 1220
},
"sections": [
{
"distance": 271,
"duration": 278,
"roads": [
{
"distance": 20,
"duration": 18,
"vertexes": [
126.992479359776,
37.5641166429451,
126.99262455176134,
37.56426204879206
]
},
{
"distance": 10,
"duration": 9,
"vertexes": [
126.99262455176134,
37.56426204879206,
126.99273785260915,
37.5642540050905
]
},
{
"distance": 37,
"duration": 67,
"vertexes": [
126.99273785260915,
37.5642540050905,
126.99302896632213,
37.56449075962704
]
},
{
"distance": 35,
"duration": 32,
"vertexes": [
126.99302896632213,
37.56449075962704,
126.99313119201484,
37.56446460022759,
126.9934257021247,
37.56444909075953
]
},
{
"distance": 57,
"duration": 51,
"vertexes": [
126.9934257021247,
37.56444909075953,
126.99405999395755,
37.564418455371786
]
},
{
"distance": 14,
"duration": 13,
"vertexes": [
126.99405999395755,
37.564418455371786,
126.99410369102182,
37.56453596327218
]
},
{
"distance": 26,
"duration": 23,
"vertexes": [
126.99410369102182,
37.56453596327218,
126.99419132781937,
37.56475296023
]
},
{
"distance": 29,
"duration": 26,
"vertexes": [
126.99419132781937,
37.56475296023,
126.9942897986855,
37.56500609112572
]
},
{
"distance": 29,
"duration": 26,
"vertexes": [
126.9942897986855,
37.56500609112572,
126.99442234564174,
37.56525050175984
]
},
{
"distance": 14,
"duration": 13,
"vertexes": [
126.99442234564174,
37.56525050175984,
126.99456996543414,
37.56521571733765
]
}
]
},
{
"distance": 182,
"duration": 163,
"roads": [
{
"distance": 14,
"duration": 13,
"vertexes": [
126.99456996543414,
37.56521571733765,
126.99442234564174,
37.56525050175984
]
},
{
"distance": 17,
"duration": 15,
"vertexes": [
126.99442234564174,
37.56525050175984,
126.99448843778727,
37.56538622111689
]
},
{
"distance": 16,
"duration": 14,
"vertexes": [
126.99448843778727,
37.56538622111689,
126.99454321201681,
37.56552184404442
]
},
{
"distance": 11,
"duration": 10,
"vertexes": [
126.99454321201681,
37.56552184404442,
126.994575834464,
37.565621236581535
]
},
{
"distance": 39,
"duration": 35,
"vertexes": [
126.994575834464,
37.565621236581535,
126.99472980906961,
37.56595593361724
]
},
{
"distance": 16,
"duration": 14,
"vertexes": [
126.99472980906961,
37.56595593361724,
126.99480734167517,
37.566082739776654
]
},
{
"distance": 36,
"duration": 32,
"vertexes": [
126.99480734167517,
37.566082739776654,
126.99519373500847,
37.56596889353896
]
},
{
"distance": 19,
"duration": 17,
"vertexes": [
126.99519373500847,
37.56596889353896,
126.99540890220916,
37.56596171425369
]
},
{
"distance": 14,
"duration": 13,
"vertexes": [
126.99540890220916,
37.56596171425369,
126.9953958900632,
37.56608774951504
]
}
]
},
{
"distance": 828,
"duration": 779,
"roads": [
{
"distance": 14,
"duration": 13,
"vertexes": [
126.9953958900632,
37.56608774951504,
126.99540890220916,
37.56596171425369
]
},
{
"distance": 19,
"duration": 17,
"vertexes": [
126.99540890220916,
37.56596171425369,
126.99519373500847,
37.56596889353896
]
},
{
"distance": 36,
"duration": 32,
"vertexes": [
126.99519373500847,
37.56596889353896,
126.99480734167517,
37.566082739776654
]
},
{
"distance": 16,
"duration": 14,
"vertexes": [
126.99480734167517,
37.566082739776654,
126.99472980906961,
37.56595593361724
]
},
{
"distance": 39,
"duration": 35,
"vertexes": [
126.99472980906961,
37.56595593361724,
126.994575834464,
37.565621236581535
]
},
{
"distance": 11,
"duration": 10,
"vertexes": [
126.994575834464,
37.565621236581535,
126.99454321201681,
37.56552184404442
]
},
{
"distance": 16,
"duration": 14,
"vertexes": [
126.99454321201681,
37.56552184404442,
126.99448843778727,
37.56538622111689
]
},
{
"distance": 17,
"duration": 15,
"vertexes": [
126.99448843778727,
37.56538622111689,
126.99442234564174,
37.56525050175984
]
},
{
"distance": 29,
"duration": 26,
"vertexes": [
126.99442234564174,
37.56525050175984,
126.9942897986855,
37.56500609112572
]
},
{
"distance": 29,
"duration": 26,
"vertexes": [
126.9942897986855,
37.56500609112572,
126.99419132781937,
37.56475296023
]
},
{
"distance": 26,
"duration": 23,
"vertexes": [
126.99419132781937,
37.56475296023,
126.99410369102182,
37.56453596327218
]
},
{
"distance": 14,
"duration": 13,
"vertexes": [
126.99410369102182,
37.56453596327218,
126.99405999395755,
37.564418455371786
]
},
{
"distance": 57,
"duration": 51,
"vertexes": [
126.99405999395755,
37.564418455371786,
126.9934257021247,
37.56444909075953
]
},
{
"distance": 35,
"duration": 32,
"vertexes": [
126.9934257021247,
37.56444909075953,
126.99313119201484,
37.56446460022759,
126.99302896632213,
37.56449075962704
]
},
{
"distance": 37,
"duration": 67,
"vertexes": [
126.99302896632213,
37.56449075962704,
126.99273785260915,
37.5642540050905
]
},
{
"distance": 10,
"duration": 9,
"vertexes": [
126.99273785260915,
37.5642540050905,
126.99262455176134,
37.56426204879206
]
},
{
"distance": 53,
"duration": 48,
"vertexes": [
126.99262455176134,
37.56426204879206,
126.9922561566302,
37.56388046675872
]
},
{
"distance": 24,
"duration": 22,
"vertexes": [
126.9922561566302,
37.56388046675872,
126.99208857311656,
37.56371684843795
]
},
{
"distance": 40,
"duration": 36,
"vertexes": [
126.99208857311656,
37.56371684843795,
126.99179807247312,
37.56343504467799
]
},
{
"distance": 65,
"duration": 59,
"vertexes": [
126.99179807247312,
37.56343504467799,
126.99130591900703,
37.56299834016708
]
},
{
"distance": 14,
"duration": 13,
"vertexes": [
126.99130591900703,
37.56299834016708,
126.99131893737756,
37.562872305383216
]
},
{
"distance": 39,
"duration": 35,
"vertexes": [
126.99131893737756,
37.562872305383216,
126.99136894548609,
37.56252132587181
]
},
{
"distance": 43,
"duration": 39,
"vertexes": [
126.99136894548609,
37.56252132587181,
126.99146349491211,
37.56222478940402,
126.99150973704714,
37.56215310097548
]
},
{
"distance": 49,
"duration": 44,
"vertexes": [
126.99150973704714,
37.56215310097548,
126.99167134096199,
37.56192021010418,
126.99167364803363,
37.56174903161404
]
},
{
"distance": 41,
"duration": 37,
"vertexes": [
126.99167364803363,
37.56174903161404,
126.99164467384168,
37.561379356451745
]
},
{
"distance": 16,
"duration": 14,
"vertexes": [
126.99164467384168,
37.561379356451745,
126.9916126641763,
37.561234916142325
]
},
{
"distance": 39,
"duration": 35,
"vertexes": [
126.9916126641763,
37.561234916142325,
126.99116008600868,
37.561222039280274
]
}
]
}
]
}
]
}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 | O |
result_code | Int | Result code | O |
result_message | String | Result message | O |
summary | Object | Summary information of directions | X |
distance | Int | Total route distance in meters | O |
duration | Int | Total required time to destination in seconds | O |
sections | Object[] | Route data by section. Only returned if summary is set to false.If waypoints are specified, sections are created as many as {number of waypoints + 1}. (Example: If the number of waypoints is two, three sections are created. section1: origin → waypoint1 section2: waypoint1 → waypoint2 section3: waypoint2 → destination) | X |
distance | Int | Distance between sections in meters | O |
duration | Int | Total required time in seconds | O |
roads | Object[] | Road information | O |
distance | Int | Road distance in meters | O |
duration | Int | Estimated travel time in seconds | O |
vertexes | Double[] | One-dimensional array that includes X and Y coordinates (Example: [127.10966790676201, 37.394469584427156, 127.10967141980313, 37.39512739646385] ) | O |