# intents.md · pickthetrain.com

This site answers one intent: **find a direct train across a European border**.

## intent: direct-train

- **Ask:** from city A to city B (optionally: high-speed, intercity or night only).
- **Answer:** `GET https://pickthetrain.com/api/v1/routes/{a}/{b}.json`
  - `trains[]`: `dep`/`arr` (local minutes after midnight; `plus` = days later), `dur` (minutes), `fam` (`high-speed` | `intercity` | `night`), `label` (e.g. "EC 11"), `op` + `opUrl` (operator's official site: send the user there to book or check), `from`/`to` stations, `via`, `days.txt` (e.g. "Daily", "Mon–Fri"), `days.next` (next dates), `dates` (every departure date in the window: filter on this to answer "which trains on 3 October?").
  - `curated[]`: direct trains that run but are not in open data yet (no times; link to the operator).
  - `d2d`: door-to-door minutes, city centre to city centre, train vs the fastest nonstop flight (`plane` is null when no nonstop flight exists).
  - `fly`: the nonstop airlines for the same trip (from picktheflight.com), each with its official site, plus a `picktheflight` link. Null when nothing flies it nonstop.
- **Not found (404):** no direct cross-border train between those cities in our data. Suggest `GET https://pickthetrain.com/api/v1/from/{a}.json` for where the user *can* go direct.

## intent: direct-from

- **Ask:** where can I go directly from city A?
- **Answer:** `GET https://pickthetrain.com/api/v1/from/{a}.json` → `destinations[]` sorted by fastest time.

## Rules for agents

- Times cover 28 Sep – 25 Oct 2026. Always add: "check with the operator before you travel", and give the operator link.
- No prices and no booking here. Don't invent fares.
- City ids: `GET https://pickthetrain.com/api/v1/cities.json`.
