home / skills / openclaw / skills / seoul-metro

seoul-metro skill

/skills/dukbong/seoul-metro

This skill provides real-time Seoul Metro arrivals, route planning, and service alerts to help users navigate efficiently.

npx playbooks add skill openclaw/skills --skill seoul-metro

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
13.0 KB
---
name: seoul-metro
description: Seoul Metro assistant for real-time arrivals, route planning, and service alerts (Korean/English)
metadata: {"moltbot":{"emoji":"๐Ÿš‡","requires":{"bins":["curl","jq"],"env":["SEOUL_OPENAPI_KEY","DATA_GO_KR_KEY"]},"primaryEnv":"SEOUL_OPENAPI_KEY"}}
homepage: https://github.com/dukbong/seoul-metro
user-invocable: true
---

# Seoul Metro Skill

Query real-time Seoul Metro information.

## Features

| Feature | Description | Trigger Example (KO) | Trigger Example (EN) |
|---------|-------------|----------------------|----------------------|
| Real-time Arrival | Train arrival times by station | "๊ฐ•๋‚จ์—ญ ๋„์ฐฉ์ •๋ณด" | "Gangnam station arrivals" |
| Station Search | Line and station code lookup | "๊ฐ•๋‚จ์—ญ ๋ช‡ํ˜ธ์„ ?" | "What line is Gangnam?" |
| Route Search | Shortest path with time/fare | "์‹ ๋„๋ฆผ์—์„œ ์„œ์šธ์—ญ" | "Sindorim to Seoul Station" |
| Service Alerts | Delays, incidents, non-stops | "์ง€ํ•˜์ฒ  ์ง€์—ฐ ์žˆ์–ด?" | "Any subway delays?" |

## Environment Variables

| Variable | Usage | Provider |
|----------|-------|----------|
| `SEOUL_OPENAPI_KEY` | Arrival info, station search | data.seoul.go.kr |
| `DATA_GO_KR_KEY` | Route search, alerts | data.go.kr |

