# Trainline Fare Calendar Times API Documentation

<p><strong>Trainline Fare Calendar Times API Documentation</strong> Read the cheapest one-way fare for each day with the departure times of the trains that day. A day without a fare is left out of the list.</p>

- **Documentation:** [https://scrappa.co/docs/trainline-api/trainline_calendar_times](https://scrappa.co/docs/trainline-api/trainline_calendar_times)
- **API group:** Trainline API
- **Endpoint:** `GET https://scrappa.co/api/trainline/fares/calendar/times`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `origin` | string | Yes | Origin station id from the stations endpoint. Example: urn:trainline:generic:loc:EUS1444gb. |
| `destination` | string | Yes | Destination station id from the stations endpoint. Example: urn:trainline:generic:loc:MAN2968gb. |
| `date_from` | string | Yes | First day, YYYY-MM-DD, today or later. |
| `date_to` | string | Yes | Last day, YYYY-MM-DD, at most 60 days after the first day and inside the fare horizon of about 178 days. |
| `currency` | string | No | GBP or EUR. Defaults to GBP. |

## Example response

```json
{
    "data": {
        "days": [
            {
                "date": "2026-10-27",
                "departures": [
                    "2026-10-27T07:46:00Z"
                ],
                "cheapest_price": {
                    "amount": 14,
                    "currency": "GBP"
                }
            },
            {
                "date": "2026-10-28",
                "departures": [
                    "2026-10-28T06:43:00Z",
                    "2026-10-28T07:46:00Z"
                ],
                "cheapest_price": {
                    "amount": 23.9,
                    "currency": "GBP"
                }
            },
            {
                "date": "2026-10-29",
                "departures": [
                    "2026-10-29T06:43:00Z",
                    "2026-10-29T07:46:00Z"
                ],
                "cheapest_price": {
                    "amount": 23.3,
                    "currency": "GBP"
                }
            },
            {
                "date": "2026-10-30",
                "departures": [
                    "2026-10-30T06:43:00Z"
                ],
                "cheapest_price": {
                    "amount": 23.3,
                    "currency": "GBP"
                }
            },
            {
                "date": "2026-10-31",
                "departures": [
                    "2026-10-31T16:46:00Z"
                ],
                "cheapest_price": {
                    "amount": 22.4,
                    "currency": "GBP"
                }
            }
        ],
        "origin": "urn:trainline:generic:loc:EUS1444gb",
        "date_to": "2026-11-03",
        "currency": "GBP",
        "date_from": "2026-10-27",
        "destination": "urn:trainline:generic:loc:MAN2968gb"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "fares_calendar_times"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter is missing or invalid. This response is not billable. |
| 503 | Upstream Unavailable | Trainline did not answer in time. Scrappa retries on other exits first. This response is not billable. Retry after a few seconds. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
