Skip to content
Alpha — Headcode is currently in alpha. APIs and data may change without notice.

Get non-stopping (passing) trains for a station

GET
/v1/stations/{id}/passing
curl --request GET \
--url 'https://api.headcode.dev/v1/stations/KGX/passing?limit=20&expand=false&time_offset=0&time_window=120' \
--header 'Authorization: Bearer <token>'

Returns live non-stopping trains that pass through a station without calling, derived from normalised Darwin service and status data. Times are working times, not public timetable times, since passing trains have no public schedule at this station. Results are at station/TIPLOC granularity only - there is no filtering by physical running line (Fast/Slow/Up/Down); that would require a new data source and is a Future Enhancement, not delivered by this endpoint. The station identifier accepts the same CRS/TIPLOC/STANOX/NLC/slug/ATCO/UIC values as the station lookup endpoint.

id
required
string

Any station identifier: CRS code (e.g. KGX), TIPLOC (e.g. KNGX), STANOX (e.g. 10101), NLC, URL slug (e.g. london-kings-cross), ATCO, or UIC.

Example
KGX
limit
integer
default: 20 >= 1 <= 100

Maximum number of board rows to return.

expand
boolean

When true, each board row includes the full service detail (calling points, formation, associations) under a service key. Defaults to false.

destination
string

Filter by destination station. Accepts the same identifier formats as station ID.

toc
string

Filter by TOC/operator code.

calling_at
string

Filter by calling station TIPLOC.

time_offset
integer
0

Shift the query window by X minutes from now(); supports negative values.

time_window
integer
default: 120

Duration of the query window in minutes (default 120).

Non-stopping trains passing through the station.

Media type application/json
object
station_crs
required
string
/^[A-Z]{3}$/
station_name
required
string
services
required
Array<object>
object
rid
required

Darwin RID.

string
uid
required

Six-character CIF UID.

string
/^[A-Z0-9]{6}$/
train_id

Four-character signalling headcode.

string | null
/^[0-9][A-Z][0-9]{2}$/
toc_code
required

Two-character ATOC/TOC code.

string
/^[A-Z0-9]{2}$/
tiploc
required

TIPLOC visit at this station.

string
/^[A-Z0-9]{3,7}$/
working_pass

Working passing time, HH:MM:SS. Non-stopping trains have no public timetable time at this station.

string | null
estimated

Public estimated time, HH:MM.

string | null
working_estimated

Working estimated time, HH:MM:SS.

string | null
actual

Actual time, HH:MM, when available.

string | null
delayed
required

Whether Darwin reports the forecast as delayed/unknown.

boolean
service
One of:
object
rid
required

Darwin Run ID.

string
uid
required

Six-character CIF UID.

string
/^[A-Z0-9]{6}$/
train_id

Four-character headcode (signalling train identity).

string | null
/^[0-9][A-Z][0-9]{2}$/
rsid

Retail Service ID (6 or 8 characters).

string | null
/^[A-Z0-9]{6}([A-Z0-9]{2})?$/
ssd
required

Scheduled start date.

string format: date
toc_code
required

Two-character ATOC operator code.

string
/^[A-Z0-9]{2}$/
is_passenger_service
required

Whether this is a passenger service.

boolean
is_active
required

Whether the service is currently active in Darwin.

boolean
is_charter

Whether this is a charter service.

boolean
is_reverse_formation

Whether the train is running in reverse formation.

boolean
cancel_reason

A delay or cancellation reason.

object
code
required

Reason code.

integer
tiploc

TIPLOC where the reason applies.

string | null
/^[A-Z0-9]{3,7}$/
near

Whether the location is near the reason site.

boolean
late_reason

A delay or cancellation reason.

object
code
required

Reason code.

integer
tiploc

TIPLOC where the reason applies.

string | null
/^[A-Z0-9]{3,7}$/
near

Whether the location is near the reason site.

boolean
calling_points
required

Ordered calling points with live status.

Array<object>
object
sequence
required

Position in the calling order.

integer
location_type
required

Schedule location type.

string
Allowed values: OR OPOR IP OPIP PP DT OPDT
tiploc
required

TIPLOC code for this location.

string
/^[A-Z0-9]{3,7}$/
activity_codes

Raw 12-character activity code string.

string | null
cancelled
required

Whether this calling point is cancelled.

