anachb
适用于全奥地利的奥地利公共交通 (VOR AnachB)。查询实时发车、搜索车站/站点、规划地点之间的路线并检查服务中断情况。在询问奥地利火车、公共汽车、电车、地铁 (U-Bahn) 或涉及奥地利公共交通的方向时使用。
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~manmal-a-nach-bcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~manmal-a-nach-b/file -o manmal-a-nach-b.md# VOR AnachB - Austrian Public Transport API
Query Austrian public transport for real-time departures, route planning, and service disruptions using the HAFAS API.
## Quick Reference
| Script | Purpose |
|--------|---------|
| `search.sh` | Find stations/stops by name |
| `departures.sh` | Real-time departures at a station |
| `route.sh` | Plan a trip between two locations |
| `disruptions.sh` | Current service disruptions |
**API:** HAFAS (Hacon Fahrplan-Auskunfts-System)
**Endpoint:** `https://vao.demo.hafas.de/gate`
---
## 1. Search Stations/Stops
Find station IDs by name:
```bash
./search.sh "Stephansplatz"
./search.sh "Wien Hauptbahnhof"
./search.sh "Linz"
./search.sh "Salzburg Hbf"
```
Returns station names, IDs (extId), and coordinates.
**Response fields:**
- `name`: Station name
- `extId`: Station ID for use in other queries
- `type`: S (Station), A (Address), P (POI)
- `coordinates`: WGS84 coordinates (lon/lat in 1e-6 format)
---
## 2. Real-Time Departures
Get next departures from a station:
```bash
./departures.sh <station-id> [count]
# Examples:
./departures.sh 490132000 # Wien Stephansplatz, 10 departures
./departures.sh 490132000 20 # Wien Stephansplatz, 20 departures
./departures.sh 490060200 # Wien Hauptbahnhof
./departures.sh 444130000 # Linz Hbf
./departures.sh 455000100 # Salzburg Hbf
```
**Response fields:**
- `line`: Line name (U1, S1, RJ, etc.)
- `direction`: Final destination
- `departure`: Scheduled departure time
- `delay`: Delay in minutes (if any)
- `platform`: Platform/track number
---
## 3. Route Planning
Plan a trip between two stations:
```bash
./route.sh <from-id> <to-id> [results]
# Examples:
./route.sh 490132000 490060200 # Stephansplatz → Hauptbahnhof
./route.sh 490132000 444130000 5 # Wien → Linz, 5 results
./route.sh "Graz Hbf" "Wien Hbf" # Search by name (slower)
```
**Response fields:**
- `departure`: Departure time
- `arrival`: Arrival time
- `duration`: Trip duration
- `changes`: Number of transfers
- `legs`: Array of trip segments with line info
---
## 4. Disruptions
Check current service disruptions:
```bash
./disruptions.sh [category]
# Examples:
./disruptions.sh # All disruptions
./disruptions.sh TRAIN # Train disruptions only
./disruptions.sh BUS # Bus disruptions only
```
---
## Common Station IDs
| Station | ID |
|---------|-----|
| Wien Stephansplatz | 490132000 |
| Wien Hauptbahnhof | 490134900 |
| Wien Westbahnhof | 490024300 |
| Wien Praterstern | 490056100 |
| Wien Karlsplatz | 490024600 |
| Wien Schwedenplatz | 490119500 |
| Linz Hbf | 444116400 |
| Salzburg Hbf | 455000200 |
| Graz Hbf | 460086000 |
| Innsbruck Hbf | 481070100 |
| Klagenfurt Hbf | 492019500 |
| St. Pölten Hbf | 431543300 |
| Wiener Neustadt Hbf | 430521000 |
| Krems a.d. Donau | 431046400 |
**Tip:** Always use `./search.sh` to find the correct station ID.
---
## Transport Types
| Code | Type |
|------|------|
| ICE/RJ/RJX | High-speed trains |
| IC/EC | InterCity/EuroCity |
| REX/R | Regional Express/Regional |
| S | S-Bahn (suburban rail) |
| U | U-Bahn (Vienna metro) |
| STR | Tram/Straßenbahn |
| BUS | Bus |
| AST | Demand-responsive transport |
---
## API Details (for advanced usage)
The scripts use the HAFAS JSON API. For custom queries:
```bash
curl -s -X POST "https://vao.demo.hafas.de/gate" \
-H "Content-Type: application/json" \
-d '{
"svcReqL": [{
"req": { ... },
"meth": "METHOD_NAME",
"id": "1|1|"
}],
"client": {"id": "VAO", "v": "1", "type": "AND", "name": "nextgen"},
"ver": "1.73",
"lang": "de",
"auth": {"aid": "nextgen", "type": "AID"}
}'
```
**Available methods:**
- `LocMatch` - Location/station search
- `StationBoard` - Departures/arrivals
- `TripSearch` - Route planning
- `HimSearch` - Disruptions/service messages
- `JourneyDetails` - Details of a specific journey
---
## Tips
1. **Find station IDs first**: Always use `search.sh` to find the correct station ID before querying departures or routes.
2. **Station vs Stop**: Major stations have multiple platforms - the main station ID covers all platforms.
3. **Real-time data**: Departures include real-time delays when available.
4. **Austria-wide**: This API covers all Austrian public transport, not just Vienna.
5. **Cross-border**: Some routes extend to neighboring countries (Germany, Czech Republic, etc.).
---
## 中文说明
# VOR AnachB - 奥地利公共交通 API
使用 HAFAS API 查询奥地利公共交通的实时发车、路线规划和服务中断信息。
## 快速参考
| Script | Purpose |
|--------|---------|
| `search.sh` | 按名称查找车站/站点 |
| `departures.sh` | 某车站的实时发车信息 |
| `route.sh` | 规划两地之间的行程 |
| `disruptions.sh` | 当前服务中断 |
**API:** HAFAS (Hacon Fahrplan-Auskunfts-System)
**端点:** `https://vao.demo.hafas.de/gate`
---
## 1. 搜索车站/站点
按名称查找车站 ID:
```bash
./search.sh "Stephansplatz"
./search.sh "Wien Hauptbahnhof"
./search.sh "Linz"
./search.sh "Salzburg Hbf"
```
返回车站名称、ID (extId) 和坐标。
**响应字段:**
- `name`:车站名称
- `extId`:用于其他查询的车站 ID
- `type`:S (Station)、A (Address)、P (POI)
- `coordinates`:WGS84 坐标(lon/lat,1e-6 格式)
---
## 2. 实时发车
获取某车站的下一班发车:
```bash
./departures.sh <station-id> [count]
# Examples:
./departures.sh 490132000 # Wien Stephansplatz, 10 departures
./departures.sh 490132000 20 # Wien Stephansplatz, 20 departures
./departures.sh 490060200 # Wien Hauptbahnhof
./departures.sh 444130000 # Linz Hbf
./departures.sh 455000100 # Salzburg Hbf
```
**响应字段:**
- `line`:线路名称(U1、S1、RJ 等)
- `direction`:终点目的地
- `departure`:计划发车时间
- `delay`:延误分钟数(如有)
- `platform`:站台/股道号
---
## 3. 路线规划
规划两个车站之间的行程:
```bash
./route.sh <from-id> <to-id> [results]
# Examples:
./route.sh 490132000 490060200 # Stephansplatz → Hauptbahnhof
./route.sh 490132000 444130000 5 # Wien → Linz, 5 results
./route.sh "Graz Hbf" "Wien Hbf" # Search by name (slower)
```
**响应字段:**
- `departure`:发车时间
- `arrival`:到达时间
- `duration`:行程时长
- `changes`:换乘次数
- `legs`:包含线路信息的行程段数组
---
## 4. 服务中断
查看当前服务中断:
```bash
./disruptions.sh [category]
# Examples:
./disruptions.sh # All disruptions
./disruptions.sh TRAIN # Train disruptions only
./disruptions.sh BUS # Bus disruptions only
```
---
## 常用车站 ID
| Station | ID |
|---------|-----|
| Wien Stephansplatz | 490132000 |
| Wien Hauptbahnhof | 490134900 |
| Wien Westbahnhof | 490024300 |
| Wien Praterstern | 490056100 |
| Wien Karlsplatz | 490024600 |
| Wien Schwedenplatz | 490119500 |
| Linz Hbf | 444116400 |
| Salzburg Hbf | 455000200 |
| Graz Hbf | 460086000 |
| Innsbruck Hbf | 481070100 |
| Klagenfurt Hbf | 492019500 |
| St. Pölten Hbf | 431543300 |
| Wiener Neustadt Hbf | 430521000 |
| Krems a.d. Donau | 431046400 |
**提示:** 始终使用 `./search.sh` 来查找正确的车站 ID。
---
## 交通类型
| Code | Type |
|------|------|
| ICE/RJ/RJX | 高速列车 |
| IC/EC | InterCity/EuroCity |
| REX/R | 区域快速/区域列车 |
| S | S-Bahn(市郊铁路) |
| U | U-Bahn(维也纳地铁) |
| STR | 有轨电车/Straßenbahn |
| BUS | 公共汽车 |
| AST | 需求响应式交通 |
---
## API 详情(高级用法)
这些脚本使用 HAFAS JSON API。用于自定义查询:
```bash
curl -s -X POST "https://vao.demo.hafas.de/gate" \
-H "Content-Type: application/json" \
-d '{
"svcReqL": [{
"req": { ... },
"meth": "METHOD_NAME",
"id": "1|1|"
}],
"client": {"id": "VAO", "v": "1", "type": "AND", "name": "nextgen"},
"ver": "1.73",
"lang": "de",
"auth": {"aid": "nextgen", "type": "AID"}
}'
```
**可用方法:**
- `LocMatch` - 地点/车站搜索
- `StationBoard` - 发车/到达
- `TripSearch` - 路线规划
- `HimSearch` - 中断/服务消息
- `JourneyDetails` - 特定行程的详情
---
## 提示
1. **先查找车站 ID**:在查询发车或路线之前,始终使用 `search.sh` 查找正确的车站 ID。
2. **车站与站点**:大型车站有多个站台——主车站 ID 涵盖所有站台。
3. **实时数据**:发车信息在可用时包含实时延误。
4. **覆盖全奥地利**:此 API 覆盖全奥地利的公共交通,而不仅限于维也纳。
5. **跨境**:部分路线延伸至邻国(德国、捷克等)。