API Reference
Travel (preview)

Travel ADD-ONADD-ON

⚠️
Preview Feature

This feature is currently in preview. That means that we believe the feature is good enough to start using, but:

  • There might still be bugs or edge cases we haven't covered.
  • The documentation and error messages might be less detailed.
  • We might need to make further changes in the API surface.

We need the ability to iterate quickly on preview versions, so we offer less guarantees of stability. When we make changes to the preview version, we will release a new version, and you must migrate to this new version within one month. Read more about API versioning at Climatiq here.For this reason, preview endpoints are not available without explicitly opting in. If you would like to opt-in to this preview feature, please contact us.

Climatiq provides a comprehensive toolkit to help businesses measure GHG emissions from travel activities. This includes reporting scope 3.6 emissions under the GHG Protocol for travel activities in vehicles owned or operated by third parties, such as aircraft, trains and passenger cars. Emissions associated with hotel stays can also be calculated, providing a comprehensive view of travel-related emissions.

The GHG Protocol outlines three main methods for calculating GHG emissions from your travels:

  • Fuel-based
  • Distance-based
  • Spend-based

Your choice of method will depend on the data you have at hand.

Our endpoints are tailored to handle all possible situations with respect to your data availability. Use our spend-based endpoint if you only have expenditure data available. For enhanced accuracy, the distance-based endpoint offers route-specific estimates, automatic distance calculations, and customization options to improve calculations.

Notes on calculation methods:

  • The Travel feature provides endpoints for distance-based and spend-based approaches where you have distance or spend data.
  • If you have fuel usage data (e.g. liters of petrol), use our Estimate endpoint or Energy feature.
  • To calculate emissions from taxi journeys, use the distance-based method when you have data on the vehicle type and the journey's origin and destination. Alternatively, use the spend-based method if you know the cost of the taxi.

Distance-based method

POST This endpoint allows you to apply the distance-based method by specifying the origin and destination of your journey, and the primary mode of transportation: by air, car, or rail. The journey distance is automatically determined and used for the calculation.

The endpoint will return the CO2e for the primary mode of transportation. If the journey includes separate legs (e.g. travel to / from a railway station or airport) then these need to be calculated separately with additional calls to the API.

https://preview.api.climatiq.io/travel/v1-preview1/distance
Notes
  • The endpoint works for one-way travel for one passenger. If your journey has more legs (e.g. is a return journey / round trip) or passengers, you should make multiple API calls.
  • We do not have full coverage of the global rail network. If data on specific rail segments is missing, we might use car routes for distance calculations instead of rail routes.
  • For air travel, the endpoint will always include a Radiative Forcing (opens in a new tab) (RF) multiplier. It is best practice to include the RF multiplier in most reporting although sometimes (e.g. under the SBTi) it is not accounted for.
  • For electricity-based estimates, such as electric vehicles, the CO2e values returned are location-based, not market-based. Find more details on the different types of electricity-based estimates in our Energy feature.

Request

Request parametersShould be sent as a JSON object in the body

  • travel_moderequired string

    The primary type of travel for this journey. Valid values are: air, car, rail.

  • originrequired object

    The origin of the journey. Accepts QueryLocation, IataCodeLocation, UNLocodeLocation or CoordinateLocation.

  • destinationrequired object

    The destination of the journey. Accepts QueryLocation, IataCodeLocation, UNLocodeLocation or CoordinateLocation.

  • yearinteger

    The year that the travel occurred.

    Default Value
    Latest year available
  • distance_kmfloat

    If you have an actual distance for this leg in kilometers you can input the distance here. Climatiq will then use this distance instead of the planned distance it would normally calculate.

  • car_detailsobject

    Additional details about the car used for the travel. Supplying this will result in more accurate estimations. Can only be used when travel_mode is car.

  • air_detailsobject

    Additional details about the plane used for the travel. Supplying this will result in more accurate estimations. Can only be used when travel_mode is air.

Car Sizes