boolean
public_arrival

Scheduled public arrival time (HH:MM).

string | null
public_departure

Scheduled public departure time (HH:MM).

string | null
working_arrival

Scheduled working arrival time (HH:MM:SS).

string | null
working_departure

Scheduled working departure time (HH:MM:SS).

string | null
working_pass

Scheduled working pass time (HH:MM:SS).

string | null
platform

Platform assignment and status.

object
platform

Platform number or identifier.

string
confirmed

Whether the platform is confirmed.

boolean
suppressed

Whether the platform is suppressed from displays.

boolean
source

Platform source (P=Planned, A=Automatic, M=Manual).

string
Allowed values: P A M
arrival

Real-time status for an arrival, departure, or pass.

object
estimated

Estimated time (HH:MM).

string | null
working_estimated

Working estimated time (HH:MM:SS).

string | null
actual

Actual time (HH:MM).

string | null
delayed

Whether the forecast is unknown-delay.

boolean
departure

Real-time status for an arrival, departure, or pass.

object
estimated

Estimated time (HH:MM).

string | null
working_estimated

Working estimated time (HH:MM:SS).

string | null
actual

Actual time (HH:MM).

string | null
delayed

Whether the forecast is unknown-delay.

boolean
pass

Real-time status for an arrival, departure, or pass.

object
estimated

Estimated time (HH:MM).

string | null
working_estimated

Working estimated time (HH:MM:SS).

string | null
actual

Actual time (HH:MM).

string | null
delayed

Whether the forecast is unknown-delay.

boolean
loading

Loading/crowding data for this calling point.

object
category

Loading category description (e.g. “Seats available”).

string | null
category_type

Loading category type.

string | null
percentage

Overall loading percentage (0-100).

integer | null
<= 100
coaches

Per-coach loading data.

Array<object>

Loading data for a specific coach.

object
number
required

Coach identifier.

string
percentage

Loading percentage for this coach (0-100).

integer | null
<= 100
updated_at

When this loading data was last updated.

string | null format: date-time
associations
required

Links to other services (joins, splits, etc.).

Array<object>
object
category
required

Association type.

string
Allowed values: JJ VV LK NP
associated_rid

RID of the associated service.

string
associated_uid

UID of the associated service.

string | null
/^[A-Z0-9]{6}$/
tiploc
required

TIPLOC where the association occurs.

string
/^[A-Z0-9]{3,7}$/
is_cancelled

Whether the association is cancelled.

boolean
formation

Train formation (coaches).

object
fid
required

Formation identifier.

string
coaches
required
Array<object>
object
number
required

Coach identifier (e.g. “A”).

string
coach_class

Coach class.

string | null
Allowed values: First Standard Mixed
toilet_status

Toilet type available.

string | null
toilet_availability

Toilet availability status.

string | null
Example
{
"station_crs": "KGX",
"station_name": "London Kings Cross",
"services": [
{
"rid": "202605141A45",
"uid": "C12345",
"train_id": "1A45",
"toc_code": "GR",
"tiploc": "KNGX",
"working_pass": "10:02:30",
"estimated": "10:05",
"service": {
"rid": "202605141A45",
"uid": "C12345",
"train_id": "1A45",
"ssd": "2026-05-14",
"toc_code": "GR",
"calling_points": [
{
"location_type": "OR",
"tiploc": "KNGX",
"public_arrival": "14:30",
"public_departure": "14:32",
"platform": {
"platform": "1",
"source": "P"
}
}
],
"associations": [
{
"category": "JJ"
}
],
"formation": {
"coaches": [
{
"number": "A",
"coach_class": "First"
}
]
}
}
}
]
}

Invalid request.

Media type application/problem+json
Bad Request

The request is invalid.

object
type
required

A URI reference that identifies the problem type.

string format: uri-reference
Allowed value: https://docs.headcode.dev/errors/general/bad-request
title
required

A short, human-readable summary of the problem type.

string
Allowed value: Bad Request
status
required

The HTTP status code generated by the origin server for this occurrence.

integer
>= 100 <= 599
Allowed value: 400
detail
required

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri-reference
code
required

An API-specific error code aiding consumers and the provider team understand the error based on the Headcode error taxonomy.

string
<= 100 characters
Allowed value: HEADCODE.GENERAL.BAD_REQUEST
errors

