SBB Scraper — Swiss Train Timetable & Connections
Pricing
Pay per usage
SBB Scraper — Swiss Train Timetable & Connections
Scrape Swiss Federal Railways (SBB) train connections, timetables, and schedules. Search by station name and date. Returns departure times, arrival times, duration, train types, platforms, and transfer details. No login or cookies required.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Studio Amba
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
SBB Scraper
Scrape Swiss Federal Railways (SBB) train connections, timetables, and schedules. Search by station name and travel date to get real-time departure and arrival information for any route in Switzerland.
This actor uses the public Swiss transport API (transport.opendata.ch) for fast, reliable data extraction. No login, cookies, or browser automation required.
How to scrape SBB data
- Go to the SBB Scraper page on Apify Store.
- Click Try for free to open the actor in Apify Console.
- Enter your departure station (e.g. "Zurich HB") and arrival station (e.g. "Bern").
- Optionally set a travel date and time.
- Click Start and wait for the run to finish.
- Download your data in JSON, CSV, Excel, or any other supported format.
Input parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
fromStation | string | Zurich HB | Departure station name |
toStation | string | Bern | Arrival station name |
date | string | today | Travel date in YYYY-MM-DD format |
time | string | now | Departure time in HH:MM format |
isArrivalTime | boolean | false | Search by arrival time instead of departure |
maxResults | integer | 20 | Maximum connections to return (1-200) |
proxyConfiguration | object | Apify Residential | Proxy settings |
Input example
{"fromStation": "Zurich HB","toStation": "Bern","date": "2026-06-15","time": "08:00","maxResults": 20}
Output example
Each connection in the dataset contains the following fields:
{"origin": "Zurich HB","destination": "Bern","departureTime": "2026-06-15T08:02:00+0200","arrivalTime": "2026-06-15T08:58:00+0200","duration": "0h 56min","durationMinutes": 56,"trainType": "IC","trainNumber": "1","platform": "6","arrivalPlatform": "4","transfers": 0,"carrier": "SBB","sections": [{"from": "Zurich HB","to": "Bern","departure": "2026-06-15T08:02:00+0200","arrival": "2026-06-15T08:58:00+0200","platform": "6","arrivalPlatform": "4","trainType": "IC","trainNumber": "1","operator": "SBB","isWalk": false}],"departurePlatformChanged": false,"departureDelay": "","arrivalDelay": "","url": "https://www.sbb.ch/en/timetable/timetable.html?from=Zurich%20HB&to=Bern&date=15.06.2026&time=08:02","scrapedAt": "2026-06-09T10:00:00.000Z"}
Output fields
| Field | Type | Description |
|---|---|---|
origin | string | Departure station name |
destination | string | Arrival station name |
departureTime | string | ISO 8601 departure timestamp |
arrivalTime | string | ISO 8601 arrival timestamp |
duration | string | Human-readable duration (e.g. "0h 56min") |
durationMinutes | integer | Duration in minutes |
trainType | string | Train category (IC, IR, RE, S, ICE, etc.) |
trainNumber | string | Train service number |
platform | string | Departure platform |
arrivalPlatform | string | Arrival platform |
transfers | integer | Number of required transfers |
carrier | string | Operating carrier (SBB, BLS, SOB, etc.) |
sections | array | Individual journey legs with full details |
departurePlatformChanged | boolean | Whether platform has changed from scheduled |
departureDelay | string | Real-time departure delay (e.g. "+5 min") |
arrivalDelay | string | Real-time arrival delay |
url | string | Direct link to the timetable on sbb.ch |
scrapedAt | string | ISO 8601 timestamp of data collection |
Popular Swiss train routes
Here are some commonly searched routes you can use:
- Zurich HB to Bern (56 min, IC direct)
- Zurich HB to Geneva (2h 45min)
- Bern to Basel SBB (55 min, IC direct)
- Zurich HB to Luzern (45 min)
- Zurich HB to Interlaken Ost (1h 50min)
- Lausanne to Bern (1h 6min)
- Basel SBB to Zurich HB (53 min)
- Geneva to Lausanne (33 min)
- Bern to Zurich Flughafen (1h 15min)
- Zurich HB to St. Gallen (1h 5min)
Supported station names
The actor accepts any Swiss public transport station name recognized by the SBB system. This includes:
- Major train stations: Zurich HB, Bern, Basel SBB, Geneva, Lausanne, Luzern
- Regional stations: Thun, Interlaken Ost, Winterthur, St. Gallen, Biel/Bienne
- Airport stations: Zurich Flughafen, Geneva Aeroport
- International connections: stations in neighboring countries reachable by SBB
Station names should be entered as they appear on SBB timetables. The API handles partial matches, so "Zurich" will resolve to "Zurich HB".
Data coverage
- All Swiss public transport: SBB trains, regional railways (BLS, SOB, etc.), PostBus, trams, ships
- Real-time delay information when available
- Platform numbers and platform change alerts
- Connections with transfers including walking segments
- International connections to/from Switzerland
Use cases
- Travel planning: Find the best connections for your Swiss trip
- Commuter analysis: Monitor train schedules for daily commutes
- Research: Analyze Swiss public transport patterns and connectivity
- Integration: Feed timetable data into travel apps or dashboards
- Delay monitoring: Track real-time delays on specific routes
Rate limiting
The underlying transport API limits requests to 3 per second per IP address. The actor automatically respects this limit with built-in delays between requests. For large result sets (100+ connections), expect the actor to run for 15-30 seconds.
Tips
- Use the exact SBB station name for best results (e.g. "Zurich HB" not just "Zurich")
- Leave date and time empty to search from the current moment
- Set
isArrivalTimetotrueif you need to arrive by a specific time - The
sectionsarray contains full details for multi-leg journeys - Platform change alerts and delays reflect real-time data from SBB