대중교통 API

  • REQUSET

{
    "startX": "127.02479803562213",
    "startY": "37.504585233865086",
    "endX": "127.03747630119366",
    "endY": "37.479103923078995",
    "count" : 1,
    "lang": 0,
    "format":"json"
}
  • RESPONSE PARAMETER

NameData TypeMandatoryExampleDescription
metaDatanode
plannode
itinerariesnode데이터 상세정보 최상위 노드
totalTimeint총 소요시간(sec)
transferCountint환승횟수
totalWalkDistanceint총 보행자 이동 거리(m)
totalDistanceint총 이동거리(m)
totalWalkTimeint총 보행자 소요시간(sec)
farenode금액 최상위 노드
regularnode금액 상위 노드
currencynode금액 상위 노드
symbolstring금액 상징(₩)
currencystring금액 단위(원)
currencyCodestring금액 단위 코드(KRW)
totalFarenumber대중교통요금
legsnode대중교통 정보 최상위 노드
distanceint구간별 이동거리(m)
sectionTimeint구간별 소요시간(sec)
modestring이동 수단 종류

1. 도보 - WALK

2. 버스 - BUS

3. 지하철 - SUBWAY

4. 고속/시외버스 - EXPRESSBUS

5. 기차 - TRAIN

6. 항공 - AIRPLANE

7. 해운 - FERRY
routestring대중교통 노선 명칭
routeColorstring대중교통 노선 색상
routeIdstring대중교통 노선 ID
startnode구간별 출발정보 최상위 노드
latnumber출발 좌표(위도)

- WGS84
lonnumber출발 좌표(경도)

- WGS84
namestring출발 정류장 명칭
endnode구간별 도착정보 최상위 노드
latnumber도착 좌표(위도)

- WGS84
lonnumber도착 좌표(경도)

- WGS84
namestring도착 정류장 명칭
stepsnode구간별 도보상세정보 최상위 노드
distancedouble도보 이동거리(m)
streetNamestring도로명
descriptionstring도보 구간 정보
linestringstring도보 구간 좌표

- WGS84
passShapenode대중교통 구간 좌표 최상위 노드
linestringstring대중교통 구간 좌표

- WGS84
passStopListnode대중교통 구간 정류장 정보 최상위 노드
stationsnode정류장 상세정보
indexnumber순번
stationIDstring정류장 ID
stationNamestring정류장 명칭
lonstring정류장 좌표(경도)

- WGS84
latstring정류장 좌표(위도)

- WGS84
typeint이동수단 노선 코드 참조
routePaymentint광역이동수단 요금

- 고속/시외버스, 기차, 항공, 해운
serviceint이동수단 운행 여부 flag

- 1 : 운행중

- 0 : 운행종료
Lanenode정류소 구간별 최상위 노드

- 다중 노선이 존재하는 경우에만 응답됨
- serviceint이동수단 운행 여부 flag

- 1 : 운행중

- 0 : 운행종료
- routestring다중 대중교통 노선 명칭
- routeColorstring다중 대중교통 노선 색상
- routeldstring다중 대중교통 노선 ID
- typeint이동수단 노선 코드 참조
pathTypeint경로 탐색 결과 종류

1-지하철, 2-버스, 3-버스+지하철

4-고속/시외버스, 5-기차, 6-항공, 7-해운
requestParametersnode
reqDttmstring요청 시각

- yyyymmddhhmiss
startXstring출발지 좌표(경도)

- WGS84
startYstring출발지 좌표(위도)

- WGS84
localestring언어코드

- ko

- en
endXstring도착지 좌표(경도)

- WGS84
endYstring도착지 좌표(위도)

- WGS84
busCountint버스 결과 개수
subwayCountint지하철 결과 개수
subwayBusCountint버스+지하철 결과 개수
expressbusCountint고속/시외 버스 결과 개수
trainCountint기차 결과 개수
airplaneCountint항공 결과 개수
ferryCountint해운 결과 개수
wideareaRouteCountint광역 노선 결과 개수

이동수단 노선 코드

  • 노선 코드 값이 변경될 수 있음

지하철

Type노선명Type노선명
11호선100수인분당선
22호선101공항철도
33호선104경의중앙선
44호선107에버라인
55호선108경춘선
66호선109신분당선
77호선110의정부경전철
88호선112경강선
99호선113우이신설선
10 ~20reserve114서해선
21인천1호선115김포골드라인
22인천2호선116신림선
23 ~ 30reserve1171호선(급행)
31대전1호선1181호선(특급)
32 ~ 40reserve1194호선(급행)
41대구1호선1209호선(급행)
42대구2호선121수인분당선(급행)
43대구3호선122경의중앙선(급행)
44 ~ 50reserve123경춘선(급행)
51광주1호선124공항철도(급행)
52 ~ 60reserve125GTX-A
71부산1호선126 ~ 65535reserve
72부산2호선
73부산3호선
74부산4호선
78동해선
79부산김해경전철

버스

Type노선명Type노선명
1일반13순환
2좌석14광역
3마을15급행
4직행좌석16시외
5공항17리무진
6간선급행18reserve
7reserve19reserve
8reserve20reserve
9reserve21농어촌
10외곽22시외버스
11간선23고속버스
12지선24~65535reserve

기차

Type노선명Type노선명
1KTX14누리로
2KTX산천15ITX새마을
3KTX이음16ITX청춘
4 ~ 10reserve17~30reserve
11SRT31통근열차
12무궁화32 ~ 65535reserve
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

NameData TypeMandatoryExampleDescription
metaDatanode
plannode
itinerariesnode데이터 상세정보 최상위 노드
pathTypeint경로 탐색 결과 종류
1-지하철, 2-버스, 3-버스+지하철
4-고속/시외버스, 5-기차, 6-항공, 7-해운
totalTimeint총 소요시간(sec)
transferCountint환승횟수
totalWalkDistanceint총 보행자 이동 거리(m)
totalDistanceint총 이동거리(m)
totalWalkTimeint총 보행자 소요시간(sec)
farenode금액 최상위 노드
regularnode금액 상위 노드
currencynode금액 상위 노드
symbolstring금액 상징(₩)
currencystring금액 단위(원)
currencyCodestring금액 단위 코드(KRW)
totalFarenumber대중교통요금
requestParametersnode
reqDttmstring요청 시각

- yyyymmddhhmiss
startXstring출발지 좌표(경도)

- WGS84
startYstring출발지 좌표(위도)

- WGS84
endXstring도착지 좌표(경도)

- WGS84
endYstring도착지 좌표(위도)

- 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>