xenofex7

Swiss Public Transport

生活服務v1.0.0
作者:xenofex7更新於 2026-05-11swiss-transport@clawhub_xenofex7/swiss-transport
旅行規劃

據 AlphaMoat 統計,截至 2026-09,Swiss Public Transport 累計下載 2,628 次、獲 3 個星標,在全部 5,078 個 AI 技能中排名第 4,000 位,在「生活服務」分類(246 個)中排名第 209 位。

累計安裝
263
累計下載
2628
星標
3
全站排名
#4,000
全站前 79% · 「生活服務」前 85%
平台累計安裝累計下載星標評論
ClawHub ↗8124783-
SkillHub ↗26326283—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

經官方 transport.opendata.ch API 查詢瑞士公共交通(SBB、BLS、ZVV 等)。快速命令:用 /v1/locations?query= 搜尋站點(支援自動補全,如搜 "Zürich" 可找到 "Zürich HB");用 /v1/stationboard?station=Zürich%20HB&limit=10 獲取出發板(limit 預設 40,可用 transportations[] 按 ice_tgv_rj、ir、bus、tramway_underground 等型別過濾);用 /v1/connections?from=&to= 做 A 到 B 行程規劃(可選 via[] 中途站、date、time、isArrivalTime,limit 最大 16);並可用 jq 提取換乘段詳情。也可用 python3 scripts/journey.py "Zürich HB" "Bern" 獲得格式化行程。注意事項:所有時間均為瑞士本地時間(CET/CEST);API 預設返回 JSON;無需 API key;即時資料包含延誤與站臺變更。

資料釋出於 2026-10-27

可以用來做什麼

  • "下一班從蘇黎世出發的火車是幾點?"等出發查詢
  • "從伯爾尼到日內瓦怎麼走?"等行程規劃
  • 檢視巴塞爾 SBB 等車站的即時出發板(含延誤與站臺)

什麼時候用

  • 使用者查詢瑞士境內火車/巴士/電車/船班時刻時使用
  • 需要站點搜尋、出發板、A 到 B 行程規劃或連線詳情時使用

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

下一班從蘇黎世 HB 到伯爾尼的火車幾點開?
幫我規劃明天早上從巴塞爾到盧加諾的路線
看看現在巴塞爾 SBB 車站的出發板

月度資料趨勢

累計下載2628
1912229726812026-03 · 累計下載 19652026-05 · 累計下載 21132026-06 · 累計下載 21672026-07 · 累計下載 23332026-08 · 累計下載 24092026-09 · 累計下載 262826-0326-09
星標3
2342026-03 · 星標 32026-05 · 星標 32026-06 · 星標 32026-07 · 星標 32026-08 · 星標 32026-09 · 星標 326-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-092628—3
2026-082409+3.3%3
2026-072333+7.7%3
2026-062167+2.6%3
2026-052113—3
2026-031965—3

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

3.1 KB · ClawHub v1.0.0
---
name: swiss-transport
description: Swiss Public Transport real-time information. Use when querying train, bus, tram, or boat schedules in Switzerland. Supports station search, departure boards, journey planning from A to B, and connection details. Use for queries like "When does the next train leave from Zürich?" or "How do I get from Bern to Geneva?" or "Show departures at Basel SBB".
homepage: https://transport.opendata.ch
---

# Swiss Public Transport

Query Swiss public transport (SBB, BLS, ZVV, etc.) using the official transport.opendata.ch API.
展開全部(共 88 行)
## Quick Commands

### Search stations
```bash
curl -s "https://transport.opendata.ch/v1/locations?query=Zürich" | jq -r '.stations[] | "\(.name) (\(.id))"'
```

### Get next departures
```bash
curl -s "https://transport.opendata.ch/v1/stationboard?station=Zürich%20HB&limit=10" | \
  jq -r '.stationboard[] | "\(.stop.departure[11:16]) \(.category) \(.number) → \(.to)"'
```

### Plan journey from A to B
```bash
curl -s "https://transport.opendata.ch/v1/connections?from=Zürich&to=Bern&limit=3" | \
  jq -r '.connections[] | "Departure: \(.from.departure[11:16]) | Arrival: \(.to.arrival[11:16]) | Duration: \(.duration[3:]) | Changes: \(.transfers)"'
```

### Get connection details with sections
```bash
curl -s "https://transport.opendata.ch/v1/connections?from=Zürich%20HB&to=Bern&limit=1" | \
  jq '.connections[0].sections[] | {from: .departure.station.name, to: .arrival.station.name, departure: .departure.departure, arrival: .arrival.arrival, transport: .journey.category, line: .journey.number}'
```

## API Endpoints

### `/v1/locations` - Search stations
```bash
curl "https://transport.opendata.ch/v1/locations?query=<station-name>"
```

Parameters:
- `query` (required): Station name to search
- `type` (optional): Filter by type (station, address, poi)

### `/v1/stationboard` - Departure board
```bash
curl "https://transport.opendata.ch/v1/stationboard?station=<station>&limit=<number>"
```

Parameters:
- `station` (required): Station name or ID
- `limit` (optional): Number of results (default 40)
- `transportations[]` (optional): Filter by type (ice_tgv_rj, ec_ic, ir, re_d, ship, s_sn_r, bus, cableway, arz_ext, tramway_underground)
- `datetime` (optional): Date/time in ISO format

### `/v1/connections` - Journey planner
```bash
curl "https://transport.opendata.ch/v1/connections?from=<start>&to=<destination>&limit=<number>"
```

Parameters:
- `from` (required): Starting station
- `to` (required): Destination station
- `via[]` (optional): Intermediate station(s)
- `date` (optional): Date (YYYY-MM-DD)
- `time` (optional): Time (HH:MM)
- `isArrivalTime` (optional): 0 (departure, default) or 1 (arrival)
- `limit` (optional): Number of connections (max 16)

## Helper Script

Use `scripts/journey.py` for formatted journey planning:

```bash
python3 scripts/journey.py "Zürich HB" "Bern"
python3 scripts/journey.py "Basel" "Lugano" --limit 5
```

## Notes

- All times are in Swiss local time (CET/CEST)
- Station names support autocomplete (e.g., "Zürich" finds "Zürich HB")
- API returns JSON by default
- No API key required
- Real-time data includes delays and platform changes

「生活服務」分類下的熱門技能

xenofex7 的其他技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。