Swiss Public Transport

v1.0.0

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

3· 1.8k·1 current·1 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, SKILL.md examples, and the included Python script all target transport.opendata.ch and public-transport queries; requested resources (none) and the script's behavior are consistent with the stated purpose.
Instruction Scope
SKILL.md instructs only to call the official API endpoints and to run a local helper script; the instructions do not read arbitrary files, request unrelated environment variables, or send data to third-party endpoints.
Install Mechanism
No install spec is provided (instruction-only with a small script). The script is plain Python, no downloads or extraction from external/untrusted URLs are used.
Credentials
The skill declares no required environment variables, credentials, or config paths and the code does not access secrets or unrelated environment variables.
Persistence & Privilege
The skill does not request permanent presence (always:false) and does not modify other skills or system-wide settings.
Assessment
This skill appears coherent and low-risk: it only makes HTTPS requests to the official transport.opendata.ch API and prints formatted results using a small Python script. Before installing, verify you trust the skill owner and the listed homepage (https://transport.opendata.ch). If you run the included script, be aware it performs live network calls to that API (no credentials are needed). As a general precaution, run new code in a sandboxed or controlled environment if you want to limit any network or execution exposure.

Like a lobster shell, security has layers — review code before you run it.

latestvk9725p7rn4p0c3pcvbeyyxtbn17z7rbp
1.8kdownloads
3stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Swiss Public Transport

Query Swiss public transport (SBB, BLS, ZVV, etc.) using the official transport.opendata.ch API.

Quick Commands

Search stations

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

Get next departures

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

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

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

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

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

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:

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

Comments

Loading comments...