Skip to content
Scrappa Get API key
Trainline API 1 credit/request

Trainline Calling Points API Documentation

GET https://scrappa.co/api/trainline/journeys/calling-points

Trainline Calling Points API Documentation Read every stop of one train leg with scheduled times, platforms and live status such as on time, delayed or cancelled. Build the request from one leg of a journey answer: timetable_id, carrier.code, departure_time, origin.code and destination.code. Coach legs have no calling points. Live status is empty more than about one day before departure. Encode the plus sign of the time offset as %2B.

Trainline Calling Points API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/trainline/journeys/calling-points
Auth header
x-api-key
Cost
1 credit/request
timetable_id = 1234567890 carrier = example departure_time = example
Response preview
200 OK
{
    "data": {
        "carrier": {
            "code": "urn:trainline:atoc:carrier:VT",
            "name": "Avanti West Coast"
        },
        "cancelled": false,
        "service_date": "2026-11-03",
        "timetable_id": "W34038",
        "delay_reasons": [],
        "calling_points": [
            {
                "type": "ORIGIN",
                "index": 0,
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

5 required parameters needed before sending a request.

timetable_id string Required

legs[].timetable_id of a journey answer. Example: W34038.

Example value 1234567890
carrier string Required

legs[].carrier.code. Example: urn:trainline:atoc:carrier:VT.

Example value example
departure_time string Required

legs[].departure_time with its offset. Example: 2026-11-03T09:13:00%2B00:00.

Example value example
origin string Required

legs[].origin.code. Example: urn:trainline:atoc:loc:EUS1444.

Example value example
destination string Required

legs[].destination.code. Example: urn:trainline:atoc:loc:MAN2968.

Example value example

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "carrier": {
            "code": "urn:trainline:atoc:carrier:VT",
            "name": "Avanti West Coast"
        },
        "cancelled": false,
        "service_date": "2026-11-03",
        "timetable_id": "W34038",
        "delay_reasons": [],
        "calling_points": [
            {
                "type": "ORIGIN",
                "index": 0,
                "arrival": null,
                "station": {
                    "code": "urn:trainline:atoc:loc:EUS1444",
                    "name": "London Euston",
                    "short_code": "EUS"
                },
                "departure": {
                    "live": null,
                    "platform": "2",
                    "scheduled_time": "2026-11-03T09:13:00+00:00"
                }
            },
            {
                "type": "NORMAL",
                "index": 1,
                "arrival": {
                    "live": null,
                    "platform": "3",
                    "scheduled_time": "2026-11-03T10:09:00+00:00"
                },
                "station": {
                    "code": "urn:trainline:atoc:loc:NUN1077",
                    "name": "Nuneaton",
                    "short_code": "NUN"
                },
                "departure": {
                    "live": null,
                    "platform": "3",
                    "scheduled_time": "2026-11-03T10:10:00+00:00"
                }
            },
            {
                "type": "NORMAL",
                "index": 2,
                "arrival": {
                    "live": null,
                    "platform": "2",
                    "scheduled_time": "2026-11-03T10:43:00+00:00"
                },
                "station": {
                    "code": "urn:trainline:atoc:loc:SOT1314",
                    "name": "Stoke-on-Trent",
                    "short_code": "SOT"
                },
                "departure": {
                    "live": null,
                    "platform": "2",
                    "scheduled_time": "2026-11-03T10:44:00+00:00"
                }
            },
            {
                "type": "DESTINATION",
                "index": 4,
                "arrival": {
                    "live": null,
                    "platform": "5",
                    "scheduled_time": "2026-11-03T11:19:00+00:00"
                },
                "station": {
                    "code": "urn:trainline:atoc:loc:MAN2968",
                    "name": "Manchester Piccadilly",
                    "short_code": "MAN"
                },
                "departure": null
            }
        ],
        "transport_mode": "TRAIN",
        "has_live_status": false,
        "cancellation_reasons": []
    },
    "meta": {
        "billable": true,
        "endpoint_family": "journeys_calling_points"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

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"
}
404

Resource Not Found

No service matches these leg values. Use the values of a fresh journey answer. This response is not billable.

{
    "meta": {
        "billable": false,
        "retryable": false,
        "endpoint_family": "journeys_calling_points"
    },
    "error": {
        "code": "NOT_FOUND",
        "message": "Trainline found no match. Use station ids from the stations endpoint and ids from a fresh search."
    },
    "success": false
}
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.

{
    "meta": {
        "billable": false,
        "retryable": true,
        "endpoint_family": "journeys_calling_points"
    },
    "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.