Entur Developer
Open
REST
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 capacity 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. The API does not offer a plane if a stop is 50 km or more from the nearest supported airport, if the first and the last stop are less than 50 km apart, or if all the stops are near the same airport and no other. The API does not offer an electrical bus on a road route that is longer than 350 km. If the API cannot find the road route, the straight line between the first and the last stop decides. The API examines these rules only for a route with stop IDs. 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 | null · 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, or send null, 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
​TransportModeCalculationFailure[] · required
​ResponseMetadata · required

Information about the response as a whole.


Did you find what you were looking for?