TransportationDocumentedScanned

oebb-scotty

Austrian rail travel planner (ÖBB Scotty).

Share:

Installation

npx clawhub@latest install oebb-scotty

View the full skill documentation and source below.

Documentation

ÖBB Scotty API

Query Austria's public transport for trip planning, station departures, and service alerts via the HAFAS mgate API.

Quick Reference

MethodPurpose
LocMatchSearch for stations/stops by name
TripSearchPlan a journey between two locations
StationBoardGet departures/arrivals at a station
HimSearchGet service alerts and disruptions
Base URL: --- ## Authentication All requests require these headers in the JSON body: __CODE_BLOCK_0__ --- ## 1. Location Search (LocMatch) Search for stations, stops, addresses, or POIs by name. ### Request __CODE_BLOCK_1__ ### Response Structure __CODE_BLOCK_2__ ### Location Types | Type | Description | |------|-------------| | S | Station/Stop | | A | Address | | P | POI (Point of Interest) | ### Key Fields | Field | Description | |-------|-------------| | lid | Location ID string (use in TripSearch) | | extId | External station ID | | name | Station name | | crd.x/y | Coordinates (x=lon, y=lat, scaled by 10^6) | | pCls | Product class bitmask | --- ## 2. Trip Search (TripSearch) Plan a journey between two locations. ### Request __CODE_BLOCK_3__ ### Parameters | Param | Description | |-------|-------------| | depLocL | Departure location(s) - use lid from LocMatch | | arrLocL | Arrival location(s) | | outDate | Departure date (YYYYMMDD) | | outTime | Departure time (HHMMSS) | | outFrwd | true = search forward, false = search backward | | numF | Number of connections to return | | jnyFltrL | Product filter (see below) | | getPasslist | Include intermediate stops | ### Product Filter Values | Bit | Value | Product | |-----|-------|---------| | 0 | 1 | ICE/RJX (High-speed) | | 1 | 2 | IC/EC (InterCity) | | 2 | 4 | NJ (Night trains) | | 3 | 8 | D/EN (Express) | | 4 | 16 | REX/R (Regional Express) | | 5 | 32 | S-Bahn | | 6 | 64 | Bus | | 7 | 128 | Ferry | | 8 | 256 | U-Bahn | | 9 | 512 | Tram | Use 1023 for all products, or sum specific bits. ### Response Structure __CODE_BLOCK_4__ ### Key Connection Fields | Field | Description | |-------|-------------| | dur | Duration (HHMMSS) | | chg | Number of changes | | dTimeS | Scheduled departure | | dTimeR | Real-time departure (if available) | | aTimeS | Scheduled arrival | | aTimeR | Real-time arrival (if available) | | dPltfS.txt | Departure platform | | aPltfS.txt | Arrival platform | | secL | Journey sections (legs) | | secL[].jny.prodX | Index into common.prodL[] for train name | ### Understanding prodX (Product Index) **Important:** The prodX field in journey sections is an index into the common.prodL[] array, NOT the train name itself. To get the actual train name (e.g., "S7", "RJX 662"), you must look up common.prodL[prodX].name. ### Extracting Trip Summaries with jq The raw TripSearch response is very verbose. Use this jq filter to extract a concise summary with resolved train names: __CODE_BLOCK_5__ Example output: __CODE_BLOCK_6__ --- ## 3. Station Board (StationBoard) Get departures or arrivals at a station. ### Request __CODE_BLOCK_7__ ### Parameters | Param | Description | |-------|-------------| | stbLoc | Station location | | date | Date (YYYYMMDD) | | time | Time (HHMMSS) | | type | DEP (departures) or ARR (arrivals) | | maxJny | Maximum number of journeys | ### Response Structure __CODE_BLOCK_8__ --- ## 4. Service Alerts (HimSearch) Get current disruptions and service information. ### Request __CODE_BLOCK_9__ ### Response Structure __CODE_BLOCK_10__ --- ## Common Station IDs | Station | extId | |---------|-------| | Wien Hbf | 8103000 | | Wien Meidling | 8100514 | | Wien Westbahnhof | 8101003 | | Salzburg Hbf | 8100002 | | Linz Hbf | 8100013 | | Graz Hbf | 8100173 | | Innsbruck Hbf | 8100108 | | Klagenfurt Hbf | 8100085 | | St. Pölten Hbf | 8100008 | | Wr. Neustadt Hbf | 8100516 | --- ## Time Format - Dates: YYYYMMDD (e.g., 20260109) - Times: HHMMSS (e.g., 080000 = 08:00:00) - Duration: HHMMSS (e.g., 025200 = 2h 52m) --- ## Error Handling Check err` field in response:
{
  "err": "OK",           // Success
  "err": "PARSE",        // Invalid request format
  "err": "NO_MATCH",     // No results found
  "errTxt": "..."        // Error details
}

Product Classes (cls values)

clsProduct
1ICE/RJX
2IC/EC
4Night trains
8NJ/EN
16REX/Regional
32S-Bahn
64Bus
128Ferry
256U-Bahn
512Tram
1024On-demand
2048Other