The car_details object allows you to specify different car types that you can see in the list below. If you don't know the size of the car used for the trip, you can omit the car_size or set it as average, both of which will result in a weighted average of car sizes on the road being used.

Car sizePetrolDieselOthersCar example
smallbelow 1.4-litre enginebelow 1.7-litre engineVehicle models of a similar size (i.e. market segment A or B (opens in a new tab))Fiat 500, Opel Adam, Renault Clio, Ford Fiesta etc.
mediumfrom 1.4-litre to 2.0-litre enginefrom 1.7-litre to 2.0-litre engineVehicle models of a similar size (i.e. generally market segment C)Volkswagen Golf, Honda Civic etc.
largeabove 2-litre engineabove 2-litre engineVehicle models of a similar size (i.e. generally market segment D and above)BMW 3-Series, Volkswagen Passat etc.
curl --request POST \
--url https://preview.api.climatiq.io/travel/v1-preview1/distance \
--header "Authorization: Bearer $CLIMATIQ_API_KEY" \
--data '{
"origin": {
"locode": "DE-HAM"
},
"destination": {
"query": "Berlin"
},
"travel_mode": "car",
"car_details": {
"car_type": "plugin_hybrid"
}
}'

Response

A response consists of the following attributes.

NameDescription
co2eThe total co2e emitted by the journey, expressed in co2e_unit.
co2e_unitAlways kg
distance_kmThe distance in kilometers of the journey using the primary mode of transport (excludes any travel to and from airport or railway stations).
originA ResponseLocation containing the name and an (optional) confidence_score of the location we found, given your origin parameter.
destinationA ResponseLocation containing the name and an (optional) confidence_score of the location we found, given your destination parameter.
direct_emissionsThe emissions associated with the direct emissions of the journey, such as the combustion of fuel or generation of electricity. For air flights, the radiative forcing effect is included in these emissions.
indirect_emissionsThe upstream emissions associated with the journey, such as transmission and distribution losses for electricity, or the extraction and transportation of the fuel (i.e. well-to-tank).
noticesAny notices related to the calculation.
{
"co2e": 45.27,
"co2e_unit": "kg",
"distance_km": 305.8,
"origin": {
"name": "Hamburg",
"latitude": 53.516666666666666,
"longitude": 9.933333333333334,
"confidence_score": null
},
"destination": {
"name": "Berlin, Germany",
"latitude": 52.51604,
"longitude": 13.37691,
"confidence_score": 1
},
"direct_emissions": {
"co2e": 35.03,
"co2e_unit": "kg"
},
"indirect_emissions": {
"co2e": 10.24,
"co2e_unit": "kg"
},
"notices": []
}

Spend-based method

POST This endpoint uses EXIOBASE emission factors to calculate emissions based on your spending on travel activities in any currency. This endpoint automatically takes inflation into account, if the year you spent the money was different than the year of the emission factor. Note that the EXIOBASE spend-based emission factor, used for the road travel is, in fact, an average emission factor for a mix of different types of transport: urban and suburban passenger land transport, taxi operation, other passenger land transport and freight transport by road and can therefore produce results of lower accuracy. Climatiq advises to use fuel-based or distance-based method, where possible.

https://preview.api.climatiq.io/travel/v1-preview1/spend

Request

Request parametersShould be sent as a JSON object in the body

  • spend_typerequired string

    The type of travel associated with the expenditure. Valid values are: air, road, rail, sea, and hotel.

  • moneyrequired float

    The amount of money spent.

  • money_unitrequired string

    The currency in which the money unit is expressed.

  • spend_locationrequired object

    The location where money was spent. Accepts QueryLocation, IataCodeLocation, UNLocodeLocation or CoordinateLocation.

  • spend_yearinteger

    The year in which expenditures occurred.

    Default Value
    Latest year available
curl --request POST \
--url https://preview.api.climatiq.io/travel/v1-preview1/spend \
--header "Authorization: Bearer $CLIMATIQ_API_KEY" \
--data '{
"spend_type": "air",
"money": 100,
"money_unit": "gbp",
"spend_location": {
"locode": "GB-LON"
},
"spend_year": 2018
}'

