Entur Developer
Emissions Calculator

Emissions

Server

CO2e emission calculations


Calculate the CO2e emission of a route for each transport mode

POST
https://api.entur.io/emissions-calculator-api/api
/v1/calculate-emissions

Each emission is in grams of CO2e and is for all passengers (numberOfPassengers) together. The calculation is different for each group of transport modes:

  • Train, plane, bus, metro, tram and ferry: the emission of one vehicle, divided by its number of seats and multiplied by the number of passengers.
  • Car and motorcycle: the emission of all the vehicles that are necessary for the passengers.
  • Bike, electrical bike and electrical scooter: the distance multiplied by a fixed factor from SINTEF for each passenger kilometre, and by the number of passengers.

Usually, the response has one calculation for each transport mode in the request. But calculations can have fewer items than transportModes, for two causes:

  • Some transport modes cannot travel the route. An example is a plane between two places that have no airport near them. The response does not include these transport modes. It includes a warning instead.
  • If the calculation fails for a transport mode, the response shows the transport mode in failures. The response still includes the other transport modes.

Calculate the CO2e emission of a route for each transport mode › Headers

ET-Client-Name
​string · style: simple

Entur Client Header. It is required that all consumers identify themselves by using this header. Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers. The structure of ET-Client-Name should be: <company>-<application>.

X-Correlation-Id
​string · style: simple

Correlation id

Calculate the CO2e emission of a route for each transport mode › Request Body

transportModes
​TransportMode[] · minItems: 1 · required
Enum values:
TRAIN
ELECTRICAL_CAR
DIESEL_CAR
MOTORCYCLE
PLANE
ELECTRICAL_BUS
DIESEL_BUS
METRO
​Route · required

The route of the trip, as waypoints or as stop IDs. A stop ID can identify a stop place, a quay or a group of stop places.

If the route has waypoints, the API uses only the waypoints and ignores the stop IDs. Then the route must have two or more waypoints, and each waypoint must have x and y. If the route has no waypoints, the API uses the stop IDs. Then the route must have two or more stop IDs.

numberOfPassengers
​integer · int32 · min: 1 · required
distanceKm
​number · double

The distance of the trip in kilometres. The API uses this distance for bike, electrical bike and electrical scooter. If you do not send it, the API calculates the distance along the roads.

Calculate the CO2e emission of a route for each transport mode › Responses

The CO2e emission for each transport mode

​TransportModeCalculation[] · required
warnings
​string[] · required
Enum values:
UNSUPPORTED_TRANSPORT_MODES_OMITTED_FROM_CALCULATIONS
​TransportModeCalculationFailure[] · required

Did you find what you were looking for?