Optional list of explicit details about the problem for an API consumer.

Array<object>

An object to provide explicit details on a problem towards an API consumer.

object
detail
required

A granular description on the specific error related to a body property, query parameter, path parameter, and/or header.

string
<= 4096 characters
pointer

A JSON Pointer to a specific request body property that is the source of error.

string
<= 1024 characters
parameter

The name of the query or path parameter that is the source of error.

string
<= 1024 characters
header

The name of the header that is the source of error.

string
<= 1024 characters
code

A string containing additional provider specific codes to identify the error context.

string
<= 50 characters
Example
{
"type": "https://docs.headcode.dev/errors/general/bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Both 'lat' and 'lng' must be provided together.",
"code": "HEADCODE.GENERAL.BAD_REQUEST"
}

API key is missing or invalid.

Media type application/problem+json
Unauthorized

Authentication is missing or invalid.

object
type
required

A URI reference that identifies the problem type.

string format: uri-reference
Allowed value: https://docs.headcode.dev/errors/general/unauthorized
title
required

A short, human-readable summary of the problem type.

string
Allowed value: Unauthorized
status
required

The HTTP status code generated by the origin server for this occurrence.

integer
>= 100 <= 599
Allowed value: 401
detail
required

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri-reference
code
required

An API-specific error code aiding consumers and the provider team understand the error based on the Headcode error taxonomy.

string
<= 100 characters
Allowed value: HEADCODE.GENERAL.UNAUTHORIZED
errors

Optional list of explicit details about the problem for an API consumer.

Array<object>

An object to provide explicit details on a problem towards an API consumer.

object
detail
required

A granular description on the specific error related to a body property, query parameter, path parameter, and/or header.

string
<= 4096 characters
pointer

A JSON Pointer to a specific request body property that is the source of error.

string
<= 1024 characters
parameter

The name of the query or path parameter that is the source of error.

string
<= 1024 characters
header

The name of the header that is the source of error.

string
<= 1024 characters
code

A string containing additional provider specific codes to identify the error context.

string
<= 50 characters
Example
{
"type": "https://docs.headcode.dev/errors/general/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "missing or malformed Bearer token",
"code": "HEADCODE.GENERAL.UNAUTHORIZED"
}

API key does not have the required scope.

Media type application/problem+json
Forbidden

The API key does not have the required scope.

object
type
required

A URI reference that identifies the problem type.

string format: uri-reference
Allowed value: https://docs.headcode.dev/errors/general/forbidden
title
required

A short, human-readable summary of the problem type.

string
Allowed value: Forbidden
status
required

The HTTP status code generated by the origin server for this occurrence.

integer
>= 100 <= 599
Allowed value: 403
detail
required

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri-reference
code
required

An API-specific error code aiding consumers and the provider team understand the error based on the Headcode error taxonomy.

string
<= 100 characters
Allowed value: HEADCODE.GENERAL.FORBIDDEN
errors

Optional list of explicit details about the problem for an API consumer.

Array<object>

An object to provide explicit details on a problem towards an API consumer.

object
detail
required

A granular description on the specific error related to a body property, query parameter, path parameter, and/or header.

string
<= 4096 characters
pointer

A JSON Pointer to a specific request body property that is the source of error.

string
<= 1024 characters
parameter

The name of the query or path parameter that is the source of error.

string
<= 1024 characters
header

The name of the header that is the source of error.

string
<= 1024 characters
code

A string containing additional provider specific codes to identify the error context.

string
<= 50 characters
Example
{
"type": "https://docs.headcode.dev/errors/general/forbidden",
"title": "Forbidden",
"status": 403,
"detail": "API key does not have the required scope 'reference:read'.",
"code": "HEADCODE.GENERAL.FORBIDDEN"
}

No station matches the given identifier.

Media type application/problem+json
Station Not Found

No station matches the supplied identifier.

object
type
required

A URI reference that identifies the problem type.

string format: uri-reference
Allowed value: https://docs.headcode.dev/errors/stations/not-found
title
required

A short, human-readable summary of the problem type.

string
Allowed value: Station Not Found
status
required

The HTTP status code generated by the origin server for this occurrence.

integer
>= 100 <= 599
Allowed value: 404
detail

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri-reference
code
required

