Trainline Fare Calendar Times API Documentation 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.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
4 required parameters needed before sending a request.
1 optional filter available.
string
Required
Origin station id from the stations endpoint. Example: urn:trainline:generic:loc:EUS1444gb.
example
string
Required
Destination station id from the stations endpoint. Example: urn:trainline:generic:loc:MAN2968gb.
example
string
Required
First day, YYYY-MM-DD, today or later.
2026-06-15
string
Required
Last day, YYYY-MM-DD, at most 60 days after the first day and inside the fare horizon of about 178 days.
2026-06-15
string
Optional
GBP or EUR. Defaults to GBP.
USD
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"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
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A required parameter is missing or invalid. This response is not billable.
{
"errors": {
"origin": [
"The origin is a station id from the stations endpoint."
]
},
"message": "The request validation failed"
}Upstream Unavailable
Trainline did not answer in time. Scrappa retries on other exits first. This response is not billable. Retry after a few seconds.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "fares_calendar_times"
},
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The Trainline service is temporarily unavailable. Please retry."
},
"success": false
}Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.