대중교통 API
출발지/목적지에 대한 대중교통 경로탐색 정보와 전체 보행자 이동 경로를 제공합니다.
해당 API를 사용하기 위해서는 앱 키 값이 반드시 필요합니다.
Guide 페이지를 참고하세요.
API URL
https://apis.openapi.sk.com/transit/routes
Basic Information
Request
Parameters
Request Sample - Code type : application/json
{
"startX": "127.02479803562213",
"startY": "37.504585233865086",
"endX": "127.03747630119366",
"endY": "37.479103923078995",
"count" : 1,
"lang": 0,
"format":"json"
}
Response
Parameters
Response Sample - Code type : application/json
{
"metaData": {
"requestParameters": {
"busCount": 1,
"expressbusCount": 0,
"subwayCount": 0,
"airplaneCount": 0,
"locale": "ko",
"endY": "37.479103923078995",
"endX": "127.03747630119366",
"wideareaRouteCount": 0,
"subwayBusCount": 0,
"startY": "37.504585233865086",
"startX": "127.02479803562213",
"ferryCount": 0,
"trainCount": 0,
"reqDttm": "20230808082843"
},
"plan": {
"itineraries": [
{
"fare": {
"regular": {
"totalFare": 1500,
"currency": {
"symbol": "₩",
"currency": "원",
"currencyCode": "KRW"
}
}
},
"totalTime": 873,
"legs": [
{
"mode": "WALK",
"sectionTime": 400,
"distance": 408,
"start": {
"name": "출발지",
"lon": 127.02479803562213,
"lat": 37.504585233865086
},
"end": {
"name": "지하철2호선강남역(중)",
"lon": 127.02569444444444,
"lat": 37.501725
},
"steps": [
{
"streetName": "",
"distance": 13,
"description": "13m 이동",
"linestring": "127.02481,37.504562 127.024666,37.50452"
},
{
"streetName": "",
"distance": 8,
"description": "미스터도넛 신논현역점 에서 좌회전 후 8m 이동 ",
"linestring": "127.024666,37.50452 127.02475,37.50451"
},
{
"streetName": "",
"distance": 45,
"description": "신논현역 에서 우회전 후 45m 이동 ",
"linestring": "127.02475,37.50451 127.0249,37.504158 127.02495,37.504147"
},
{
"streetName": "",
"distance": 17,
"description": "고우넷치과의원 에서 우회전 후 17m 이동 ",
"linestring": "127.02495,37.504147 127.02498,37.504078 127.025024,37.50401"
},
{
"streetName": "",
"distance": 8,
"description": "파리바게뜨 강남교보점 에서 횡단보도 후 8m 이동 ",
"linestring": "127.025024,37.50401 127.02508,37.50395"
},
{
"streetName": "",
"distance": 146,
"description": "파리바게뜨 강남교보점 에서 직진 후 146m 이동 ",
"linestring": "127.02508,37.50395 127.02538,37.503304 127.02563,37.502796 127.02566,37.50272"
},
{
"streetName": "",
"distance": 7,
"description": "횡단보도 후 7m 이동 ",
"linestring": "127.02566,37.50272 127.02569,37.502663"
},
{
"streetName": "",
"distance": 116,
"description": "직진 후 116m 이동 ",
"linestring": "127.02569,37.502663 127.02589,37.502205 127.02605,37.501846127.02614,37.50168"
},
{
"streetName": "",
"distance": 29,
"description": "GS25 강남스타점 에서 우측 횡단보도 후 29m 이동 ",
"linestring": "127.02614,37.50168 127.02583,37.501587"
},
{
"streetName": "강남대로",
"distance": 19,
"description": "우회전 후 강남대로 을 따라 19m 이동 ",
"linestring": "127.02583,37.501587 127.02576,37.501743"
}
]
},
{
"routeColor": "0068B7",
"distance": 2759,
"start": {
"name": "지하철2호선강남역(중)",
"lon": 127.02569444444444,
"lat": 37.501725
},
"Lane": [
{
"routeColor": "0068B7",
"route": "간선:542",
"routeId": "2247001",
"service": 1,
"type": 11
}
],
"type": 11,
"mode": "BUS",
"sectionTime": 411,
"route": "간선:400",
"routeId": "11504001",
"service": 1,
"passStopList": {
"stationList": [
{
"index": 0,
"stationName": "지하철2호선강남역(중)",
"lon": "127.025694",
"lat": "37.501725",
"stationID": "772608"
},
{
"index": 1,
"stationName": "신분당선강남역",
"lon": "127.028347",
"lat": "37.495903",
"stationID": "772411"
},
{
"index": 2,
"stationName": "래미안아파트.파이낸셜뉴스",
"lon": "127.030469",
"lat": "37.491636",
"stationID": "772236"
},
{
"index": 3,
"stationName": "뱅뱅사거리",
"lon": "127.032414",
"lat": "37.487658",
"stationID": "772093"
},
{
"index": 4,
"stationName": "양재역",
"lon": "127.034622",
"lat": "37.483653",
"stationID": "771957"
},
{
"index": 5,
"stationName": "일동제약사거리",
"lon": "127.038247",
"lat": "37.479047",
"stationID": "771820"
}
]
},
"end": {
"name": "일동제약사거리",
"lon": 127.03824722222222,
"lat": 37.47904722222222
},
"passShape": {
"linestring": "127.025675,37.501708 127.026528,37.499994 127.026856,37.499408 127.027367,37.498353 127.027525,37.498025 127.027589,37.497892 127.027717,37.497525 127.028253,37.496306 127.028436,37.495922 127.029794,37.493072 127.029858,37.492939 127.030497,37.491664 127.031522,37.489619 127.031586,37.489483 127.032458,37.487656 127.033683,37.485086 127.033819,37.484811 127.033928,37.484633 127.034036,37.484503 127.034319,37.484181 127.034628,37.483844 127.034800,37.483678 127.037200,37.481392 127.037383,37.481169 127.037661,37.480753 127.038047,37.480053 127.038289,37.479453 127.038389,37.479136"
}
},
{
"mode": "WALK",
"sectionTime": 62,
"distance": 84,
"start": {
"name": "일동제약사거리",
"lon": 127.03824722222222,
"lat": 37.47904722222222
},
"end": {
"name": "도착지",
"lon": 127.03747630119366,
"lat": 37.479103923078995
},
"steps": [
{
"streetName": "강남대로",
"distance": 36,
"description": "강남대로 을 따라 36m 이동",
"linestring": "127.0381,37.479004 127.03806,37.4791 127.03799,37.479313"
},
{
"streetName": "",
"distance": 48,
"description": "실버텍스 에서 좌회전 후 48m 이동 ",
"linestring": "127.03799,37.479313 127.037636,37.479263 127.037445,37.47924"
}
]
}
],
"totalWalkTime": 462,
"transferCount": 0,
"totalDistance": 3157,
"pathType": 2,
"totalWalkDistance": 492
}
]
}
}
}
Error code index
이동수단 노선 코드
지하철
버스
기차