An API-specific error code aiding consumers and the provider team understand the error based on the Headcode error taxonomy.

string
<= 100 characters
Allowed value: HEADCODE.STATIONS.NOT_FOUND
errors

Optional list of explicit details about the problem for an API consumer.

Array<object>

An object to provide explicit details on a problem towards an API consumer.

object
detail
required

A granular description on the specific error related to a body property, query parameter, path parameter, and/or header.

string
<= 4096 characters
pointer

A JSON Pointer to a specific request body property that is the source of error.

string
<= 1024 characters
parameter

The name of the query or path parameter that is the source of error.

string
<= 1024 characters
header

The name of the header that is the source of error.

string
<= 1024 characters
code

A string containing additional provider specific codes to identify the error context.

string
<= 50 characters
Example
{
"type": "https://docs.headcode.dev/errors/stations/not-found",
"title": "Station Not Found",
"status": 404,
"detail": "No station found for identifier 'XYZ'.",
"code": "HEADCODE.STATIONS.NOT_FOUND"
}

The client has exceeded its rate limit.

Media type application/problem+json
Too Many Requests

The client has sent too many requests in a given amount of time.

object
type
required

A URI reference that identifies the problem type.

string format: uri-reference
Allowed value: https://docs.headcode.dev/errors/general/rate-limited
title
required

A short, human-readable summary of the problem type.

string
Allowed value: Too Many Requests
status
required

The HTTP status code generated by the origin server for this occurrence.

integer
>= 100 <= 599
Allowed value: 429
detail
required

A human-readable explanation specific to this occurrence of the problem.

string
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri-reference
code
required

An API-specific error code aiding consumers and the provider team understand the error based on the Headcode error taxonomy.

string
<= 100 characters
Allowed value: HEADCODE.GENERAL.RATE_LIMITED
errors

Optional list of explicit details about the problem for an API consumer.

Array<object>

An object to provide explicit details on a problem towards an API consumer.

object
detail
required

A granular description on the specific error related to a body property, query parameter, path parameter, and/or header.

string
<= 4096 characters
pointer

A JSON Pointer to a specific request body property that is the source of error.

string
<= 1024 characters
parameter

The name of the query or path parameter that is the source of error.

string
<= 1024 characters
header

The name of the header that is the source of error.

string
<= 1024 characters
code

A string containing additional provider specific codes to identify the error context.

string
<= 50 characters
Example
{
"type": "https://docs.headcode.dev/errors/general/rate-limited",
"title": "Too Many Requests",
"status": 429,
"detail": "Rate limit exceeded. Please retry after 30 seconds.",
"code": "HEADCODE.GENERAL.RATE_LIMITED"
}

An unexpected internal error occurred.

Media type application/problem+json
Internal Server Error

An internal error occurred.

object
type
required

A URI reference that identifies the problem type.

string format: uri-reference
Allowed value: https://docs.headcode.dev/errors/general/internal-server-error
title
required

A short, human-readable summary of the problem type.

string
Allowed value: Internal Server Error
status
required

The HTTP status code generated by the origin server for this occurrence.

integer
>= 100 <= 599
Allowed value: 500
detail
required

A human-readable explanation specific to this occurrence of the problem.

string
Allowed value: An internal error occurred.
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri-reference
code
required

An API-specific error code aiding consumers and the provider team understand the error based on the Headcode error taxonomy.

string
<= 100 characters
Allowed value: HEADCODE.GENERAL.INTERNAL_SERVER_ERROR
errors

Optional list of explicit details about the problem for an API consumer.

Array<object>

An object to provide explicit details on a problem towards an API consumer.

object
detail
required

A granular description on the specific error related to a body property, query parameter, path parameter, and/or header.

string
<= 4096 characters
pointer

A JSON Pointer to a specific request body property that is the source of error.

string
<= 1024 characters
parameter

The name of the query or path parameter that is the source of error.

string
<= 1024 characters
header

The name of the header that is the source of error.

string
<= 1024 characters
code

A string containing additional provider specific codes to identify the error context.

string
<= 50 characters
Example
{
"type": "https://docs.headcode.dev/errors/general/internal-server-error",
"title": "Internal Server Error",
"status": 500,
"detail": "An internal error occurred.",
"code": "HEADCODE.GENERAL.INTERNAL_SERVER_ERROR"
}