46 lines
1.8 KiB
Markdown
46 lines
1.8 KiB
Markdown
---
|
|
name: rvv-regensburg
|
|
description: Real-time public transport information for Regensburg (RVV). Provides departures, stop finding, and journey planning via direct API access. Use when the user asks for bus/train departures in Regensburg or needs to find a connection within the city.
|
|
---
|
|
|
|
# 🚌 RVV Regensburg
|
|
|
|
Access real-time public transport data for the Regensburg transport network (RVV) using the Mentz EFA API.
|
|
|
|
## 🚀 Quick Usage
|
|
|
|
Use the provided `scripts/rvv_query.py` to interact with the API. Always try to find the correct Stop ID first if you don't have it.
|
|
|
|
### 1. Find a Stop ID
|
|
If you only have a name like "Hauptbahnhof", find its global Stop ID (e.g., `de:09362:11000`):
|
|
```bash
|
|
./scripts/rvv_query.py stop "Hauptbahnhof"
|
|
```
|
|
|
|
### 2. Get Next Departures
|
|
To see what's leaving a stop soon (using its Stop ID):
|
|
```bash
|
|
./scripts/rvv_query.py departures "de:09362:11010" --count 5
|
|
```
|
|
|
|
### 3. Plan a Journey
|
|
To find connections between two Stop IDs:
|
|
```bash
|
|
./scripts/rvv_query.py trip "de:09362:11010" "de:09362:11000"
|
|
```
|
|
|
|
## 🛠️ API Details (Advanced)
|
|
If `rvv_query.py` is not sufficient, you can use `curl` directly. The base URL is `https://efa.rvv.de/efa/`.
|
|
|
|
**Endpoints:**
|
|
- `XML_STOPFINDER_REQUEST`: Resolve names to IDs.
|
|
- `XML_DM_REQUEST`: Departure board.
|
|
- `XML_TRIP_REQUEST2`: Connection search.
|
|
|
|
Always include `outputFormat=rapidJSON` and `version=10.5.17.3` in your requests for the best experience.
|
|
|
|
## 💡 Tips
|
|
- **Real-time:** The API provides real-time data by default (`useRealtime=1`). Look for `rt_time` in the script output.
|
|
- **Global IDs:** Prefer the global ID format (e.g., `de:09362:XXXXX`) for better accuracy.
|
|
- **Regensburg Focus:** When searching for stops, include "Regensburg" in the name to avoid matches in other cities (e.g., "Hauptbahnhof" -> "Regensburg, Hauptbahnhof").
|