trainline.journey.search
View connectorSearch Trainline rail journeys
POST /v1/operations/trainline.journey.searchHeaders
Authorization: Bearer YOUR_CONNECTOR_TOKEN
Content-Type: application/jsonInputs
| Parameter | Example type | Example value |
|---|---|---|
| origin_id | string | "urn:trainline:generic:loc:EUS1444gb" |
| destination_id | string | "urn:trainline:generic:loc:MAN2968gb" |
| journey_type | string | "single" |
| outward_at | string | "2026-10-01T09:00:00" |
| passengers | array | [{"date_of_birth":"1990-01-01"}] |
Example input
{
"origin_id": "urn:trainline:generic:loc:EUS1444gb",
"destination_id": "urn:trainline:generic:loc:MAN2968gb",
"journey_type": "single",
"outward_at": "2026-10-01T09:00:00",
"passengers": [
{
"date_of_birth": "1990-01-01"
}
]
}Input schema
{
"$id": "https://useajar.com/schemas/trainline/journey-search.input.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"currency": {
"description": "Requested pricing currency. Defaults to GBP.",
"enum": [
"GBP",
"EUR",
"USD"
]
},
"destination_id": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"inward_at": {
"oneOf": [
{
"const": "now"
},
{
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$",
"type": "string"
}
]
},
"journey_type": {
"enum": [
"single",
"return",
"open_return"
]
},
"origin_id": {
"maxLength": 256,
"minLength": 1,
"type": "string"
},
"outward_at": {
"oneOf": [
{
"const": "now"
},
{
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$",
"type": "string"
}
]
},
"passengers": {
"items": {
"additionalProperties": false,
"properties": {
"date_of_birth": {
"format": "date",
"type": "string"
}
},
"required": [
"date_of_birth"
],
"type": "object"
},
"maxItems": 8,
"minItems": 1,
"type": "array"
},
"railcard_code": {
"const": "urn:trainline:atoc:card:TST"
}
},
"required": [
"origin_id",
"destination_id",
"journey_type",
"outward_at",
"passengers"
],
"title": "Trainline journey-search input",
"type": "object"
}