anachb
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVOR AnachB - Austrian Public Transport API
VOR AnachB - 奥地利公共交通API
Query Austrian public transport for real-time departures, route planning, and service disruptions using the HAFAS API.
通过HAFAS API查询奥地利公共交通的实时发车信息、路线规划以及服务中断情况。
Quick Reference
快速参考
| Script | Purpose |
|---|---|
| Find stations/stops by name |
| Real-time departures at a station |
| Plan a trip between two locations |
| Current service disruptions |
API: HAFAS (Hacon Fahrplan-Auskunfts-System)
Endpoint:
Endpoint:
https://vao.demo.hafas.de/gate| 脚本 | 用途 |
|---|---|
| 按名称搜索站点 |
| 查询站点的实时发车信息 |
| 规划两地间的行程 |
| 查询当前服务中断情况 |
API: HAFAS(Hacon Fahrplan-Auskunfts-System)
端点:
端点:
https://vao.demo.hafas.de/gate1. Search Stations/Stops
1. 搜索站点
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:
- : Station name
name - : Station ID for use in other queries
extId - : S (Station), A (Address), P (POI)
type - : WGS84 coordinates (lon/lat in 1e-6 format)
coordinates
按名称查找站点ID:
bash
./search.sh "Stephansplatz"
./search.sh "Wien Hauptbahnhof"
./search.sh "Linz"
./search.sh "Salzburg Hbf"返回站点名称、ID(extId)和坐标。
响应字段:
- : 站点名称
name - : 用于其他查询的站点ID
extId - : S(车站)、A(地址)、P(兴趣点)
type - : WGS84坐标(格式为1e-6的经纬度)
coordinates
2. Real-Time Departures
2. 实时发车信息
Get next departures from a station:
bash
./departures.sh <station-id> [count]获取站点的下一班发车信息:
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
---./departures.sh 490132000 # 维也纳斯蒂芬广场,10条发车信息
./departures.sh 490132000 20 # 维也纳斯蒂芬广场,20条发车信息
./departures.sh 490060200 # 维也纳火车总站
./departures.sh 444130000 # 林茨火车总站
./departures.sh 455000100 # 萨尔茨堡火车总站
**响应字段:**
- `line`: 线路名称(U1、S1、RJ等)
- `direction`: 最终目的地
- `departure`: 计划发车时间
- `delay`: 延误时长(分钟,如有)
- `platform`: 站台/轨道编号
---3. Route Planning
3. 路线规划
Plan a trip between two stations:
bash
./route.sh <from-id> <to-id> [results]规划两个站点之间的行程:
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
---./route.sh 490132000 490060200 # 斯蒂芬广场 → 火车总站
./route.sh 490132000 444130000 5 # 维也纳 → 林茨,5条结果
./route.sh "Graz Hbf" "Wien Hbf" # 按名称搜索(速度较慢)
**响应字段:**
- `departure`: 发车时间
- `arrival`: 到达时间
- `duration`: 行程时长
- `changes`: 换乘次数
- `legs`: 包含线路信息的行程分段数组
---4. Disruptions
4. 服务中断情况
Check current service disruptions:
bash
./disruptions.sh [category]查询当前服务中断情况:
bash
./disruptions.sh [category]Examples:
示例:
./disruptions.sh # All disruptions
./disruptions.sh TRAIN # Train disruptions only
./disruptions.sh BUS # Bus disruptions only
---./disruptions.sh # 所有中断情况
./disruptions.sh TRAIN # 仅火车服务中断
./disruptions.sh BUS # 仅公交服务中断
---Common Station IDs
常用站点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 |
Tip: Always use to find the correct station ID.
./search.sh| 站点 | ID |
|---|---|
| 维也纳斯蒂芬广场 | 490132000 |
| 维也纳火车总站 | 490134900 |
| 维也纳西站 | 490024300 |
| 维也纳普拉特门站 | 490056100 |
| 维也纳卡尔广场站 | 490024600 |
| 维也纳瑞典广场站 | 490119500 |
| 林茨火车总站 | 444116400 |
| 萨尔茨堡火车总站 | 455000200 |
| 格拉茨火车总站 | 460086000 |
| 因斯布鲁克火车总站 | 481070100 |
| 克拉根福火车总站 | 492019500 |
| 圣珀尔滕火车总站 | 431543300 |
| 维也纳新城火车总站 | 430521000 |
| 多瑙河畔克雷姆斯站 | 431046400 |
提示: 请始终使用 查找正确的站点ID。
./search.shTransport 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 |
| 代码 | 类型 |
|---|---|
| ICE/RJ/RJX | 高速列车 |
| IC/EC | 城际列车/欧洲城际列车 |
| REX/R | 区域特快/区域列车 |
| S | S-Bahn(市郊铁路) |
| U | U-Bahn(维也纳地铁) |
| STR | 有轨电车/Straßenbahn |
| BUS | 公交 |
| AST | 响应式需求交通 |
API Details (for advanced usage)
API详情(高级用法)
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:
- - Location/station search
LocMatch - - Departures/arrivals
StationBoard - - Route planning
TripSearch - - Disruptions/service messages
HimSearch - - Details of a specific journey
JourneyDetails
脚本使用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
Tips
提示
-
Find station IDs first: Always useto find the correct station ID before querying departures or routes.
search.sh -
Station vs Stop: Major stations have multiple platforms - the main station ID covers all platforms.
-
Real-time data: Departures include real-time delays when available.
-
Austria-wide: This API covers all Austrian public transport, not just Vienna.
-
Cross-border: Some routes extend to neighboring countries (Germany, Czech Republic, etc.).
-
先查找站点ID: 在查询发车信息或路线前,请始终使用查找正确的站点ID。
search.sh -
车站 vs 站点: 大型车站有多个站台,主车站ID覆盖所有站台。
-
实时数据: 发车信息包含可用的实时延误数据。
-
覆盖全奥地利: 该API覆盖全奥地利的公共交通,而非仅维也纳。
-
跨境路线: 部分路线延伸至邻国(德国、捷克共和国等)。