home / skills / openclaw / skills / rejseplanen

rejseplanen skill

/skills/bjarkehs/rejseplanen

This skill helps you fetch real-time Danish public transport data from Rejseplanen, including departures, arrivals, and journey planning.

npx playbooks add skill openclaw/skills --skill rejseplanen

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.7 KB
---
name: rejseplanen
description: Query Danish public transport departures, arrivals, and journey planning via Rejseplanen API
metadata: {"clawdbot":{"emoji":"🚂","os":["linux","darwin","win32"],"requires":{"bins":["node"]}}}
---

# Rejseplanen - Danish Public Transport

Query real-time train and bus departures, arrivals, and plan journeys via the Rejseplanen API.

## Commands

### Search for stations

```bash
node {baseDir}/dist/rejseplanen.js search "København"
```

### Departures

```bash
node {baseDir}/dist/rejseplanen.js departures Odense
node {baseDir}/dist/rejseplanen.js departures Odense --trains
node {baseDir}/dist/rejseplanen.js departures Odense --trains --to Aalborg
```

### Arrivals

```bash
node {baseDir}/dist/rejseplanen.js arrivals Aalborg
node {baseDir}/dist/rejseplanen.js arrivals Aalborg --trains --from Odense
```

### Trip planning

```bash
node {baseDir}/dist/rejseplanen.js trip Odense Aalborg
node {baseDir}/dist/rejseplanen.js trip Odense "Aalborg Vestby" --time 07:00
```

### Journey details

Show all stops for a specific train:

```bash
node {baseDir}/dist/rejseplanen.js journey Odense 75
```

## Options

- `--trains` - Show only trains
- `--buses` - Show only buses
- `--to <station>` - Filter departures by destination
- `--from <station>` - Filter arrivals by origin
- `--time HH:MM` - Departures after specified time
- `--output json|text` - Output format (default: text)
- `--json` - Shorthand for `--output json`

## JSON output

For programmatic parsing, use `--json`:

```bash
node {baseDir}/dist/rejseplanen.js departures Odense --json
```

## Tips

- Use `search` to find station IDs, then store frequently used ones for faster lookups
- Station IDs can be used directly instead of names (e.g., `008600512` for Odense)

Overview

This skill queries Danish public transport data from the Rejseplanen API to return real-time departures, arrivals, trip planning, and detailed journey stops. It supports filtering by transport mode, time, origin, and destination and can output either human-readable text or JSON for automation. The skill is designed for quick command-line lookups or integration into scripts and tools.

How this skill works

You search for stations or supply station names/IDs to request data from Rejseplanen. The skill can list departures or arrivals, plan trips between two stops, and show all stops for a specific journey. Options let you restrict results to trains or buses, filter by destination/origin, set a minimum departure time, and choose JSON or text output.

When to use it

  • Check real-time departures or arrivals for a station before leaving
  • Plan a trip between two Danish stations with schedule options
  • Filter results to only trains or only buses for clarity
  • Automate retrieval of schedules for dashboards or notifications
  • Inspect all stops for a given journey to confirm intermediate calls

Best practices

  • Use the search command to find and cache station IDs for faster, reliable queries
  • Prefer station IDs when automating to avoid name ambiguity
  • Use --json for programmatic parsing and --output text for human reading
  • Combine --to or --from with --trains/--buses to narrow results quickly
  • Specify --time HH:MM to focus on departures after a certain time

Example use cases

  • Quickly list upcoming departures from Odense or another station
  • Plan a morning trip from Odense to Aalborg at a specific time
  • Fetch only train departures heading to a specific destination
  • Retrieve arrival information filtered by originating station
  • Integrate JSON output into a notification system for delayed services

FAQ

Can I use station IDs instead of names?

Yes. Station IDs are supported and recommended for scripting to avoid ambiguity.

How do I get machine-readable output?

Use --json or --output json to receive structured JSON suitable for parsing.