Calculate emissions
Make requests to calculate travel emissions using the Emissions API or Batch Emissions API.
Introduction
This guide will help you make requests to the Thrust Carbon API in order to calculate emissions for a travel journey.
Authenticate your request
You will need an API key to make any requests to Thrust Carbon. These are available within your Thrust Carbon account at https://app.thrustcarbon.com
Please see our Authentication Guide to understand more about authenticating requests.
Choose an API
Thrust Carbon have three APIs for getting an API emission calculation:
- Emissions API - will return a calculation for a single journey
- Batch Emissions API - will return results for up to 100 journeys
- Saved emissions API (Thrust Calculator) - this is not in the scope of this article. If you would like to save calculations into the Thrust Calculator, please visit the getting started article.
Please note, there is no difference between the emissions API and batch emissions API in terms of how we calculate emissions. The batch emissions may be used to reduce calculation time and perform concurrent calculations (there is no financial saving to batching requests).
For a full comparison of when to use the Emissions API versus the Thrust Calculator, including free versus paid account behaviour, see Emissions API vs. the Thrust Calculator.
Pass in one or more segment requests
Each API requires one or more segments to be provided for the journey(s). You can find a full list of supported segment requests in the left-hand menu. These are some of the most popular:
- Segment request air (i.e. flight)
- Segment request hotel
- Segment request car rental
- Segment request rail (i.e. train)
- Segment request meal
Location fields use country_code, not country
Any segment type that accepts a location object expects the field country_code, not country. Unknown fields are silently ignored rather than rejected, so a request with country instead of country_code will still succeed — it just falls back to a generic factor and quietly returns a different emissions figure.
Consume the response
Your response will contain - at a minimum - the following fields:
- Tonnes of carbon emitted. This is in metric tonnes which is the worldwide standard for reporting CO2e.
- Equivalencies. These are human ready explanations of an emission (e.g. "This emission is equivalent to 3 mature oak trees").
Depending on the emission, there may also be other pieces of advanced information available. For example, for hotel requests we also provide our Hotel Sustainability Index and information about nearby EV chargers.
Advanced usage
Once you have made your first requests, you should look to some of our advanced usage guides:
- Learn how to get comparison calculations of emissions (e.g. find out the average emission for all flights on a requested route)
- Use our Hotel Sustainability Index or Hotel Certification data to enrich your hotel results.
- Customise and personalise the requests & results from Thrust Carbon so they align better to your customers' brands & values.