Response

NameDescription
co2eco2e emitted by the journey, expressed in co2e_unit.
co2e_unitAlways kg
spend_locationA ResponseLocation containing the name and an (optional) confidence_score of the location we found, given your spend_location parameter.
noticesAny notices related to the calculation.
{
"co2e": 135.5,
"co2e_unit": "kg",
"spend_location": {
"name": "London, LND, GB",
"confidence_score": null
},
"notices": []
}

Hotels

POST Use this endpoint to estimate emissions from hotel stays across the world based on the number of nights spent. If no emission factor is available for hotels in the given country, another factor from the same continent is used.

https://preview.api.climatiq.io/travel/v1-preview1/hotel

Request

Request parametersShould be sent as a JSON object in the body
curl --request POST \
--url https://preview.api.climatiq.io/travel/v1-preview1/hotel \
--header "Authorization: Bearer $CLIMATIQ_API_KEY" \
--data '{
"hotel_nights": 5,
"location": {
"query": "San Francisco"
}
}'

Response

NameDescription
co2eco2e emitted by the hotel stay, expressed in co2e_unit.
co2e_unitAlways kg
noticesAny notices related to the calculation.
locationA ResponseLocation containing the name and an (optional) confidence_score of the location we found, given your location parameter.
{
"co2e": 80.5,
"co2e_unit": "kg",
"location": {
"name": "United States",
"confidence_score": 1
},
"notices": []
}

Location

Many of the endpoints accept a location. There are four different ways to input a location.

Query Location

Query Location AttributesRequired
query string
A free text query describing the location, such as "Berlin, Germany", or "10 Downing Street".
optional
country string
The 2-letter ISO-3166 country code (opens in a new tab) for a given location.
optional
postal_code string
The postal (or zip) code for the given location. If used, country or query must also be specified.
optional

All the properties are optional, but you must specify at least a query or a country + postal_code. You may specify all three. Note that not all countries have support for postal codes, and the format might be different from country to country. See this table (opens in a new tab) for details on postal codes.

IATA Code Location

IataLocation AttributesRequired
iata string
An IATA airport code.
required

UN/LOCODE Location

UNLocode Location AttributesRequired
locode string
An UN/LOCODE (opens in a new tab) of the format DE-BER for Berlin. The Locode must contain both country and location.
required

Coordinate Location

Coordinate Location AttributesRequired
longitude float
The longitude of the coordinate.
required
latitude float
The latitude of the coordinate.
required
country string
The 2-letter country code for the country that this coordinate is located within.
required

Response Location

The location that is returned to you in the API response will contain the following properties

Response Location attributes
name string
A human-readable name of the location.
latitude string or null
The latitude of the location. This is only returned if you have access to view coordinates. Please contact us if you need this enabled.
longitude string or null
The longitude of the location. This is only returned if you have access to view coordinates. Please contact us if you need this enabled.
confidence_score float
A confidence score between 0 and 1, determining how certain we are that the location matches your query. Only exists if the input location was a QueryLocation.

Notices

The notices array can contain these objects:

Notice attributes
severity string
Either warning or info. warning is for messages that might lead to inaccurate calculations. You should check these to make sure the results are fit for your intended purpose. info is for information that will help you understand the calculation result better.
message string
An explanation of the notice.
code string
A programmatic value you can use to disambiguate the different notice types.

The different possible values for code are as follows. You should not treat this list as exhaustive as more values may be added with time:

Notice code valuedescription
partial_inflation_adjustmentInflation adjustment was applied only partially, not covering the entire period.
no_inflation_adjustmentNo inflation adjustment was made to the procurement. This could be because there is no data for the spend_country or inflation data is missing for the entire period.
location_fallbackFactors or calculation methods for the exact location are not available, we have used a fallback location which we believe best covers the specified location.
routing_fallbackIt was not possible to find a route given the current parameters. A different routing mechanism was used instead.