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
累计下载
2,628
星标
3
全站排名
#4,000
全站前 79% · 「生活服务」前 85%
平台累计安装累计下载星标评论
ClawHub ↗812,4783-
SkillHub ↗2632,6283—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

经官方 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 车站的出发板

月度数据趋势

累计下载2,628
1,9122,2972,6812026-03 · 累计下载 1,9652026-05 · 累计下载 2,1132026-06 · 累计下载 2,1672026-07 · 累计下载 2,3332026-08 · 累计下载 2,4092026-09 · 累计下载 2,62826-0326-09
星标3
2342026-03 · 星标 32026-05 · 星标 32026-06 · 星标 32026-07 · 星标 32026-08 · 星标 32026-09 · 星标 326-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-092,628—3
2026-082,409+3.3%3
2026-072,333+7.7%3
2026-062,167+2.6%3
2026-052,113—3
2026-031,965—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),按月更新。口径说明见数据方法。