SBB Scraper — Swiss Train Timetable & Connections avatar

SBB Scraper — Swiss Train Timetable & Connections

Pricing

Pay per usage

Go to Apify Store
SBB Scraper — Swiss Train Timetable & Connections

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

Studio Amba

Maintained by Community

Actor 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

  1. Go to the SBB Scraper page on Apify Store.
  2. Click Try for free to open the actor in Apify Console.
  3. Enter your departure station (e.g. "Zurich HB") and arrival station (e.g. "Bern").
  4. Optionally set a travel date and time.
  5. Click Start and wait for the run to finish.
  6. Download your data in JSON, CSV, Excel, or any other supported format.

Input parameters

ParameterTypeDefaultDescription
fromStationstringZurich HBDeparture station name
toStationstringBernArrival station name
datestringtodayTravel date in YYYY-MM-DD format
timestringnowDeparture time in HH:MM format
isArrivalTimebooleanfalseSearch by arrival time instead of departure
maxResultsinteger20Maximum connections to return (1-200)
proxyConfigurationobjectApify ResidentialProxy 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

FieldTypeDescription
originstringDeparture station name
destinationstringArrival station name
departureTimestringISO 8601 departure timestamp
arrivalTimestringISO 8601 arrival timestamp
durationstringHuman-readable duration (e.g. "0h 56min")
durationMinutesintegerDuration in minutes
trainTypestringTrain category (IC, IR, RE, S, ICE, etc.)
trainNumberstringTrain service number
platformstringDeparture platform
arrivalPlatformstringArrival platform
transfersintegerNumber of required transfers
carrierstringOperating carrier (SBB, BLS, SOB, etc.)
sectionsarrayIndividual journey legs with full details
departurePlatformChangedbooleanWhether platform has changed from scheduled
departureDelaystringReal-time departure delay (e.g. "+5 min")
arrivalDelaystringReal-time arrival delay
urlstringDirect link to the timetable on sbb.ch
scrapedAtstringISO 8601 timestamp of data collection

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 isArrivalTime to true if you need to arrive by a specific time
  • The sections array contains full details for multi-leg journeys
  • Platform change alerts and delays reflect real-time data from SBB