A simple web application that shows train seat availability between Linz and Vienna using reverse-engineered ÖBB (Österreichische Bundesbahnen) public endpoints.
- 🚆 Real-time train connections between Linz and Vienna
- ⏰ Customizable departure date and time
- 💺 Seat availability information
- 📊 Train details including duration, platform, and pricing
- 🎨 Modern, responsive UI
This app is automatically deployed to GitHub Pages:
The deployment happens automatically via GitHub Actions whenever changes are pushed to the repository.
This repository is configured for automatic deployment to GitHub Pages:
- Automatic deployment via GitHub Actions on every push
- Live URL:
https://andreas1327250.github.io/Claude-Code-Web/ - Workflow file:
.github/workflows/deploy.yml
Run the app locally with Python's built-in server:
# Start local server
python3 server.py
# or
npm run serve
# Open http://localhost:8000 in your browserVercel:
npm i -g vercel
vercelNetlify:
npm i -g netlify-cli
netlify deployCloudflare Pages, Firebase, or AWS S3: Simply upload the HTML, CSS, and JS files to your hosting platform.
This app uses the public HAFAS (HaCon Fahrplan-Auskunfts-System) endpoints provided by ÖBB:
GET https://fahrplan.oebb.at/bin/ajax-getstop.exe/dn
Parameters:
getstop=1- Enable station searchREQ0JourneyStopsS0A=1- Return all matchesREQ0JourneyStopsS0G={query}- Station name query
Response Format: Tab-separated values with station name and ID:
Wien Hbf 8103000
Wien Meidling 8101073
...
GET https://fahrplan.oebb.at/bin/query.exe/dn
Parameters:
S={from_station}- Origin station nameZ={to_station}- Destination station namedate={DD.MM.YY}- Departure datetime={HH:MM}- Departure timestart=1- Search type (1 = departure)
Response: HTML page with journey connections
GET https://fahrplan.oebb.at/bin/stboard.exe/dn
Shows departures/arrivals for a specific station.
GET http://zugradar.oebb.at/bin/help.exe/dn?tpl=livefahrplan
Displays all trains on a live map.
ÖBB uses the HAFAS (HaCon Fahrplan-Auskunfts-System) API, which is a journey planning system used by many European transportation providers. The same system is used by:
- Deutsche Bahn (Germany)
- SBB (Switzerland)
- NS (Netherlands)
- And many others
- Open
index.htmlin a web browser - Select your departure date and time (defaults to current time)
- Click "Search Trains"
- View available train connections with seat availability
Since the ÖBB endpoints don't support CORS (Cross-Origin Resource Sharing), the app uses a CORS proxy service (allorigins.win) to fetch data. For production use, consider:
- Setting up your own backend proxy server
- Using the official ÖBB API Portal (requires registration)
- Running the app from a server that can make backend requests
Currently, the app generates mock data for demonstration purposes because parsing the HTML response from ÖBB requires more sophisticated parsing. To implement real data:
- Parse the HTML response from
query.exe/dn - Or use existing libraries like:
- oebb-api (Node.js)
- public-transport/oebb (Node.js)
- hafas-client (Generic HAFAS client)
For a production implementation, consider using existing open-source libraries:
# Node.js example with oebb-api
npm install oebb-api
# Usage
const oebb = require('oebb-api');
oebb.searchStationsNew("Linz Hbf").then((from) => {
oebb.searchStationsNew("Wien Hbf").then((to) => {
oebb.getJourneys(from[0], to[0], true).then(console.log);
});
});For production use, ÖBB provides an official API portal:
- API Portal: https://apiportal.oebb.at/portal/
- InfoHub: https://infohub.oebb.at/portal/
You need to register and request access to use official APIs.
- GitHub - mymro/oebb-api - Node.js API wrapper
- GitHub - public-transport/oebb - FPTI-compliant client
- HAFAS Endpoints List
- ÖBB Official API Portal
- ÖBB Open Data
This is an educational project demonstrating how to reverse-engineer public transportation APIs. For production use:
- Use the official ÖBB API Portal
- Request permission from ÖBB
- Respect rate limits and terms of service
- Consider data privacy and GDPR compliance
This project is for educational purposes only. ÖBB and its data remain property of Österreichische Bundesbahnen.
Feel free to improve the HTML parsing, add more features, or enhance the UI!
- Implement real HTML parsing for actual ÖBB data
- Add more station pairs
- Show platform changes
- Display train composition
- Add ticket booking links
- Implement real seat availability (requires official API)
- Add delay notifications
- Support for multiple routes
- Mobile app version