# Swiss Public Transport Journey Planner

> Swiss Public Transport Journey Planner is a paid API for AI agents from saylorinnovations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-28).

Looks up train/bus connections between two Swiss stops, returning departure and arrival times, duration, transfers, platforms, delays, and each leg's line

## Facts

- Endpoint: GET https://saylorinnovations.com/api/transport/switzerland/connections?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swiss-public-transport-journey-planner-ec4f5aa8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dYWLxx-gPbIr11VvxHzzu

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability swiss-public-transport-journey-planner-ec4f5aa8
```

Example prompt: What are the next few train connections from Zurich HB to Bern today — show me departure times, platforms, any delays, and how many transfers each journey needs?

## When to prefer this

Choose this endpoint when you need real-time Swiss public transport timetable data including live delays and platform information between any two named Swiss stops. It is ideal for agents helping users plan journeys within Switzerland using SBB or connected Swiss transit networks, particularly when detailed per-leg breakdown (lines, platforms, transfer count) is needed. Prefer it over generic mapping or routing APIs when the user explicitly asks about trains, buses, or public transit in Switzerland.

## Known failure modes

- Stop name not recognized or misspelled — returns empty connections or an error
- No connections found between the two stops (e.g. stops not on the Swiss network)
- Limit parameter out of range (must be 1–8) — may default or error
- Temporary upstream data source unavailability causing incomplete or stale results
- Ambiguous stop names matching multiple locations — results may reflect unexpected station

## How this service works

Swiss public transport journey planner between two stops - departure and arrival times, duration, transfers, platforms, delays and each leg's line

## Output

A JSON object containing a list of up to 8 journey connections, each with departure and arrival times in UTC, total duration in minutes, number of transfers, departure platform, departure delay in minutes, a list of transport products (train/bus lines) used, and a detailed legs array showing each segment's stations, times, and platforms. Also includes metadata about the departure and arrival stops and a data source note.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "Arrival stop name"
      },
      "from": {
       "type": "string",
       "description": "Departure stop name"
      },
      "limit": {
       "type": "string",
       "description": "optional 1-8, default 4"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "from",
      "to",
      "connections"
     ],
     "properties": {
      "to": {
       "type": "object",
       "description": "End of the range"
      },
      "from": {
       "type": "object",
       "description": "Start of the range"
      },
      "note": {
       "type": "string",
       "description": "Caveat or context for reading the result"
      },
      "count": {
       "type": "number",
       "description": "Number of items returned"
      },
      "source": {
       "type": "string",
       "description": "Data source the values come from"
      },
      "connections": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "legs": {
          "type": [
           "array",
           "null"
          ],
          "description": "Legs of the journey with stations, times and platforms"
         },
         "arrival": {
          "type": [
           "string",
           "null"
          ],
          "description": "Arrival time (UTC)"
         },
         "products": {
          "type": [
           "array",
           "null"
          ],
          "description": "Train or bus lines used"
         },
         "departure": {
          "type": [
           "string",
           "null"
          ],
          "description": "Departure time (UTC)"
         },
         "transfers": {
          "description": "Token transfers found"
         },
         "duration_minutes": 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swiss-public-transport-journey-planner-ec4f5aa8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from saylorinnovations.com](https://www.zero.xyz/host/saylorinnovations.com/llms.txt)
