대중교통 API
- REQUSET
{
"startX": "127.02479803562213",
"startY": "37.504585233865086",
"endX": "127.03747630119366",
"endY": "37.479103923078995",
"count" : 1,
"lang": 0,
"format":"json"
}
- RESPONSE PARAMETER
Name | Data Type | Mandatory | Example | Description |
---|---|---|---|---|
metaData | node | |||
plan | node | |||
itineraries | node | 데이터 상세정보 최상위 노드 | ||
totalTime | int | 총 소요시간(sec) | ||
transferCount | int | 환승횟수 | ||
totalWalkDistance | int | 총 보행자 이동 거리(m) | ||
totalDistance | int | 총 이동거리(m) | ||
totalWalkTime | int | 총 보행자 소요시간(sec) | ||
fare | node | 금액 최상위 노드 | ||
regular | node | 금액 상위 노드 | ||
currency | node | 금액 상위 노드 | ||
symbol | string | 금액 상징(₩) | ||
currency | string | 금액 단위(원) | ||
currencyCode | string | 금액 단위 코드(KRW) | ||
totalFare | number | 대중교통요금 | ||
legs | node | 대중교통 정보 최상위 노드 | ||
distance | int | 구간별 이동거리(m) | ||
sectionTime | int | 구간별 소요시간(sec) | ||
mode | string | 이동 수단 종류 1. 도보 - WALK 2. 버스 - BUS 3. 지하철 - SUBWAY 4. 고속/시외버스 - EXPRESSBUS 5. 기차 - TRAIN 6. 항공 - AIRPLANE 7. 해운 - FERRY | ||
route | string | 대중교통 노선 명칭 | ||
routeColor | string | 대중교통 노선 색상 | ||
routeId | string | 대중교통 노선 ID | ||
start | node | 구간별 출발정보 최상위 노드 | ||
lat | number | 출발 좌표(위도) - WGS84 | ||
lon | number | 출발 좌표(경도) - WGS84 | ||
name | string | 출발 정류장 명칭 | ||
end | node | 구간별 도착정보 최상위 노드 | ||
lat | number | 도착 좌표(위도) - WGS84 | ||
lon | number | 도착 좌표(경도) - WGS84 | ||
name | string | 도착 정류장 명칭 | ||
steps | node | 구간별 도보상세정보 최상위 노드 | ||
distance | double | 도보 이동거리(m) | ||
streetName | string | 도로명 | ||
description | string | 도보 구간 정보 | ||
linestring | string | 도보 구간 좌표 - WGS84 | ||
passShape | node | 대중교통 구간 좌표 최상위 노드 | ||
linestring | string | 대중교통 구간 좌표 - WGS84 | ||
passStopList | node | 대중교통 구간 정류장 정보 최상위 노드 | ||
stations | node | 정류장 상세정보 | ||
index | number | 순번 | ||
stationID | string | 정류장 ID | ||
stationName | string | 정류장 명칭 | ||
lon | string | 정류장 좌표(경도) - WGS84 | ||
lat | string | 정류장 좌표(위도) - WGS84 | ||
type | int | 이동수단 노선 코드 참조 | ||
routePayment | int | 광역이동수단 요금 - 고속/시외버스, 기차, 항공, 해운 | ||
service | int | 이동수단 운행 여부 flag - 1 : 운행중 - 0 : 운행종료 | ||
Lane | node | 정류소 구간별 최상위 노드 - 다중 노선이 존재하는 경우에만 응답됨 | ||
- service | int | 이동수단 운행 여부 flag - 1 : 운행중 - 0 : 운행종료 | ||
- route | string | 다중 대중교통 노선 명칭 | ||
- routeColor | string | 다중 대중교통 노선 색상 | ||
- routeld | string | 다중 대중교통 노선 ID | ||
- type | int | 이동수단 노선 코드 참조 | ||
pathType | int | 경로 탐색 결과 종류 1-지하철, 2-버스, 3-버스+지하철 4-고속/시외버스, 5-기차, 6-항공, 7-해운 | ||
requestParameters | node | |||
reqDttm | string | 요청 시각 - yyyymmddhhmiss | ||
startX | string | 출발지 좌표(경도) - WGS84 | ||
startY | string | 출발지 좌표(위도) - WGS84 | ||
locale | string | 언어코드 - ko - en | ||
endX | string | 도착지 좌표(경도) - WGS84 | ||
endY | string | 도착지 좌표(위도) - WGS84 | ||
busCount | int | 버스 결과 개수 | ||
subwayCount | int | 지하철 결과 개수 | ||
subwayBusCount | int | 버스+지하철 결과 개수 | ||
expressbusCount | int | 고속/시외 버스 결과 개수 | ||
trainCount | int | 기차 결과 개수 | ||
airplaneCount | int | 항공 결과 개수 | ||
ferryCount | int | 해운 결과 개수 | ||
wideareaRouteCount | int | 광역 노선 결과 개수 |
이동수단 노선 코드
- 노선 코드 값이 변경될 수 있음
지하철
Type | 노선명 | Type | 노선명 |
---|---|---|---|
1 | 1호선 | 100 | 수인분당선 |
2 | 2호선 | 101 | 공항철도 |
3 | 3호선 | 104 | 경의중앙선 |
4 | 4호선 | 107 | 에버라인 |
5 | 5호선 | 108 | 경춘선 |
6 | 6호선 | 109 | 신분당선 |
7 | 7호선 | 110 | 의정부경전철 |
8 | 8호선 | 112 | 경강선 |
9 | 9호선 | 113 | 우이신설선 |
10 ~20 | reserve | 114 | 서해선 |
21 | 인천1호선 | 115 | 김포골드라인 |
22 | 인천2호선 | 116 | 신림선 |
23 ~ 30 | reserve | 117 | 1호선(급행) |
31 | 대전1호선 | 118 | 1호선(특급) |
32 ~ 40 | reserve | 119 | 4호선(급행) |
41 | 대구1호선 | 120 | 9호선(급행) |
42 | 대구2호선 | 121 | 수인분당선(급행) |
43 | 대구3호선 | 122 | 경의중앙선(급행) |
44 ~ 50 | reserve | 123 | 경춘선(급행) |
51 | 광주1호선 | 124 | 공항철도(급행) |
52 ~ 60 | reserve | 125 | GTX-A |
71 | 부산1호선 | 126 ~ 65535 | reserve |
72 | 부산2호선 | ||
73 | 부산3호선 | ||
74 | 부산4호선 | ||
78 | 동해선 | ||
79 | 부산김해경전철 |
버스
Type | 노선명 | Type | 노선명 |
---|---|---|---|
1 | 일반 | 13 | 순환 |
2 | 좌석 | 14 | 광역 |
3 | 마을 | 15 | 급행 |
4 | 직행좌석 | 16 | 시외 |
5 | 공항 | 17 | 리무진 |
6 | 간선급행 | 18 | reserve |
7 | reserve | 19 | reserve |
8 | reserve | 20 | reserve |
9 | reserve | 21 | 농어촌 |
10 | 외곽 | 22 | 시외버스 |
11 | 간선 | 23 | 고속버스 |
12 | 지선 | 24~65535 | reserve |
기차
Type | 노선명 | Type | 노선명 |
---|---|---|---|
1 | KTX | 14 | 누리로 |
2 | KTX산천 | 15 | ITX새마을 |
3 | KTX이음 | 16 | ITX청춘 |
4 ~ 10 | reserve | 17~30 | reserve |
11 | SRT | 31 | 통근열차 |
12 | 무궁화 | 32 ~ 65535 | reserve |
13 | 새마을 |
- RESPONSE (type : 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.501846 127.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
}
]
}
}
}
- RESPONSE (type : xml)
<?xml version='1.1' encoding='UTF-8'?>
<metaData>
<plan>
<itineraries>
<totalTime>873</totalTime>
<fare>
<regular>
<currency>
<symbol>₩</symbol>
<currency>원</currency>
<currencyCode>KRW</currencyCode>
</currency>
<totalFare>1500</totalFare>
</regular>
</fare>
<legs>
<distance>408</distance>
<sectionTime>400</sectionTime>
<start>
<lat>37.504585233865086</lat>
<lon>127.02479803562213</lon>
<name>출발지</name>
</start>
<mode>WALK</mode>
<steps>
<distance>13</distance>
<streetName></streetName>
<description>13m 이동</description>
<linestring>127.02481,37.504562 127.024666,37.50452</linestring>
</steps>
<steps>
<distance>8</distance>
<streetName></streetName>
<description>미스터도넛 신논현역점 에서 좌회전 후 8m 이동 </description>
<linestring>127.024666,37.50452 127.02475,37.50451</linestring>
</steps>
<steps>
<distance>45</distance>
<streetName></streetName>
<description>신논현역 에서 우회전 후 45m 이동 </description>
<linestring>127.02475,37.50451 127.0249,37.504158 127.02495,37.504147</linestring>
</steps>
<steps>
<distance>17</distance>
<streetName></streetName>
<description>고우넷치과의원 에서 우회전 후 17m 이동 </description>
<linestring>127.02495,37.504147 127.02498,37.504078 127.025024,37.50401</linestring>
</steps>
<steps>
<distance>8</distance>
<streetName></streetName>
<description>파리바게뜨 강남교보점 에서 횡단보도 후 8m 이동 </description>
<linestring>127.025024,37.50401 127.02508,37.50395</linestring>
</steps>
<steps>
<distance>146</distance>
<streetName></streetName>
<description>파리바게뜨 강남교보점 에서 직진 후 146m 이동 </description>
<linestring>127.02508,37.50395 127.02538,37.503304 127.02563,37.502796 127.02566,37.50272</linestring>
</steps>
<steps>
<distance>7</distance>
<streetName></streetName>
<description>횡단보도 후 7m 이동 </description>
<linestring>127.02566,37.50272 127.02569,37.502663</linestring>
</steps>
<steps>
<distance>116</distance>
<streetName></streetName>
<description>직진 후 116m 이동 </description>
<linestring>127.02569,37.502663 127.02589,37.502205 127.02605,37.501846 127.02614,37.50168</linestring>
</steps>
<steps>
<distance>29</distance>
<streetName></streetName>
<description>GS25 강남스타점 에서 우측 횡단보도 후 29m 이동 </description>
<linestring>127.02614,37.50168 127.02583,37.501587</linestring>
</steps>
<steps>
<distance>19</distance>
<streetName>강남대로</streetName>
<description>우회전 후 강남대로 을 따라 19m 이동 </description>
<linestring>127.02583,37.501587 127.02576,37.501743</linestring>
</steps>
<end>
<lat>37.501725</lat>
<lon>127.02569444444444</lon>
<name>지하철2호선강남역(중)</name>
</end>
</legs>
<legs>
<distance>2759</distance>
<sectionTime>411</sectionTime>
<start>
<lat>37.501725</lat>
<lon>127.02569444444444</lon>
<name>지하철2호선강남역(중)</name>
</start>
<mode>BUS</mode>
<route>간선:400</route>
<end>
<lat>37.47904722222222</lat>
<lon>127.03824722222222</lon>
<name>일동제약사거리</name>
</end>
<routeColor>0068B7</routeColor>
<routeId>11504001</routeId>
<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</linestring>
</passShape>
<passStopList>
<stationList>
<index>0</index>
<stationID>772608</stationID>
<stationName>지하철2호선강남역(중)</stationName>
<lon>127.025694</lon>
<lat>37.501725</lat>
</stationList>
<stationList>
<index>1</index>
<stationID>772411</stationID>
<stationName>신분당선강남역</stationName>
<lon>127.028347</lon>
<lat>37.495903</lat>
</stationList>
<stationList>
<index>2</index>
<stationID>772236</stationID>
<stationName>래미안아파트.파이낸셜뉴스</stationName>
<lon>127.030469</lon>
<lat>37.491636</lat>
</stationList>
<stationList>
<index>3</index>
<stationID>772093</stationID>
<stationName>뱅뱅사거리</stationName>
<lon>127.032414</lon>
<lat>37.487658</lat>
</stationList>
<stationList>
<index>4</index>
<stationID>771957</stationID>
<stationName>양재역</stationName>
<lon>127.034622</lon>
<lat>37.483653</lat>
</stationList>
<stationList>
<index>5</index>
<stationID>771820</stationID>
<stationName>일동제약사거리</stationName>
<lon>127.038247</lon>
<lat>37.479047</lat>
</stationList>
</passStopList>
<type>11</type>
<Lane>
<service>1</service>
<route>간선:542</route>
<routeColor>0068B7</routeColor>
<routeId>2247001</routeId>
<type>11</type>
</Lane>
<service>1</service>
</legs>
<legs>
<distance>84</distance>
<sectionTime>62</sectionTime>
<start>
<lat>37.47904722222222</lat>
<lon>127.03824722222222</lon>
<name>일동제약사거리</name>
</start>
<mode>WALK</mode>
<steps>
<distance>36</distance>
<streetName>강남대로</streetName>
<description>강남대로 을 따라 36m 이동</description>
<linestring>127.0381,37.479004 127.03806,37.4791 127.03799,37.479313</linestring>
</steps>
<steps>
<distance>48</distance>
<streetName></streetName>
<description>실버텍스 에서 좌회전 후 48m 이동 </description>
<linestring>127.03799,37.479313 127.037636,37.479263 127.037445,37.47924</linestring>
</steps>
<end>
<lat>37.479103923078995</lat>
<lon>127.03747630119366</lon>
<name>도착지</name>
</end>
</legs>
<transferCount>0</transferCount>
<totalWalkDistance>492</totalWalkDistance>
<totalDistance>3157</totalDistance>
<totalWalkTime>462</totalWalkTime>
<pathType>2</pathType>
</itineraries>
</plan>
<requestParameters>
<busCount>1</busCount>
<expressbusCount>0</expressbusCount>
<subwayCount>0</subwayCount>
<airplaneCount>0</airplaneCount>
<locale>ko</locale>
<endY>37.479103923078995</endY>
<endX>127.03747630119366</endX>
<wideareaRouteCount>0</wideareaRouteCount>
<subwayBusCount>0</subwayBusCount>
<startY>37.504585233865086</startY>
<startX>127.02479803562213</startX>
<ferryCount>0</ferryCount>
<trainCount>0</trainCount>
<reqDttm>20230808083032</reqDttm>
</requestParameters>
</metaData>
대중교통 요약정보 API
- REQUSET
{
"startX": "127.02550910860451",
"startY": "37.63788539420793",
"endX": "127.030406594109",
"endY": "37.609094989686",
"count" : 1,
"format":"json"
}
- RESPONSE PARAMETER
Name | Data Type | Mandatory | Example | Description |
---|---|---|---|---|
metaData | node | |||
plan | node | |||
itineraries | node | 데이터 상세정보 최상위 노드 | ||
pathType | int | 경로 탐색 결과 종류 1-지하철, 2-버스, 3-버스+지하철 4-고속/시외버스, 5-기차, 6-항공, 7-해운 | ||
totalTime | int | 총 소요시간(sec) | ||
transferCount | int | 환승횟수 | ||
totalWalkDistance | int | 총 보행자 이동 거리(m) | ||
totalDistance | int | 총 이동거리(m) | ||
totalWalkTime | int | 총 보행자 소요시간(sec) | ||
fare | node | 금액 최상위 노드 | ||
regular | node | 금액 상위 노드 | ||
currency | node | 금액 상위 노드 | ||
symbol | string | 금액 상징(₩) | ||
currency | string | 금액 단위(원) | ||
currencyCode | string | 금액 단위 코드(KRW) | ||
totalFare | number | 대중교통요금 | ||
requestParameters | node | |||
reqDttm | string | 요청 시각 - yyyymmddhhmiss | ||
startX | string | 출발지 좌표(경도) - WGS84 | ||
startY | string | 출발지 좌표(위도) - WGS84 | ||
endX | string | 도착지 좌표(경도) - WGS84 | ||
endY | string | 도착지 좌표(위도) - WGS84 |
- RESPONSE (type : json)
{
"metaData": {
"requestParameters": {
"endY": "37.609095",
"endX": "127.030407",
"startY": "37.637885",
"startX": "127.025509",
"reqDttm": "20230627093729"
},
"plan": {
"itineraries": [
{
"fare": {
"regular": {
"totalFare": 1200,
"currency": {
"symbol": "₩",
"currency": "원",
"currencyCode": "KRW"
}
}
},
"totalTime": 992,
"totalWalkTime": 282,
"pathType": 2,
"transferCount": 0,
"totalDistance": 4343,
"totalWalkDistance": 282
}
]
}
}
}
- RESPONSE (type : xml)
<?xml version='1.1' encoding='UTF-8'?>
<metaData>
<plan>
<itineraries>
<pathType>2</pathType>
<totalTime>992</totalTime>
<transferCount>0</transferCount>
<totalDistance>4343</totalDistance>
<totalWalkDistance>282</totalWalkDistance>
<totalWalkTime>282</totalWalkTime>
<fare>
<regular>
<currency>
<symbol>₩</symbol>
<currency>원</currency>
<currencyCode>KRW</currencyCode>
</currency>
<totalFare>1200</totalFare>
</regular>
</fare>
</itineraries>
</plan>
<requestParameters>
<reqDttm>20230627093823</reqDttm>
<startX>127.025509</startX>
<startY>37.637885</startY>
<endX>127.030407</endX>
<endY>37.609095</endY>
</requestParameters>
</metaData>