Compare Carbon Usage

POST
/v2/carbon-comparison

This endpoint allows you to compare carbon quantities to more recognizable items such as cars, light bulbs, or kettles. Our list of metrics and comparison units are quite extensive so a list of accepted combinations has been compiled and is available here

Authorization

Bearer-Auth
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
carbon_quantity*integer
Range1 <= value
carbon_unit*Carbon Unit

SQUAKE uses The International System of Units (SI), commonly referred to as "metric system".

Value in"tonne""kilogram""gram"
items*array<>

You can define one or more metrics you want to compare your carbon quantity to.

Response Body

OK

application/json
  1. response
carbon_quantity*integer
carbon_unit*Carbon Unit

SQUAKE uses The International System of Units (SI), commonly referred to as "metric system".

Value in"tonne""kilogram""gram"
items*array<>
Example Request
curl -X POST 'https://api.sandbox.squake.earth/v2/carbon-comparison' \  -H 'Content-Type: application/json' \  -d '{  "carbon_quantity": 2000,  "carbon_unit": "tonne",  "items": [    {      "metric": "annual_usage"    }  ]}'
Example Response
{  "carbon_quantity": 5000,  "carbon_unit": "tonne",  "items": [    {      "comparison_unit": "cars",      "metric": "annual_usage",      "amount": 0.1    }  ]}