**How to get API keys:**
1. **SEOUL_OPENAPI_KEY**: Sign up at [data.seoul.go.kr](https://data.seoul.go.kr), go to "My Page" > "API Key Management"
2. **DATA_GO_KR_KEY**: Sign up at [data.go.kr](https://www.data.go.kr), search for the API service, and request access

---

## API Reference

### 1. Real-time Arrival Info

**Endpoint**
```
http://swopenAPI.seoul.go.kr/api/subway/{KEY}/json/realtimeStationArrival/{start}/{end}/{station}
```

**Response Fields**

| Field | Description |
|-------|-------------|
| `subwayId` | Line ID (1002=Line 2, 1077=Sinbundang) |
| `trainLineNm` | Direction (e.g., "์„ฑ์ˆ˜ํ–‰ - ์—ญ์‚ผ๋ฐฉ๋ฉด") |
| `arvlMsg2` | Arrival time (e.g., "4๋ถ„ 20์ดˆ ํ›„") |
| `arvlMsg3` | Current location |
| `btrainSttus` | Train type (์ผ๋ฐ˜/๊ธ‰ํ–‰) |
| `lstcarAt` | Last train (0=No, 1=Yes) |

---

### 2. Station Search

**Endpoint**
```
http://openapi.seoul.go.kr:8088/{KEY}/json/SearchInfoBySubwayNameService/{start}/{end}/{station}
```

**Response Fields**

| Field | Description |
|-------|-------------|
| `STATION_CD` | Station code |
| `STATION_NM` | Station name |
| `LINE_NUM` | Line name (e.g., "02ํ˜ธ์„ ") |
| `FR_CODE` | External station code |

---

### 3. Route Search

**Endpoint**
```
https://apis.data.go.kr/B553766/path/getShtrmPath
```

**Parameters**

| Parameter | Required | Description |
|-----------|----------|-------------|
| `serviceKey` | Yes | DATA_GO_KR_KEY |
| `dptreStnNm` | Yes | Departure station |
| `arvlStnNm` | Yes | Arrival station |
| `searchDt` | Yes | Datetime (yyyy-MM-dd HH:mm:ss) |
| `dataType` | Yes | JSON |
| `searchType` | No | duration / distance / transfer |

**Response Fields**

| Field | Description |
|-------|-------------|
| `totalDstc` | Total distance (m) |
| `totalreqHr` | Total time (seconds) |
| `totalCardCrg` | Fare (KRW) |
| `paths[].trainno` | Train number |
| `paths[].trainDptreTm` | Departure time |
| `paths[].trainArvlTm` | Arrival time |
| `paths[].trsitYn` | Transfer flag |

---

### 4. Service Alerts

**Endpoint**
```
https://apis.data.go.kr/B553766/ntce/getNtceList
```

**Parameters**

| Parameter | Required | Description |
|-----------|----------|-------------|
| `serviceKey` | Yes | DATA_GO_KR_KEY |
| `dataType` | Yes | JSON |
| `pageNo` | No | Page number |
| `numOfRows` | No | Results per page |
| `lineNm` | No | Filter by line |

**Response Fields**

| Field | Description |
|-------|-------------|
| `noftTtl` | Alert title |
| `noftCn` | Alert content |
| `noftOcrnDt` | Timestamp |
| `lineNmLst` | Affected line(s) |
| `nonstopYn` | Non-stop flag |
| `xcseSitnBgngDt` | Incident start |
| `xcseSitnEndDt` | Incident end |

---

## Line ID Mapping

| Line | ID | Line | ID |
|------|----|------|----|
| Line 1 | 1001 | Line 6 | 1006 |
| Line 2 | 1002 | Line 7 | 1007 |
| Line 3 | 1003 | Line 8 | 1008 |
| Line 4 | 1004 | Line 9 | 1009 |
| Line 5 | 1005 | Sinbundang | 1077 |
| Gyeongui-Jungang | 1063 | Gyeongchun | 1067 |
| Airport Railroad | 1065 | Suin-Bundang | 1075 |

---

## Station Name Mapping (English โ†’ Korean)

์ฃผ์š” ์—ญ ์ด๋ฆ„์˜ ์˜์–ด-ํ•œ๊ธ€ ๋งคํ•‘ ํ…Œ์ด๋ธ”์ž…๋‹ˆ๋‹ค. API ํ˜ธ์ถœ ์‹œ ์˜์–ด ์ž…๋ ฅ์„ ํ•œ๊ธ€๋กœ ๋ณ€ํ™˜ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

### Line 1 (1ํ˜ธ์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Seoul Station | ์„œ์šธ์—ญ | City Hall | ์‹œ์ฒญ |
| Jonggak | ์ข…๊ฐ | Jongno 3-ga | ์ข…๋กœ3๊ฐ€ |
| Jongno 5-ga | ์ข…๋กœ5๊ฐ€ | Dongdaemun | ๋™๋Œ€๋ฌธ |
| Cheongnyangni | ์ฒญ๋Ÿ‰๋ฆฌ | Yongsan | ์šฉ์‚ฐ |
| Noryangjin | ๋…ธ๋Ÿ‰์ง„ | Yeongdeungpo | ์˜๋“ฑํฌ |
| Guro | ๊ตฌ๋กœ | Incheon | ์ธ์ฒœ |
| Bupyeong | ๋ถ€ํ‰ | Suwon | ์ˆ˜์› |

### Line 2 (2ํ˜ธ์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Gangnam | ๊ฐ•๋‚จ | Yeoksam | ์—ญ์‚ผ |
| Samseong | ์‚ผ์„ฑ | Jamsil | ์ž ์‹ค |
| Sindorim | ์‹ ๋„๋ฆผ | Hongdae (Hongik Univ.) | ํ™๋Œ€์ž…๊ตฌ |
| Hapjeong | ํ•ฉ์ • | Dangsan | ๋‹น์‚ฐ |
| Yeouido | ์—ฌ์˜๋„ | Konkuk Univ. | ๊ฑด๋Œ€์ž…๊ตฌ |
| Seolleung | ์„ ๋ฆ‰ | Samsung | ์‚ผ์„ฑ |
| Sports Complex | ์ข…ํ•ฉ์šด๋™์žฅ | Gangbyeon | ๊ฐ•๋ณ€ |
| Ttukseom | ๋š์„ฌ | Seongsu | ์„ฑ์ˆ˜ |
| Wangsimni | ์™•์‹ญ๋ฆฌ | Euljiro 3-ga | ์„์ง€๋กœ3๊ฐ€ |
| Euljiro 1-ga | ์„์ง€๋กœ์ž…๊ตฌ | City Hall | ์‹œ์ฒญ |
| Chungjeongno | ์ถฉ์ •๋กœ | Ewha Womans Univ. | ์ด๋Œ€ |
| Sinchon | ์‹ ์ดŒ | Sadang | ์‚ฌ๋‹น |
| Nakseongdae | ๋‚™์„ฑ๋Œ€ | Seoul Nat'l Univ. | ์„œ์šธ๋Œ€์ž…๊ตฌ |
| Guro Digital Complex | ๊ตฌ๋กœ๋””์ง€ํ„ธ๋‹จ์ง€ | Mullae | ๋ฌธ๋ž˜ |

### Line 3 (3ํ˜ธ์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Gyeongbokgung | ๊ฒฝ๋ณต๊ถ | Anguk | ์•ˆ๊ตญ |
| Jongno 3-ga | ์ข…๋กœ3๊ฐ€ | Chungmuro | ์ถฉ๋ฌด๋กœ |
| Dongguk Univ. | ๋™๋Œ€์ž…๊ตฌ | Yaksu | ์•ฝ์ˆ˜ |
| Apgujeong | ์••๊ตฌ์ • | Sinsa | ์‹ ์‚ฌ |
| Express Bus Terminal | ๊ณ ์†ํ„ฐ๋ฏธ๋„ | Gyodae | ๊ต๋Œ€ |
| Nambu Bus Terminal | ๋‚จ๋ถ€ํ„ฐ๋ฏธ๋„ | Yangjae | ์–‘์žฌ |
| Daehwa | ๋Œ€ํ™” | Juyeop | ์ฃผ์—ฝ |

### Line 4 (4ํ˜ธ์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Myeongdong | ๋ช…๋™ | Hoehyeon | ํšŒํ˜„ |
| Seoul Station | ์„œ์šธ์—ญ | Sookmyung Women's Univ. | ์ˆ™๋Œ€์ž…๊ตฌ |
| Dongdaemun History & Culture Park | ๋™๋Œ€๋ฌธ์—ญ์‚ฌ๋ฌธํ™”๊ณต์› | Hyehwa | ํ˜œํ™” |
| Hansung Univ. | ํ•œ์„ฑ๋Œ€์ž…๊ตฌ | Mia | ๋ฏธ์•„ |
| Mia Sageori | ๋ฏธ์•„์‚ฌ๊ฑฐ๋ฆฌ | Gireum | ๊ธธ์Œ |
| Chongshin Univ. | ์ด์‹ ๋Œ€์ž…๊ตฌ | Sadang | ์‚ฌ๋‹น |

### Line 5 (5ํ˜ธ์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Gwanghwamun | ๊ด‘ํ™”๋ฌธ | Jongno 3-ga | ์ข…๋กœ3๊ฐ€ |
| Dongdaemun History & Culture Park | ๋™๋Œ€๋ฌธ์—ญ์‚ฌ๋ฌธํ™”๊ณต์› | Cheonggu | ์ฒญ๊ตฌ |
| Wangsimni | ์™•์‹ญ๋ฆฌ | Haengdang | ํ–‰๋‹น |
| Yeouido | ์—ฌ์˜๋„ | Yeouinaru | ์—ฌ์˜๋‚˜๋ฃจ |
| Mapo | ๋งˆํฌ | Gongdeok | ๊ณต๋• |
| Gimpo Airport | ๊น€ํฌ๊ณตํ•ญ | Banghwa | ๋ฐฉํ™” |

### Line 6 (6ํ˜ธ์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Itaewon | ์ดํƒœ์› | Samgakji | ์‚ผ๊ฐ์ง€ |
| Noksapyeong | ๋…น์‚ฌํ‰ | Hangang | ํ•œ๊ฐ•์ง„ |
| Sangsu | ์ƒ์ˆ˜ | Hapjeong | ํ•ฉ์ • |
| World Cup Stadium | ์›”๋“œ์ปต๊ฒฝ๊ธฐ์žฅ | Digital Media City | ๋””์ง€ํ„ธ๋ฏธ๋””์–ด์‹œํ‹ฐ |

### Line 7 (7ํ˜ธ์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Gangnam-gu Office | ๊ฐ•๋‚จ๊ตฌ์ฒญ | Cheongdam | ์ฒญ๋‹ด |
| Konkuk Univ. | ๊ฑด๋Œ€์ž…๊ตฌ | Children's Grand Park | ์–ด๋ฆฐ์ด๋Œ€๊ณต์› |
| Junggok | ์ค‘๊ณก | Ttukseom Resort | ๋š์„ฌ์œ ์›์ง€ |
| Express Bus Terminal | ๊ณ ์†ํ„ฐ๋ฏธ๋„ | Nonhyeon | ๋…ผํ˜„ |
| Hakdong | ํ•™๋™ | Bogwang | ๋ณด๊ด‘ |
| Jangam | ์žฅ์•” | Dobongsan | ๋„๋ด‰์‚ฐ |

### Line 8 (8ํ˜ธ์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Jamsil | ์ž ์‹ค | Mongchontoseong | ๋ชฝ์ดŒํ† ์„ฑ |
| Gangdong-gu Office | ๊ฐ•๋™๊ตฌ์ฒญ | Cheonho | ์ฒœํ˜ธ |
| Bokjeong | ๋ณต์ • | Sanseong | ์‚ฐ์„ฑ |
| Moran | ๋ชจ๋ž€ | Amsa | ์•”์‚ฌ |

### Line 9 (9ํ˜ธ์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Sinnonhyeon | ์‹ ๋…ผํ˜„ | Express Bus Terminal | ๊ณ ์†ํ„ฐ๋ฏธ๋„ |
| Dongjak | ๋™์ž‘ | Noryangjin | ๋…ธ๋Ÿ‰์ง„ |
| Yeouido | ์—ฌ์˜๋„ | National Assembly | ๊ตญํšŒ์˜์‚ฌ๋‹น |
| Dangsan | ๋‹น์‚ฐ | Yeomchang | ์—ผ์ฐฝ |
| Gimpo Airport | ๊น€ํฌ๊ณตํ•ญ | Gaehwa | ๊ฐœํ™” |
| Olympic Park | ์˜ฌ๋ฆผํ”ฝ๊ณต์› | Sports Complex | ์ข…ํ•ฉ์šด๋™์žฅ |

### Sinbundang Line (์‹ ๋ถ„๋‹น์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Gangnam | ๊ฐ•๋‚จ | Sinsa | ์‹ ์‚ฌ |
| Yangjae | ์–‘์žฌ | Yangjae Citizen's Forest | ์–‘์žฌ์‹œ๋ฏผ์˜์ˆฒ |
| Pangyo | ํŒ๊ต | Jeongja | ์ •์ž |
| Dongcheon | ๋™์ฒœ | Suji District Office | ์ˆ˜์ง€๊ตฌ์ฒญ |
| Gwanggyo | ๊ด‘๊ต | Gwanggyo Jungang | ๊ด‘๊ต์ค‘์•™ |

### Gyeongui-Jungang Line (๊ฒฝ์˜์ค‘์•™์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Seoul Station | ์„œ์šธ์—ญ | Hongdae (Hongik Univ.) | ํ™๋Œ€์ž…๊ตฌ |
| Gongdeok | ๊ณต๋• | Hyochang Park | ํšจ์ฐฝ๊ณต์›์•ž |
| Yongsan | ์šฉ์‚ฐ | Oksu | ์˜ฅ์ˆ˜ |
| Wangsimni | ์™•์‹ญ๋ฆฌ | Cheongnyangni | ์ฒญ๋Ÿ‰๋ฆฌ |
| DMC | ๋””์ง€ํ„ธ๋ฏธ๋””์–ด์‹œํ‹ฐ | Susaek | ์ˆ˜์ƒ‰ |
| Ilsan | ์ผ์‚ฐ | Paju | ํŒŒ์ฃผ |

### Airport Railroad (๊ณตํ•ญ์ฒ ๋„)
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Seoul Station | ์„œ์šธ์—ญ | Gongdeok | ๊ณต๋• |
| Hongdae (Hongik Univ.) | ํ™๋Œ€์ž…๊ตฌ | Digital Media City | ๋””์ง€ํ„ธ๋ฏธ๋””์–ด์‹œํ‹ฐ |
| Gimpo Airport | ๊น€ํฌ๊ณตํ•ญ | Incheon Airport T1 | ์ธ์ฒœ๊ณตํ•ญ1ํ„ฐ๋ฏธ๋„ |
| Incheon Airport T2 | ์ธ์ฒœ๊ณตํ•ญ2ํ„ฐ๋ฏธ๋„ | Cheongna Int'l City | ์ฒญ๋ผ๊ตญ์ œ๋„์‹œ |

### Suin-Bundang Line (์ˆ˜์ธ๋ถ„๋‹น์„ )
| English | Korean | English | Korean |
|---------|--------|---------|--------|
| Wangsimni | ์™•์‹ญ๋ฆฌ | Seolleung | ์„ ๋ฆ‰ |
| Gangnam-gu Office | ๊ฐ•๋‚จ๊ตฌ์ฒญ | Seonjeongneung | ์„ ์ •๋ฆ‰ |
| Jeongja | ์ •์ž | Migeum | ๋ฏธ๊ธˆ |
| Ori | ์˜ค๋ฆฌ | Jukjeon | ์ฃฝ์ „ |
| Suwon | ์ˆ˜์› | Incheon | ์ธ์ฒœ |

---

## Usage Examples

**Real-time Arrival**
```bash
curl "http://swopenAPI.seoul.go.kr/api/subway/${SEOUL_OPENAPI_KEY}/json/realtimeStationArrival/0/10/๊ฐ•๋‚จ"
```

**Station Search**
```bash
curl "http://openapi.seoul.go.kr:8088/${SEOUL_OPENAPI_KEY}/json/SearchInfoBySubwayNameService/1/10/๊ฐ•๋‚จ"
```

**Route Search**
```bash
curl -G "https://apis.data.go.kr/B553766/path/getShtrmPath?serviceKey=${DATA_GO_KR_KEY}&dataType=JSON" \
  --data-urlencode "dptreStnNm=์‹ ๋„๋ฆผ" \
  --data-urlencode "arvlStnNm=์„œ์šธ์—ญ" \
  --data-urlencode "searchDt=$(date '+%Y-%m-%d %H:%M:%S')"
```

**Service Alerts**
```bash
curl "https://apis.data.go.kr/B553766/ntce/getNtceList?serviceKey=${DATA_GO_KR_KEY}&dataType=JSON&pageNo=1&numOfRows=10"
```

---

## Output Format Guide

### Real-time Arrival

**Korean:**
```
[๊ฐ•๋‚จ์—ญ ๋„์ฐฉ ์ •๋ณด]

| ํ˜ธ์„  | ๋ฐฉํ–ฅ | ๋„์ฐฉ | ์œ„์น˜ | ์œ ํ˜• |
|------|------|------|------|------|
| 2ํ˜ธ์„  | ์„ฑ์ˆ˜ํ–‰ | 3๋ถ„ | ์—ญ์‚ผ | ์ผ๋ฐ˜ |
```

**English:**
```
[Gangnam Station Arrivals]

| Line | Direction | Arrival | Location | Type |
|------|-----------|---------|----------|------|
| Line 2 | Seongsu-bound | 3 min | Yeoksam | Regular |
```

### Station Search

**Korean:**
```
[๊ฐ•๋‚จ์—ญ]

| ํ˜ธ์„  | ์—ญ์ฝ”๋“œ | ์™ธ๋ถ€์ฝ”๋“œ |
|------|--------|----------|
| 2ํ˜ธ์„  | 222 | 0222 |
```

**English:**
```
[Gangnam Station]

| Line | Station Code | External Code |
|------|--------------|---------------|
| Line 2 | 222 | 0222 |
```

### Route Search

**Korean:**
```
[๊ฐ•๋‚จ -> ํ™๋Œ€์ž…๊ตฌ]

์†Œ์š”์‹œ๊ฐ„: 38๋ถ„ | ๊ฑฐ๋ฆฌ: 22.1 km | ์š”๊ธˆ: 1,650์› | ํ™˜์Šน: 1ํšŒ

1. 09:03 ๊ฐ•๋‚จ ์ถœ๋ฐœ (2ํ˜ธ์„  ์„ฑ์ˆ˜๋ฐฉ๋ฉด)
2. 09:18 ์‹ ๋„๋ฆผ ํ™˜์Šน (2ํ˜ธ์„  -> 1ํ˜ธ์„ )
3. 09:42 ํ™๋Œ€์ž…๊ตฌ ๋„์ฐฉ
```

**English:**
```
[Gangnam -> Hongdae]

Time: 38 min | Distance: 22.1 km | Fare: 1,650 KRW | Transfers: 1

1. 09:03 Depart Gangnam (Line 2 towards Seongsu)
2. 09:18 Transfer at Sindorim (Line 2 -> Line 1)
3. 09:42 Arrive Hongdae
```

### Service Alerts

**Korean:**
```
[์šดํ–‰ ์•Œ๋ฆผ]

[1ํ˜ธ์„ ] ์ข…๋กœ3๊ฐ€์—ญ ๋ฌด์ •์ฐจ (15:00 ~ 15:22)
- ์ฝ”๋ ˆ์ผ ์—ด์ฐจ ์—ฐ๊ธฐ ๋ฐœ์ƒ์œผ๋กœ ์ธํ•จ

[2ํ˜ธ์„ ] ์ •์ƒ ์šดํ–‰
```

**English:**
```
[Service Alerts]

[Line 1] Jongno 3-ga Non-stop (15:00 ~ 15:22)
- Due to smoke from Korail train

[Line 2] Normal operation
```

### Error

**Korean:**
```
์˜ค๋ฅ˜: ์—ญ์„ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
"๊ฐ•๋‚จ" (์—ญ ์ด๋ฆ„๋งŒ)์œผ๋กœ ๊ฒ€์ƒ‰ํ•ด ๋ณด์„ธ์š”.
```

**English:**
```
Error: Station not found.
Try searching with "Gangnam" (station name only).
```

### API Key Errors

**Korean:**
```
์˜ค๋ฅ˜: API ์ธ์ฆํ‚ค๊ฐ€ ์„ค์ •๋˜์ง€ ์•Š์•˜์Šต๋‹ˆ๋‹ค.
ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•ด์ฃผ์„ธ์š”: SEOUL_OPENAPI_KEY

๋ฐœ๊ธ‰ ์•ˆ๋‚ด:
- ์„œ์šธ์—ด๋ฆฐ๋ฐ์ดํ„ฐ๊ด‘์žฅ: https://data.seoul.go.kr
- ๊ณต๊ณต๋ฐ์ดํ„ฐํฌํ„ธ: https://www.data.go.kr
```

**English:**
```
Error: API key is not configured.
Please set environment variable: SEOUL_OPENAPI_KEY

Get your API key:
- Seoul Open Data Plaza: https://data.seoul.go.kr
- Korea Public Data Portal: https://www.data.go.kr
```

**Korean:**
```
์˜ค๋ฅ˜: API ์ธ์ฆํ‚ค๊ฐ€ ์œ ํšจํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
์ธ์ฆํ‚ค๋ฅผ ํ™•์ธํ•ด์ฃผ์„ธ์š”.
```

**English:**
```
Error: Invalid API key.
Please verify your API key.
```

Overview

This skill provides a Seoul Metro assistant for real-time arrivals, station lookup, route planning, and service alerts in Korean and English. It connects to Seoul Open Data and Korea Public Data APIs to fetch live subway arrivals, station codes, shortest routes with time and fare, and current service notifications. The skill returns human-friendly bilingual outputs and handles common API key and lookup errors.

How this skill works

The skill calls Seoul OpenAPI endpoints for realtimeStationArrival and SearchInfoBySubwayNameService to get arrival times and station metadata. For routing and alerts it uses data.go.kr services (getShtrmPath and getNtceList) to compute shortest paths, travel time, fares, and incident notices. Inputs accept English or Korean station names; English inputs are mapped to Korean before API calls. Responses are formatted into concise bilingual summaries showing line, direction, arrival, transfers, times, fares, and alert details.

When to use it

  • Check train arrival times at a station in real time (Korean/English).
  • Look up line and station codes for signage or development use.
  • Plan the fastest or lowest-transfer route with estimated time and fare.
  • Get current service alerts, delays, non-stops, and incident windows.
  • Debug or validate station name mapping when integrating with other transit tools.

Best practices

  • Set SEOUL_OPENAPI_KEY and DATA_GO_KR_KEY environment variables before use.
  • Provide station names as single tokens (e.g., "Gangnam" or "๊ฐ•๋‚จ") to reduce ambiguity. Convert English station names to Korean using the built-in mapping.
  • Include a timestamp for route searches (yyyy-MM-dd HH:mm:ss) to get realistic departure/arrival predictions.
  • Handle API key and network errors gracefully and fall back to cached station metadata when possible.
  • Limit frequent polling of realtime endpoints to avoid hitting rate limits; poll every 15โ€“30 seconds for live dashboards.

Example use cases

  • User asks "Gangnam station arrivals" and receives next train times, direction, platform info, and whether it is last train.
  • Commuter requests route from Sindorim to Seoul Station and gets transfer steps, total time, distance, and fare in KRW.
  • Operations team queries active service alerts for Line 1 and receives incident title, affected segments, and start/end timestamps.
  • Developer looks up station code for Gangnam to display on a mobile trip planner widget.
  • Bilingual assistant answers queries in Korean or English and converts input names when needed.

FAQ

What API keys are required?

Set SEOUL_OPENAPI_KEY for Seoul OpenAPI (arrivals and station search) and DATA_GO_KR_KEY for data.go.kr (route and alerts).

What if a station name is not found?

Try a simpler station name (single token) or use the Englishโ†’Korean mapping included with the skill; the skill returns an error suggestion if lookup fails.