Brief Description
Update: As of 2026-01-30, the data set will now also include data from Zentralbahn, zb (id 86).
An occupancy forecast is a Prediction of the occupancy rate of a specific mode of transport that is expected at a certain time in the future. Usually it is displayed with doll symbols (1, 2 or 3 dolls).
Since spring 2024, we have been publishing SBB’s class-level occupancy forecasts for SBB trains and other railways (BLS, Thurbo, SOB) on this platform. The data is also used in our Open Journey Planner. With the help of this occupancy forecast data, customers can switch to less busy trains, thus maximising their own comfort and ensuring a more even utilisation of public transport.
Occupancy forecasts in the SBB online timetable, sbb.ch.
Access to data:
Functional Description
The source of the data is SBB’s CAPRE system, to which we have access with the kind permission of SBB. We compile the data daily in one data set for the next three months and make it available for download on this page.
The occupancy forecasts for each operating day (DateFrameRef/opDate) and rail (operatorRef; 11: SBB, 33: BLS, 65: Thurbo AG, 82: Schweizerische Südostbahn SOB) are stored in one file. This contains all trains in question (TrainNumberRef). For each train, all stops or sections of the journey are specified with their location (StopPoint, departureStation, etc.) and times, as well as the occupancy forecasts.
The occupancy forecasts are displayed broken down by class (firstClass, secondClass). Possible values are:
- ‘unknown’: No forecast available.
- ‘manySeatsAvailable’: low occupancy, corresponds to a doll symbol.
- ‘fewSeatsAvailable’: medium occupancy, corresponds to two doll symbols.
- ‘standingRoomOnly’: high occupancy, corresponds to three doll symbols.
A detailed, professional description and technical specification of the data formats can be found here:
- https://www.öv-info.ch/de/datenmanagement/ski/standards-der-ski
- direct download: Occupancy_Forecast_Profile_CH_V0.9,pdf
Technical Description
The dataset is offered in two ‘flavours’:
- a standards-compliant variant with XML based on CEN SIRI ET.
- an independent, lightweight format based on JSON.
Both files contain around 9,000 trains per day for the next 3 months (92 days). The data files (ZIP files) are around 100MB each.
Example of SIRI ET-based format:
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) Copyright 2005-2012 CEN SIRI -->
<Siri xmlns="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1" xsi:schemaLocation="http://www.siri.org.uk/siri ../../xsd/siri.xsd">
<ServiceDelivery>
<ResponseTimestamp>2023-12-15T09:57:22+01:00</ResponseTimestamp>
<ProducerRef>OdmchOccupancyForecast</ProducerRef>
<EstimatedTimetableDelivery version="2.1">
<ResponseTimestamp>2023-12-01T09:57:22+01:00</ResponseTimestamp>
<EstimatedJourneyVersionFrame>
<RecordedAtTime>2023-12-01T09:57:22+01:00</RecordedAtTime>
<EstimatedVehicleJourney>
<LineRef>null</LineRef>
<DirectionRef>ch:1:Direction:H</DirectionRef>
<FramedVehicleJourneyRef>
<DataFrameRef>2023-12-04</DataFrameRef>
<DatedVehicleJourneyRef>null</DatedVehicleJourneyRef>
</FramedVehicleJourneyRef>
<OperatorRef>11</OperatorRef>
<TrainNumbers>
<TrainNumberRef>1009</TrainNumberRef>
</TrainNumbers>
<EstimatedCalls>
<EstimatedCall>
<StopPointRef>8503424</StopPointRef>
<StopPointName>Schaffhausen</StopPointName>
<AimedDepartureTime>2023-12-04T06:47:00+01:00</AimedDepartureTime>
<ExpectedDepartureOccupancy>
<FareClass>firstClass</FareClass>
<OccupancyLevel>fewSeatsAvailable</OccupancyLevel>
</ExpectedDepartureOccupancy>
<ExpectedDepartureOccupancy>
<FareClass>secondClass</FareClass>
<OccupancyLevel>standingRoomOnly</OccupancyLevel>
</ExpectedDepartureOccupancy>
</EstimatedCall>
<EstimatedCall>
<StopPointRef>8503000</StopPointRef>
<StopPointName>Zürich HB</StopPointName>
</EstimatedCall>
</EstimatedCalls>
</EstimatedVehicleJourney>
</EstimatedJourneyVersionFrame>
</EstimatedTimetableDelivery>
</ServiceDelivery>
</Siri>
</Siri>
Example of JSON-based format:
{
"operatorRef": "11",
"opDate": "2023-12-04",
"lastUpdated": "2023-12-01T09:57:22+01:00",
"timeToLive": "86400",
"dataSource": "https://opentransportdata.swiss/search?q=occupancy",
"version": "0.9",
"trains": [
{
"trainNumber": "1009",
"journeyRef": "null",
"lineRef": "null",
"sections": [
{
"departureDayShift": 0,
"departureStationId": "8503424",
"departureStationName": "Schaffhausen",
"departureTime": "06:47:00",
"destinationStationId": "8503000",
"destinationStationName": "Zürich HB",
"expectedDepartureOccupancy": [
{
"fareClass": "firstClass",
"occupancyLevel": "fewSeatsAvailable"
},
{
"fareClass": "secondClass",
"occupancyLevel": "standingRoomOnly"
}
]
}
]
}
]
}
The ZIP archives contain:
- one folder per operating day, e.g. 2023-12-14,
- one file per operator with XML or JSON, as shown in the examples above, for example operator-11.xml or operator-82.json.
#AutoTranslate
