Quickstart
Go from credentials to your first calculated emission in one page.
This page gets you from nothing to a calculated emission in five steps. It does not explain the product catalogue — for that, see Emissions API vs. the Thrust Calculator and the integration flows linked at the end of this page.
Get credentials
Log in to the Thrust Calculator, then go to Account (top right corner) > Organisation settings > API Keys > Add API Key.
Authenticate
Set the Authorization header to Bearer {your-api-key} on every request. See
Authentication for expiry and refresh details.
Export your key as an environment variable rather than pasting it into requests:
export THRUST_API_TOKEN="your-api-key"Make one call
This example calculates the emissions for a single economy flight from London Heathrow to New York JFK. It uses staging, because a first integration call almost always goes there rather than production — see the environments table below.
curl -X POST https://staging.thrustcarbon.com/api/2/emission \
-H "Authorization: Bearer $THRUST_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"segments": [{
"type": "air",
"passengers": 1,
"travel_class": "economy",
"carrier": "BA",
"aircraft_type": "788",
"flight_number": "BA 112",
"emitted_at": "2021-01-09",
"origin": { "iata": "LHR" },
"destination": { "iata": "JFK" }
}]
}'This is a real, verified response, abridged for length:
{
"tonnes_of_emissions": 0.6758637480765256,
"distance": 5539.56,
"methodology_applied": "icao_plus",
"invalid_segments": {},
"equivalencies": [
{
"type": "tree-seedling",
"values": ["This is the carbon captured by 65 tree seedlings in their first 10 years."],
"amount": 65,
"unit": "tree seedlings"
}
],
"audit": {
"Equipment type": "788",
"Load factor": "#2957 (international)",
"Radiative forcing factor": "1.89",
"Calculated distance": "5539.5584318188 km"
}
}Read the response
tonnes_of_emissions— the result, in tonnes of CO₂e. Here,0.6758637480765256.distance— the great-circle distance used in the calculation, in kilometres.methodology_applied— the calculation methodology actually used. Always check this field; the API does not error on an unavailable or misplaced methodology request, it silently falls back to a default (see the warning below).audit— the calculation trace: the inputs and intermediate values (equipment type, load factor, radiative forcing factor, calculated distance, and more) that produced the figure. The full object has ten keys and varies by segment type. Use it to check why a figure came out the way it did.
Unknown fields are silently ignored
The API does not reject fields it does not recognise. A misspelled or misplaced field is not an error — it is dropped, and the calculation proceeds as if you had not sent it, often producing a different number with no indication anything was wrong.
Two confirmed examples:
methodology_requestedmust be placed inside a segment object, not at the top level of the request body. At the top level it is ignored and the default methodology is applied. See Multi-methodology support.- A location's country field is
country_code, notcountry. Sendingcountryis ignored and the calculation falls back to a generic factor.
Always check methodology_applied (and any other "which option was actually used" field) in the
response, rather than assuming the request you sent was understood.
Where to go next
The call above uses the Emissions API directly. Depending on what you are building, one of these flows is a better starting point:
Environments
| Environment | Base URL |
|---|---|
| Production | https://api.thrustcarbon.com/2 |
| Staging | https://staging.thrustcarbon.com/api/2 |
Note the different path shape: production uses /2, staging uses /api/2. See
Endpoints for routing and response time details.