Train: GREEN-TRAVEL-DATA πŸ‡¬πŸ‡§

Calculate GB National Rail journey emissions with the Rail Delivery Group's Green Travel Data figures, using the release whose timetable covers the departure date.

type trainmethodology GREEN-TRAVEL-DATAGreen Travel Data 2.0 and 3.1Supports audit mode

Use "methodology": "GREEN-TRAVEL-DATA" for the Rail Delivery Group's Green Travel Data (GTD), formerly Green Travel Pledge. The former name GREEN-TRAVEL-PLEDGE is still accepted and calculates the same way.

Overview

Green Travel Data is the GB rail industry's figure for the emissions of a National Rail journey: kilograms of COβ‚‚e per passenger for the whole journey between two stations. It comes for first class, for standard class, and for all passengers together. The Rail Delivery Group (RDG) calculates it from the planned timetable, the traction and length of each train, and forecast passenger numbers. RDG publishes it for each timetable period (a release). From the timetable starting 14 December 2025, a release covers every pair of National Rail stations, whether the journey is direct or has changes. The earlier releases covered direct journeys only.

SQUAKE keeps every release and calculates each journey with the figures of its own timetable.

Sample requests

Send a quote before booking, then repeat the call with audit set to true once the booking is final.

{
  "expand": ["items"],
  "items": [{
    "type": "train",
    "methodology": "GREEN-TRAVEL-DATA",
    "external_reference": "test_1",
    "origin": "KGX",
    "destination": "EDB",
    "number_of_travelers": 2,
    "seat_type": "second_class",
    "departure_date": "2026-03-01"
  }]
}

audit_for is optional

Pass the ID of an auditable entity when you calculate on behalf of that entity. Otherwise, leave it out.

Request fields

typestringrequired

train

methodologystringrequired

GREEN-TRAVEL-DATA. GREEN-TRAVEL-PLEDGE is accepted as the former name.

originstringrequired

The CRS code of a GB National Rail station, for example KGX for London Kings Cross. SQUAKE doesn't resolve station names, UN/LOCODEs, addresses or coordinates for this methodology.

destinationstringrequired

The CRS code of a GB National Rail station, for example EDB for Edinburgh. Same rules as origin.

seat_typeenum

first_class, second_class or average. Defaults to first_class. See Seat types.

departure_datestring

ISO date YYYY-MM-DD. It picks the release whose timetable covers the date. When no release covers it (before the first release, between two releases, or after the latest one), the latest release is used. Defaults to today.

number_of_travelersinteger

Minimum 1. Defaults to 1.

distance_in_kmnumber

Only used to calculate when the release has no figure for the station pair, see Calculation. When sent, it's also the distance in the response; without it, the response has no distance.

external_referencestring

Correlates request and response, up to 128 characters.

auditboolean

Set to true to create immutable audit records for finalised calculations. Must be enabled for your account.

See every field of POST /v2/calculations in the API reference

Seat types

seat_typeGreen Travel Data figureWhen the release has no such figure for the pair
first_classFirst classStandard class, then all passengers
second_classStandard classAll passengers
averageAll passengersβ€”

The releases before 14 December 2025 have no first-class figure on routes without first class.

Calculation

Journey figure

SQUAKE takes the kilograms of COβ‚‚e per passenger for the station pair and seat type, in the release picked by departure_date, and multiplies by number_of_travelers.

Journey emissions (grams)kg per passenger Γ— travellers Γ— 1000
kg per passenger
Kilograms of COβ‚‚e per passenger for the station pair and seat type, in the release picked by departure_date.
Travellers
number_of_travelers from the request.

When the release has no figure for the pair

This happens for a station the release doesn't list or, in the releases before 14 December 2025, a journey with changes. SQUAKE then uses RDG's GB-wide figure per passenger-kilometre for the seat type, which RDG publishes for journeys that have no station-to-station figure, and multiplies it by distance_in_km.

Fallback emissions (grams)kg per passenger-km Γ— distance Γ— travellers Γ— 1000
kg per passenger-km
RDG's GB-wide figure per passenger-kilometre for the seat type.
Distance
distance_in_km from the request.
Travellers
number_of_travelers from the request.

distance_in_km is needed for the fallback

Without distance_in_km the calculation fails with green_travel_data_emission_not_found. A calculation made this way carries "figure": "passenger_km" and, in audits, "fallback_data_used": true.

Sample response

200 OKapplication/json
{
  "carbon_quantity": 27581,
  "carbon_unit": "gram",
  "items": [{
    "carbon_quantity": 27581,
    "carbon_unit": "gram",
    "external_reference": "test_1",
    "type": "train",
    "methodology": "GREEN-TRAVEL-DATA",
    "methodology_version": "3.1",
    "algorithm_specifics": {
      "timetable_start": "2025-12-14",
      "timetable_end": "2026-05-16",
      "timetable_covers_departure_date": true,
      "figure": "journey",
      "seat_type_used": "second_class"
    }
  }]
}

algorithm_specifics names the release used (timetable_start, timetable_end, and whether its timetable covers the departure date), whether the figure is the journey's or the per-passenger-kilometre one (figure), and the seat type whose figure the calculation uses (seat_type_used).

methodology_version is the Green Travel Data version of that release: 2.0 for timetables before 14 December 2025 and 3.1 from then on. Audits record the same version.

Audit mode

The audit's emission factors record co2_per_passenger_grams (the journey's grams per passenger), fallback_data_used, and, for a per-passenger-kilometre figure, co2_per_km_grams.

Errors

CodeWhen
green_travel_data_emission_not_foundorigin or destination isn't a CRS code of a GB National Rail station, or the release has no figure for the pair and no GB-wide figure can stand in (no distance_in_km, or no per-passenger-kilometre figure in the release).
invalid_date_formatdeparture_date isn't a YYYY-MM-DD date.
invalid_paramsseat_type isn't one of the three seat types, or distance_in_km isn't a positive number.
request_failedGreen Travel Data is temporarily unavailable. Retry later.

Bibliography

Rail Delivery Group: Sustainability and Green Travel Data.

On this page

POST/v2/calculations

Run this request against the sandbox with your test key.

Open in API reference