Trainline Return Fare Calendar API Documentation Read the cheapest return leg fare for each pair of an outward day and a return day. inward_price is the price Trainline gives to the return leg inside a return ticket, it is not the total fare of the trip. A pair without a priced return leg is left out of the list, it is not a price of zero. It covers UK routes only: a continental route answers with 422 ROUTE_NOT_SUPPORTED, not billable. One request covers at most 14 outward days and 14 return days.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
6 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 outward day, YYYY-MM-DD, today or later.
2026-06-15
string
Required
Last outward day, YYYY-MM-DD, at most 14 days in total and inside the fare horizon of about 178 days.
2026-06-15
string
Required
First return day, YYYY-MM-DD, not before the first outward day.
example
string
Required
Last return day, YYYY-MM-DD, at most 14 days in total and inside the fare horizon of about 178 days.
example
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": {
"pairs": [
{
"return_date": "2026-11-08",
"inward_price": {
"amount": 10.5,
"currency": "GBP"
},
"outward_date": "2026-11-02",
"inward_departure": "2026-11-08T12:30:00+00:00"
},
{
"return_date": "2026-11-09",
"inward_price": {
"amount": 13.9,
"currency": "GBP"
},
"outward_date": "2026-11-03",
"inward_departure": "2026-11-09T14:30:00+00:00"
}
],
"origin": "urn:trainline:generic:loc:EUS1444gb",
"date_to": "2026-11-03",
"currency": "GBP",
"date_from": "2026-11-02",
"return_to": "2026-11-10",
"destination": "urn:trainline:generic:loc:MAN2968gb",
"return_from": "2026-11-08"
},
"meta": {
"billable": true,
"endpoint_family": "fares_calendar_return"
},
"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"
}Route Not Supported
Trainline has no return fare calendar for this route. Only UK routes have one. This response is not billable.
{
"meta": {
"billable": false,
"retryable": false,
"endpoint_family": "fares_calendar_return"
},
"error": {
"code": "ROUTE_NOT_SUPPORTED",
"message": "Trainline has no return fare calendar for this route. It covers UK routes only; use the fare calendar for single fares."
},
"success": false
}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_return"
},
"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.