manmal

Scotty - AT Public Transport Service (ÖBB)

生活服务v1.0.0
作者:manmal更新于 2026-05-11oebb-scotty@clawhub_manmal/oebb-scotty
旅行规划

据 AlphaMoat 统计,截至 2026-09,Scotty - AT Public Transport Service (ÖBB) 累计下载 2,730 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 3,929 位,在「生活服务」分类(246 个)中排名第 204 位。

累计安装
208
累计下载
2,730
星标
3
全站排名
#3,929
全站前 78% · 「生活服务」前 83%
平台累计安装累计下载星标评论
ClawHub ↗842,5653-
SkillHub ↗2082,7303—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

端点为 https://fahrplan.oebb.at/bin/mgate.exe,请求体携带 AID 认证与客户端标识。四个方法:LocMatch 按名称搜索车站、地址或 POI(类型 S/A/P);TripSearch 规划两点行程,参数含出发/到达位置、日期时间(YYYYMMDD/HHMMSS)、前进或回溯搜索、返回连接数、产品过滤与是否含中途站;StationBoard 查询站点出发/到达(DEP/ARR 与最大旅程数);HimSearch 获取运营中断与服务信息。产品过滤按位求和,1023 表示全部产品(高速、城际、夜车、区域、S-Bahn、公交、轮渡、地铁、有轨电车等)。主文给出常用车站 extId(如 Wien Hbf 8103000、Salzburg Hbf 8100002)与 jq 摘要过滤器;旅程段落中的 prodX 是指向 common.prodL[] 的索引而非车次名,需查表解析真实车次;响应 err 字段区分 OK/PARSE/NO_MATCH。配套 skill-card 提醒:行程查询会发送至 ÖBB,站名、日期、时间与路线可能共享给外部时刻表服务;shell 辅助脚本以用户输入拼装 JSON 请求体,输入不受信时应谨慎,待脚本改用 jq 构造并校验数字/日期/时间参数后再用于异常输入。

资料发布于 2026-10-27

可以用来做什么

  • 规划奥地利境内及跨境铁路行程
  • 查询车站的出发/到达时刻牌
  • 获取运营中断与服务告警

什么时候用

  • 规划奥地利火车行程、查站点到发或服务中断时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

查 Wien Hbf 到 Salzburg Hbf 明天上午的火车连接
看 Wien Hbf 现在的出发牌

月度数据趋势

累计下载2,730
1,9182,3542,7902026-03 · 累计下载 1,9782026-05 · 累计下载 2,1572026-06 · 累计下载 2,2462026-07 · 累计下载 2,4162026-08 · 累计下载 2,4882026-09 · 累计下载 2,73026-0326-09
星标3
1232026-03 · 星标 12026-05 · 星标 22026-06 · 星标 32026-07 · 星标 32026-08 · 星标 32026-09 · 星标 326-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-092,730—3
2026-082,488+3.0%3
2026-072,416+7.6%3
2026-062,246+4.1%3
2026-052,157—2
2026-031,978—1

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

9.5 KB · ClawHub v1.0.0
---
name: oebb-scotty
description: Austrian rail travel planner (ÖBB Scotty). Use when planning train journeys in Austria, checking departures/arrivals at stations, or looking for service disruptions. Covers ÖBB trains, S-Bahn, regional trains, and connections to neighboring countries.
---

# ÖBB Scotty API

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

## Quick Reference
展开全部(共 430 行)

| Method | Purpose |
|--------|---------|
| `LocMatch` | Search for stations/stops by name |
| `TripSearch` | Plan a journey between two locations |
| `StationBoard` | Get departures/arrivals at a station |
| `HimSearch` | Get service alerts and disruptions |

**Base URL:** `https://fahrplan.oebb.at/bin/mgate.exe`

---

## Authentication

All requests require these headers in the JSON body:

```json
{
  "id": "1",
  "ver": "1.67",
  "lang": "deu",
  "auth": {"type": "AID", "aid": "OWDL4fE4ixNiPBBm"},
  "client": {"id": "OEBB", "type": "WEB", "name": "webapp", "l": "vs_webapp"},
  "formatted": false,
  "svcReqL": [...]
}
```

---

## 1. Location Search (`LocMatch`)

Search for stations, stops, addresses, or POIs by name.

### Request

```bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
  -H "Content-Type: application/json" \
  -d '{
    "id":"1","ver":"1.67","lang":"deu",
    "auth":{"type":"AID","aid":"OWDL4fE4ixNiPBBm"},
    "client":{"id":"OEBB","type":"WEB","name":"webapp","l":"vs_webapp"},
    "formatted":false,
    "svcReqL":[{
      "req":{"input":{"field":"S","loc":{"name":"Wien Hbf","type":"ALL"},"maxLoc":10}},
      "meth":"LocMatch"
    }]
  }'
```

### Response Structure

```json
{
  "svcResL": [{
    "res": {
      "match": {
        "locL": [{
          "lid": "A=1@O=Wien Hbf (U)@X=16377950@Y=48184986@U=181@L=1290401@",
          "type": "S",
          "name": "Wien Hbf (U)",
          "extId": "1290401",
          "crd": { "x": 16377950, "y": 48184986 },
          "pCls": 6015
        }]
      }
    }
  }]
}
```

### 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

```bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
  -H "Content-Type: application/json" \
  -d '{
    "id":"1","ver":"1.67","lang":"deu",
    "auth":{"type":"AID","aid":"OWDL4fE4ixNiPBBm"},
    "client":{"id":"OEBB","type":"WEB","name":"webapp","l":"vs_webapp"},
    "formatted":false,
    "svcReqL":[{
      "req":{
        "depLocL":[{"lid":"A=1@O=Wien Hbf@L=8103000@","type":"S"}],
        "arrLocL":[{"lid":"A=1@O=Salzburg Hbf@L=8100002@","type":"S"}],
        "jnyFltrL":[{"type":"PROD","mode":"INC","value":"1023"}],
        "getPolyline":false,
        "getPasslist":true,
        "outDate":"20260109",
        "outTime":"080000",
        "outFrwd":true,
        "numF":5
      },
      "meth":"TripSearch"
    }]
  }'
```

### 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

```json
{
  "svcResL": [{
    "res": {
      "outConL": [{
        "date": "20260109",
        "dur": "025200",
        "chg": 0,
        "dep": {
          "dTimeS": "075700",
          "dPltfS": {"txt": "8A-B"}
        },
        "arr": {
          "aTimeS": "104900",
          "aPltfS": {"txt": "7"}
        },
        "secL": [{
          "type": "JNY",
          "jny": {
            "prodX": 0,
            "dirTxt": "Salzburg Hbf",
            "stopL": [...]
          }
        }]
      }],
      "common": {
        "locL": [...],
        "prodL": [...]
      }
    }
  }]
}
```

### 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:

```bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
  -H "Content-Type: application/json" \
  -d '{ ... }' | jq '
    .svcResL[0].res as $r |
    $r.common.prodL as $prods |
    [$r.outConL[] | {
      dep: .dep.dTimeS,
      arr: .arr.aTimeS,
      depPlatform: .dep.dPltfS.txt,
      arrPlatform: .arr.aPltfS.txt,
      dur: .dur,
      chg: .chg,
      legs: [.secL[] | select(.type == "JNY") | {
        train: $prods[.jny.prodX].name,
        dir: .jny.dirTxt,
        dep: .dep.dTimeS,
        arr: .arr.aTimeS,
        depPlatform: .dep.dPltfS.txt,
        arrPlatform: .arr.aPltfS.txt
      }]
    }]'
```

Example output:
```json
[
  {
    "dep": "213900",
    "arr": "221100",
    "depPlatform": "1",
    "arrPlatform": "3A-B",
    "dur": "003200",
    "chg": 0,
    "legs": [{"train": "S 7", "dir": "Flughafen Wien Bahnhof", "dep": "213900", "arr": "221100", ...}]
  }
]
```

---

## 3. Station Board (`StationBoard`)

Get departures or arrivals at a station.

### Request

```bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
  -H "Content-Type: application/json" \
  -d '{
    "id":"1","ver":"1.67","lang":"deu",
    "auth":{"type":"AID","aid":"OWDL4fE4ixNiPBBm"},
    "client":{"id":"OEBB","type":"WEB","name":"webapp","l":"vs_webapp"},
    "formatted":false,
    "svcReqL":[{
      "req":{
        "stbLoc":{"lid":"A=1@O=Wien Hbf@L=8103000@","type":"S"},
        "date":"20260109",
        "time":"080000",
        "type":"DEP",
        "maxJny":20
      },
      "meth":"StationBoard"
    }]
  }'
```

### 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

```json
{
  "svcResL": [{
    "res": {
      "jnyL": [{
        "prodX": 0,
        "dirTxt": "Salzburg Hbf",
        "stbStop": {
          "dTimeS": "080000",
          "dPltfS": {"txt": "8A-B"}
        }
      }],
      "common": {
        "prodL": [{
          "name": "RJX 662",
          "cls": 1,
          "prodCtx": {"catOutL": "Railjet Xpress"}
        }]
      }
    }
  }]
}
```

---

## 4. Service Alerts (`HimSearch`)

Get current disruptions and service information.

### Request

```bash
curl -s -X POST "https://fahrplan.oebb.at/bin/mgate.exe" \
  -H "Content-Type: application/json" \
  -d '{
    "id":"1","ver":"1.67","lang":"deu",
    "auth":{"type":"AID","aid":"OWDL4fE4ixNiPBBm"},
    "client":{"id":"OEBB","type":"WEB","name":"webapp","l":"vs_webapp"},
    "formatted":false,
    "svcReqL":[{
      "req":{
        "himFltrL":[{"type":"PROD","mode":"INC","value":"255"}],
        "maxNum":20
      },
      "meth":"HimSearch"
    }]
  }'
```

### Response Structure

```json
{
  "svcResL": [{
    "res": {
      "msgL": [{
        "hid": "HIM_FREETEXT_843858",
        "head": "Verringertes Sitzplatzangebot",
        "text": "Wegen einer technischen Störung...",
        "prio": 0,
        "sDate": "20260108",
        "eDate": "20260108"
      }]
    }
  }]
}
```

---

## 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:

```json
{
  "err": "OK",           // Success
  "err": "PARSE",        // Invalid request format
  "err": "NO_MATCH",     // No results found
  "errTxt": "..."        // Error details
}
```

---

## Product Classes (cls values)

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

「生活服务」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。