GoClimateNeutral API Reference
The GoClimateNeutral API is organized around REST. It has
resource-oriented URLs, accepts form-encoded request bodies, returns
JSON-encoded responses, and uses standard HTTP response codes,
authentication, and verbs.
The GoClimateNeutral API uses IATA-airport codes of a route to calculate the
CO2-emissions. You can read more about how the
calculation is done here.
The GoClimateNeutral API uses API keys to authenticate requests. Get your API
key by contacting us.
Authentication to the API is performed via HTTP Basic Auth.
Provide your API key as the basic auth username value and leave the password
empty. Authentication is required for all endpoints.
GoClimateNeutral uses conventional HTTP status codes to indicate the success or
failure of API requests.
Summary of HTTP status codes used by the GoClimateNeutral API:
- 200 OK: Request was successful.
- 404 Not Found: The requested resource could not be found.
- 401 Unauthorized: API key provided was not valid.
- 500, 502, 503, 504: Server errors on the GoClimateNeutral side. Only used
in exceptional circumstances.
Calculates estimated footprint per passenger for flights.
Retrieving flight footprint
Retrieve estimated footprint for one flight. If you need to calculate footprint
for a trip with multiple legs, retrieve the estimated footprint for each leg
and sum estimated footprint for each to create a total for the full trip.
- Segments of the flight itenireary. For each parameter below, replace n with a unique identifier for each segment of the trip. These parameters are repeated for each segment.
- segments[n][origin]: Origin airport IATA code.
- segments[n][destination]: Destination airport IATA code.
- (DEPRECATED) segments[n][flight]: Flight designator code.
- (DEPRECATED) segments[n][duration]: Flight duration. In seconds.
- (DEPRECATED) segments[n][departure_date]: Departure date. ISO 8601 date formatted.
- cabin_class: Cabin class. One of
- currencies: Desired currencies for offset pricing. One of
NOK. You can request multiple currencies by including multiple items in the currencies array. You may also use an identifier for every currency (i.e
- (DEPRECATED) flight: Flight designator code.
- (DEPRECATED) origin: Origin airport IATA code.
- (DEPRECATED) destination: Destination airport IATA code.
- (DEPRECATED) duration: Flight duration. In seconds.
- (DEPRECATED) departure_date: Departure date. ISO 8601 date formatted.
- footprint: Estimated footprint per passenger. In kgs CO2e. Current
precision is 100 kg. We recommend displaying this number in tonnes CO2e to the
- offset_prices: Array of objects representing prices per passenger for
offsetting this flight through GoClimateNeutral. One object per currency
Currently returns non-final prices in SEK.
- amount: Amount. In smallest denomination of currency indicated by
currency (e.g. 1000 for 10.00 EUR).
- currency: ISO 4217 currency code for amount specified by amount.
- details_url: URL to a page where the user can offset the flight.
- invalid_request_error - HTTP status 400: Request parameters are missing
or not valid.
- calculation_unsuccessful - HTTP status 404: We are currently not able to
calculate an estimated footprint based on the given parameters. This is not a
permanent state as we continuously work to improve coverage, although
immediate retries are not likely to produce a different result.
$ curl https://api.goclimateneutral.org/v1/flight_footprint \
-u YOUR_API_KEY: \
-d 'segments[flight]=VY1266' \
-d 'segments[origin]=ARN' \
-d 'segments[destination]=BCN' \
-d 'segments[flight]=VY1265' \
-d 'segments[origin]=BCN' \
-d 'segments[destination]=ARN' \
-d 'cabin_class=economy' \
-d 'currencies=SEK' \