search_trains
Find available trains between two cities on a specific date. Returns schedules, durations, and paginated results.
Instructions
Search for train journeys between two cities on a specific date.
Args: origin: Starting city name (e.g., "Madrid", "Barcelona", "Valencia") destination: Destination city name (e.g., "Madrid", "Barcelona", "Sevilla") date: Travel date. Accepts flexible formats: - ISO: "2025-11-28" (RECOMMENDED) - European: "28/11/2025" - Written: "November 28, 2025" or "28 November 2025" If not provided, searches for today's date. page: Page number to display (default: 1) per_page: Number of results per page (default: 10, max: 50) api_key: API key for authentication (optional if configured via environment)
Returns: Formatted string with available train options including times and durations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | Yes | ||
| destination | Yes | ||
| date | No | ||
| page | No | ||
| per_page | No | ||
| api_key | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |