Get started in 5 minutes
From zero to your first carbon score in three steps.
1
Get your API key
Sign up at the dashboard and create an API key. Free tier gives you 500 calls/month.
Your key looks like: gs_live_abc123def456...
2
Score a product
cURL
curl -X POST https://api.greenscore.dev/v1/score \
-H "Authorization: Bearer gs_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "organic oat milk 1L"}' Python
import requests
resp = requests.post(
"https://api.greenscore.dev/v1/score",
headers={"Authorization": "Bearer gs_live_YOUR_KEY"},
json={"name": "organic oat milk 1L"}
)
data = resp.json()["data"]
print(f"{data['product_name']}: {data['co2e_per_kg']} kg CO2e/kg (Grade {data['eco_grade']})") JavaScript
const resp = await fetch("https://api.greenscore.dev/v1/score", {
method: "POST",
headers: {
"Authorization": "Bearer gs_live_YOUR_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "organic oat milk 1L" }),
});
const { data } = await resp.json();
console.log(`${data.product_name}: ${data.eco_grade} (${data.co2e_per_kg} kg CO2e/kg)`); 3
Use the response
Key fields in the response:
co2e_per_kg — CO2 emissions per kg of product
eco_grade — Letter grade A (best) to E (worst)
confidence — 0-1 score reflecting data quality
data_quality_rating — 1-5 star rating
source_breakdown — Full attribution for every data source consulted
lca_phases — Lifecycle breakdown (agriculture, processing, packaging, transport)
co2e_per_kg_low / high — Uncertainty range across sources
Ready to build?
Check the full API reference for all 10 endpoints, or explore the methodology to understand how scores are calculated.