Swiss Transit OpenData Scraper
Pricing
from $5.88 / 1,000 results
Swiss Transit OpenData Scraper
Tap Swiss public transport data from transport.opendata.ch. Query journeys between two stations, live departure boards, or search stations by name. Returns stations, coordinates, departure and arrival times, platform, duration, transfers, and line. Useful for travel and route planning.
Pricing
from $5.88 / 1,000 results
Rating
0.0
(0)
Developer
ParseForge
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Share

🚆 Swiss Transit OpenData Scraper
🚀 Export Swiss public transport data in seconds. Pull journeys, live departure boards, and station search results straight from transport.opendata.ch.
🕒 Last updated: 2026-06-08 · 📊 Up to 21 fields per record · 3 query modes · nationwide Swiss coverage
Turn Swiss public transport into clean, structured records you can drop into a travel app, a route planner, a timetable widget, or a data pipeline. Pick one of three modes (connections, stationboard, or locations) and get departure and arrival times, platforms, durations, transfers, coordinates, and line details in a consistent shape.
Coverage is the full public transport network served by transport.opendata.ch: trains, trams, buses, boats, and cable cars across Switzerland. Search any station by name, plan a journey between two stops, or read the live departure board for a single station. No account and no API key are required.
| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Travel and route planning apps | Plan journeys and show live departures |
| Mobility and logistics teams | Feed Swiss schedules into routing tools |
| Data analysts and researchers | Study connections, transfers, and delays |
| Hobbyists and bot builders | Build a departure board or trip notifier |
📋 What the Swiss Transit OpenData Scraper does
This Actor calls the public transport.opendata.ch API and returns one clean record per item for the mode you choose:
- Connections — journeys between a
fromand atostation, with departure and arrival times, platforms, duration, transfer count, products, and the first leg's line and operator. - Stationboard — upcoming departures from a single station, with destination, departure time, delay, platform, category, and line.
- Locations — station search by name, returning matched station names, IDs, coordinates, and icon type.
Every record carries a recordType so you can tell the modes apart, plus a scrapedAt timestamp.
🎬 Full Demo (🚧 Coming soon)
⚙️ Input
| Field | Type | Description |
|---|---|---|
mode | select | What to query. One of connections, stationboard, or locations. Defaults to connections. |
from | string | Connections mode only. Departure station name, e.g. Zurich. |
to | string | Connections mode only. Destination station name, e.g. Bern. |
station | string | Stationboard mode only. Station whose departures you want, e.g. Zurich HB. |
query | string | Locations mode only. Partial or full station name to search, e.g. Luzern. |
date | string | Optional. Date in YYYY-MM-DD for connections or departures. Defaults to today. |
time | string | Optional. Time in 24-hour HH:MM for connections or departures. Defaults to now. |
maxItems | integer | How many records to return. Free plan is capped at 10. |
Example 1 — journey from Zurich to Bern
{"mode": "connections","from": "Zurich","to": "Bern","maxItems": 10}
Example 2 — live departures from Basel SBB
{"mode": "stationboard","station": "Basel SBB","maxItems": 20}
⚠️ Good to Know: Each mode uses a different set of inputs. Connections needs
fromandto, stationboard needsstation, and locations needsquery. The output fields also differ by mode, so use therecordTypefield to branch your logic.
📊 Output
Fields shared and mode-specific records are described below. Common fields appear in every record.
| Field | Description |
|---|---|
🧭 recordType | Record kind: connection, departure, or location |
🚉 fromStation | Origin (or matched/board) station name |
🆔 fromStationId | Origin station ID |
📍 fromLat | Origin latitude |
📍 fromLon | Origin longitude |
🏁 toStation | Destination station name |
🆔 toStationId | Destination station ID (connections) |
📍 toLat | Destination latitude (connections) |
📍 toLon | Destination longitude (connections) |
🕐 departure | Departure time (ISO) |
⏲ departureTimestamp | Departure UNIX timestamp |
🕑 arrival | Arrival time (connections) |
⏲ arrivalTimestamp | Arrival UNIX timestamp (connections) |
🛤 platform | Departure platform |
🛤 arrivalPlatform | Arrival platform (connections) |
⏱ duration | Journey duration (connections) |
🔁 transfers | Number of transfers (connections) |
🚆 products | Lines used on the journey (connections) |
⏳ delay | Departure delay in minutes (departures) |
🏷 category | Transport category, e.g. IC, S, B |
#️⃣ lineNumber | Line number |
🏢 operator | Operating company |
🎯 headsign | Direction/headsign of the first leg (connections) |
🪧 name | Service name (departures) |
🖼 icon | Station icon type (locations) |
🕒 scrapedAt | Collection timestamp |
❌ error | Null on success |
Real sample — connection
{"recordType": "connection","fromStation": "Zürich HB","fromStationId": "8503000","fromLat": 47.377847,"fromLon": 8.540502,"toStation": "Bern","toStationId": "8507000","toLat": 46.948832,"toLon": 7.439136,"departure": "2026-06-08T18:02:00+0200","departureTimestamp": 1781280120,"arrival": "2026-06-08T19:00:00+0200","arrivalTimestamp": 1781283600,"platform": "31","arrivalPlatform": "6","duration": "00d00:58:00","transfers": 0,"products": ["IC 1"],"category": "IC","lineNumber": "1","operator": "SBB","headsign": "Genève-Aéroport","scrapedAt": "2026-06-08T16:00:00.000Z","error": null}
Real sample — departure
{"recordType": "departure","fromStation": "Basel SBB","fromStationId": "8500010","fromLat": 47.547412,"fromLon": 7.589563,"toStation": "Zürich HB","departure": "2026-06-08T18:04:00+0200","departureTimestamp": 1781280240,"delay": 0,"platform": "8","category": "IC","lineNumber": "3","operator": "SBB","name": "IC 3","scrapedAt": "2026-06-08T16:00:00.000Z","error": null}
Real sample — location
{"recordType": "location","fromStation": "Luzern","fromStationId": "8505000","fromLat": 47.050168,"fromLon": 8.310015,"icon": "train","scrapedAt": "2026-06-08T16:00:00.000Z","error": null}
✨ Why choose this Actor
- One clean record per item, with a
recordTypeflag so all three modes share a consistent table. - Coordinates included on every station, ready for mapping.
- Departure and arrival times come as both ISO strings and UNIX timestamps.
- No transit account, no key, and no login required.
- Stable field names that map cleanly onto a database schema.
📈 How it compares to alternatives
| Approach | Effort | Structured fields | Coordinates included | Maintenance |
|---|---|---|---|---|
| This Actor | One run | Yes | Yes | None on your side |
| Copying from a timetable site | Hours | Inconsistent | Manual | Constant |
| Writing your own API client | Days | Depends | Manual | You own the upkeep |
🚀 How to use
- Create a free Apify account using this sign-up link.
- Open the Swiss Transit OpenData Scraper.
- Choose a
mode(connections, stationboard, or locations). - Fill the inputs for that mode and set
maxItems. - Click Start and grab your results when the run finishes.
💼 Business use cases
Travel and route planning
| Goal | How this helps |
|---|---|
| Show journeys between two stations | Use connections mode with times and transfers |
| Display a live departure board | Use stationboard mode with delays and platforms |
Mobility and logistics
| Goal | How this helps |
|---|---|
| Feed Swiss schedules into routing | Pull connections with line and operator data |
| Map station locations | Use the coordinate fields on every record |
Analytics and research
| Goal | How this helps |
|---|---|
| Study transfer patterns | Group connections by transfer count and products |
| Track delays over time | Snapshot stationboard departures on a schedule |
Apps and bots
| Goal | How this helps |
|---|---|
| Build a trip notifier | Poll connections for a route and alert on changes |
| Power a station lookup | Use locations mode for autocomplete |
🔌 Automating Swiss Transit OpenData Scraper
Connect runs to the tools you already use:
- Make and Zapier to trigger runs and route records into sheets or databases.
- Slack to post a departure summary when a run finishes.
- Airbyte to load results into a warehouse.
- GitHub Actions to schedule periodic snapshots.
- Google Drive to archive each run's output.
🌟 Beyond business use cases
- Research: study Swiss transit connectivity and transfer patterns.
- Personal: build your own commuter departure board.
- Non-profit: power a community mobility resource.
- Experimentation: prototype a travel app without writing a scraper.
🤖 Ask an AI assistant
Paste your results into ChatGPT, Claude, Perplexity, or Microsoft Copilot and ask it to compare routes, summarize departures, or find the fastest connection.
❓ Frequently Asked Questions
Do I need a transport.opendata.ch account? No. The Actor reads the public API, which needs no login.
Do I need an API key? No key is required.
Which modes can I use?
Connections, stationboard, and locations. Pick one per run with the mode input.
Which inputs does each mode need?
Connections needs from and to, stationboard needs station, and locations needs query.
Can I query a specific date and time?
Yes. Use the optional date (YYYY-MM-DD) and time (HH:MM) inputs for connections and stationboard.
Are coordinates included? Yes. Every station record carries latitude and longitude fields.
Why do output fields differ between records?
Each mode returns a different set of fields. Use the recordType field to branch your logic.
What transport types are covered? Trains, trams, buses, boats, and cable cars across the Swiss network.
How fresh is the data? Each run pulls live from transport.opendata.ch, so departures and delays reflect run time.
Can I schedule this? Yes. Use Apify Schedules to snapshot routes or departures on any cadence.
🔌 Integrate with any app
Results are available through the Apify API, so you can pull them into any app, database, or workflow you already run.
🔗 Recommended Actors
- FAA NAS Airport Status Scraper
- GDACS Disaster Alerts Scraper
- More travel and reference data Actors in the ParseForge collection
💡 Pro Tip: browse the complete ParseForge collection.
🆘 Need Help? Open our contact form
⚠️ Disclaimer: independent tool, not affiliated with transport.opendata.ch or the Swiss transport operators. Only publicly available data is collected.