{"api":{"id":"api_66adc83857eb07a5cf0aeac0","slug":"swiss-public-transport","name":"Swiss Train & Transit Connections API","description":"Train, bus and tram connections between two places in Switzerland: departure and arrival times, duration, transfers, train and line names, platform, delay, crowding level and the legs of each journey.","kind":"ready_made","visibility":"public","domain":"transport.opendata.ch","source_url":"https://transport.opendata.ch/","category":"travel","record_type":"generic","active_version":"1.0","units_per_1k":500,"health":"unknown","auto_repair":false,"last_checked_at":null,"last_run_at":null,"fields_count":13,"created_at":"2026-12-06T04:06:22.112Z","updated_at":"2026-12-06T04:06:22.112Z","runnable":true,"egress":null,"repairs":[],"repairs_total":0,"how":"Runs on a reader we built and maintain by hand for this site.","fields":[{"name":"id","type":"string","description":"Made from the two station ids and the departure time; unique for a connection.","required":true,"coverage":1,"example":"8503000-8507000-1796530080"},{"name":"from_station","type":"string","description":"Name of the departure station.","required":false,"coverage":1,"example":"Zürich HB"},{"name":"to_station","type":"string","description":"Name of the arrival station.","required":false,"coverage":1,"example":"Bern"},{"name":"departure_at","type":"datetime","description":"Departure time (UTC).","required":false,"coverage":1,"example":"2026-12-06T04:08:00.000Z"},{"name":"arrival_at","type":"datetime","description":"Arrival time (UTC).","required":false,"coverage":1,"example":"2026-12-06T05:26:00.000Z"},{"name":"duration_min","type":"integer","description":"Total travel time in minutes.","required":false,"coverage":1,"example":78},{"name":"transfers","type":"integer","description":"Number of changes.","required":false,"coverage":1,"example":2},{"name":"products","type":"array","description":"Trains and lines used, such as IC 61 or S23.","required":false,"coverage":1,"example":["IR 37","S23"]},{"name":"platform","type":"string","description":"Departure platform.","required":false,"coverage":1,"example":"14"},{"name":"delay_min","type":"integer","description":"Current departure delay in minutes.","required":false,"coverage":1,"example":0},{"name":"capacity_1st","type":"integer","description":"Expected crowding in first class, 1 low to 3 high.","required":false,"coverage":1,"example":1},{"name":"capacity_2nd","type":"integer","description":"Expected crowding in second class, 1 low to 3 high.","required":false,"coverage":1,"example":1},{"name":"sections","type":"array","description":"One text per leg: line, from and to stations and times (Swiss local time), or Walk.","required":false,"coverage":1,"example":["IR 37: Zürich HB 05:08 -> Aarau 05:35","S 23: Aarau 05:40 -> Olten 05:53"]}],"inputs":[{"name":"from","type":"string","description":"Departure station or place, such as Zurich or Bern Bahnhof.","example":"Zurich","required":true},{"name":"to","type":"string","description":"Arrival station or place.","example":"Bern","required":true},{"name":"date","type":"string","description":"Travel day as YYYY-MM-DD. Today when left empty.","example":"2026-12-07"},{"name":"time","type":"string","description":"Earliest departure time as HH:MM, Swiss local time. Now when left empty.","example":"08:00"}],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"arrival_at":{"description":"Arrival time (UTC).","format":"date-time","type":"string"},"capacity_1st":{"description":"Expected crowding in first class, 1 low to 3 high.","type":"integer"},"capacity_2nd":{"description":"Expected crowding in second class, 1 low to 3 high.","type":"integer"},"delay_min":{"description":"Current departure delay in minutes.","type":"integer"},"departure_at":{"description":"Departure time (UTC).","format":"date-time","type":"string"},"duration_min":{"description":"Total travel time in minutes.","type":"integer"},"from_station":{"description":"Name of the departure station.","type":"string"},"id":{"description":"Made from the two station ids and the departure time; unique for a connection.","type":"string"},"platform":{"description":"Departure platform.","type":"string"},"products":{"description":"Trains and lines used, such as IC 61 or S23.","type":"array"},"sections":{"description":"One text per leg: line, from and to stations and times (Swiss local time), or Walk.","type":"array"},"to_station":{"description":"Name of the arrival station.","type":"string"},"transfers":{"description":"Number of changes.","type":"integer"}},"required":["id"],"title":"Swiss Train & Transit Connections API","type":"object"},"samples":[{"id":"8503000-8507000-1796530080","from_station":"Zürich HB","to_station":"Bern","departure_at":"2026-12-06T04:08:00.000Z","arrival_at":"2026-12-06T05:26:00.000Z","duration_min":78,"transfers":2,"products":["IR 37","S23","IC 61"],"platform":"14","delay_min":0,"capacity_1st":1,"capacity_2nd":1,"sections":["IR 37: Zürich HB 05:08 -> Aarau 05:35","S 23: Aarau 05:40 -> Olten 05:53","IC 61: Olten 05:58 -> Bern 06:26"]},{"id":"8503000-8507000-1796530740","from_station":"Zürich HB","to_station":"Bern","departure_at":"2026-12-06T04:19:00.000Z","arrival_at":"2026-12-06T05:28:00.000Z","duration_min":69,"transfers":0,"products":["IC 1"],"platform":"13","delay_min":0,"capacity_1st":1,"capacity_2nd":1,"sections":["IC 1: Zürich HB 05:19 -> Bern 06:28"]},{"id":"8503000-8507000-1796533320","from_station":"Zürich HB","to_station":"Bern","departure_at":"2026-12-06T05:02:00.000Z","arrival_at":"2026-12-06T05:58:00.000Z","duration_min":56,"transfers":0,"products":["IC 8"],"platform":"8","delay_min":0,"capacity_1st":1,"capacity_2nd":1,"sections":["IC 8: Zürich HB 06:02 -> Bern 06:58"]}],"validation":{"checked_at":"2026-12-06T04:06:22.092Z","field_coverage":{"arrival_at":1,"capacity_1st":1,"capacity_2nd":1,"delay_min":1,"departure_at":1,"duration_min":1,"from_station":1,"id":1,"platform":1,"products":1,"sections":1,"to_station":1,"transfers":1},"fresh_read":false,"identity_unique":true,"issues":["Imported from a hand-built source. Field names and types come from its published schema; no live read was made for this check."],"level":"preview","pages_checked":0,"passed":true,"records_checked":3},"links":{"run":"https://pullrow.dev/v1/apis/api_66adc83857eb07a5cf0aeac0/run","openapi":"https://pullrow.dev/v1/apis/api_66adc83857eb07a5cf0aeac0/openapi.json","contract":"https://pullrow.dev/v1/apis/api_66adc83857eb07a5cf0aeac0/contract.json","page":"https://pullrow.dev/catalog/swiss-public-transport"},"runs_30d":0,"success_rate_30d":null,"price_per_1k_usd":0.5,"featured":false,"reliability":{"window_days":30,"runs":0,"completed":0,"succeeded":0,"failed":0,"success_rate":null,"last_run_at":null},"demo":{"available":false,"max_records":0,"reason":"Every run of this API costs us money, so it has no free live demo. The sample records on its page show what it returns.","code":"demo_not_available"},"meta":{"limitations":["One run returns at most 16 connections for one origin and destination pair; the source gives no more than that per request. Run again with a later time for further connections.","Station names are matched by the source, so Zurich finds Zürich HB; use a full station name when a place has several stops.","delay_min, platform at the arrival end and the crowding levels (capacity_1st, capacity_2nd; 1 low, 2 medium, 3 high) are filled only when the railway publishes them, so they are often empty for connections more than a few hours ahead.","Timetable data covers the current timetable year and a limited window ahead; dates far in the future return nothing.","Times are given as ISO 8601 in UTC, converted from Swiss local time.","Free community service over Swiss open transport data with fair-use limits (about 1,000 requests a day per address); there is no key. Not affiliated with SBB or the operators."]},"plain":{"summary":null,"source":"rules","fields":[{"name":"id","label":"ID","description":"Made from the two station ids and the departure time; unique for a connection.","group":"Technical","shown":false,"written":false},{"name":"from_station","label":"From station","description":"Name of the departure station.","group":"Basics","shown":true,"written":false},{"name":"to_station","label":"To station","description":"Name of the arrival station.","group":"Basics","shown":true,"written":false},{"name":"departure_at","label":"Departure at","description":"Departure time (UTC).","group":"Dates","shown":true,"written":false},{"name":"arrival_at","label":"Arrival at","description":"Arrival time (UTC).","group":"Dates","shown":true,"written":false},{"name":"duration_min","label":"Minimum duration","description":"Total travel time in minutes.","group":"Basics","shown":true,"written":false},{"name":"transfers","label":"Transfers","description":"Number of changes.","group":"Basics","shown":true,"written":false},{"name":"products","label":"Products","description":"Trains and lines used, such as IC 61 or S23.","group":"Basics","shown":true,"written":false},{"name":"platform","label":"Departure platform","description":"","group":"Basics","shown":true,"written":false},{"name":"delay_min","label":"Minimum delay","description":"Current departure delay in minutes.","group":"Basics","shown":true,"written":false},{"name":"capacity_1st","label":"Capacity 1st","description":"Expected crowding in first class, 1 low to 3 high.","group":"Basics","shown":true,"written":false},{"name":"capacity_2nd","label":"Capacity 2nd","description":"Expected crowding in second class, 1 low to 3 high.","group":"Basics","shown":true,"written":false},{"name":"sections","label":"Sections","description":"One text per leg: line, from and to stations and times (Swiss local time), or Walk.","group":"Basics","shown":true,"written":false}],"inputs":[{"name":"from","label":"From","help":"Departure station or place, such as Zurich or Bern Bahnhof.","example":"Zurich","written":false},{"name":"to","label":"To","help":"Arrival station or place.","example":"Bern","written":false},{"name":"date","label":"Date","help":"Travel day as YYYY-MM-DD. Today when left empty.","example":"2026-12-07","written":false},{"name":"time","label":"Time","help":"Earliest departure time as HH:MM, Swiss local time. Now when left empty.","example":"08:00","written":false}]}},"incidents":[]}