Updated 5 May 2025
Welcome to ScopeGreen, the sustainability-focused API of Scope4! This guide walks you through retrieving environmental Life‑Cycle‑Assessment (LCA) metrics via our REST API.
ScopeGreen gives developers, researchers and sustainability professionals programmatic access to high‑quality environmental‑impact data for thousands of materials and products.
Key capabilities
mode=pro
will be accepted but internally treated as lite; full pro accuracy will be released soon.unit=
; supports mass, volume, area, energy, distance, time & combinations. See the Unit Conversion docs.Every request needs an API key in the Authorization
header.
curl --request GET \
--url "[https://scopegreen-main-1a948ab.d2.zuplo.dev/api/metrics](https://scopegreen-main-1a948ab.d2.zuplo.dev/api/metrics)" \
--header "Authorization: Bearer YOUR_API_KEY"
How to obtain a key
Need help? → tommaso@scope4.dev
Let’s retrieve the carbon footprint for a cotton T‑shirt.
curl --request GET \
--url "[https://scopegreen-main-1a948ab.d2.zuplo.dev/api/metrics/search?item_name=cotton](https://scopegreen-main-1a948ab.d2.zuplo.dev/api/metrics/search?item_name=cotton)" \
--header "Authorization: Bearer YOUR_API_KEY"
{
"matches": [
{
"rank": 1,
"matched_name": "Cotton",
"metric": {
"name": "Carbon footprint",
"value": 1.314,
"unit": "kg CO2 eq / kg"
},
"year": 2025,
"geography": "USA",
"source": "IDEMAT 2025RevA",
"source_link": "[https://www.ecocostsvalue.com/data-tools-books/](https://www.ecocostsvalue.com/data-tools-books/)",
"conversion_info": "Unit conversion not requested."
}
],
"explanation": "The best match is 'Cotton USA' as it directly refers to cotton without specifying any particular processing or blend. It provides the requested carbon footprint metric."
}
/api/metrics/search
Method GET /api/metrics/search
Parameter | Type | Required | Notes |
---|---|---|---|
item_name | string | âś“ | Max 100 chars |
metric | string | Default Carbon footprint | |
year | string | ≥ 2020. Default empty | |
geography | string | Max 50 chars. Default empty | |
num_matches | int (1‑3) | Default 1 | |
unit | string | Functional‑unit conversion. Default empty; see the Unit Conversion docs | |
mode | string | lite (current) · pro (alias for lite ⚠️) | |
domain | string | Filter domain category. Default: Materials & Products | |
not_english | bool | true → auto‑translate item_name . Default false | |
web_mode | bool | Disabled – will be false for now |
If nothing suitable is found:
{ "message": "No good match was found, retry with a different item name" }
unit=
; supports mass, volume, area, energy, distance, time & combinations.429 Too Many Requests
; exponential back‑off recommended.Python
import requests
api_key = "YOUR_API_KEY"
url = "[https://scopegreen-main-1a948ab.d2.zuplo.dev/api/metrics/search](https://scopegreen-main-1a948ab.d2.zuplo.dev/api/metrics/search)"
params = {
"item_name": "cotton t-shirt",
"metric": "Carbon footprint",
"mode": "lite", # pro maps to lite until pro is launched
"unit": "g" # convert functional unit to grams
}
headers = {"Authorization": f"Bearer {api_key}"}
resp = requests.get(url, headers=headers, params=params)
print(resp.json())
JavaScript
async function searchScopeGreen() {
const apiKey = 'YOUR_API_KEY';
const params = new URLSearchParams({
item_name: 'cotton t-shirt',
metric: 'Carbon footprint',
mode: 'lite', // pro currently behaves as lite
unit: 'g'
});
const url = `https://scopegreen-main-1a948ab.d2.zuplo.dev/api/metrics/search?${params}`;
try {
const res = await fetch(url, {
method: 'GET',
headers: { Authorization: `Bearer ${apiKey}` }
});
const data = await res.json();
console.log(data);
} catch (error) {
console.error("Error fetching data:", error);
}
}
searchScopeGreen();
Want to try the API live without writing code from scratch? We've prepared an interactive Google Colab notebook that guides you through making requests and exploring parameters.
Click here to open the Interactive Tutorial in Google Colab
You'll need your API key to run the examples.
item_name
(e.g. “cold‑rolled low‑carbon steel sheet”).domain
and year
when possible.Questions, ideas or issues → tommaso@scope4.dev