CO2 Offset API

⭐ Beginner's Pick Environment / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

CO2 Offset API calculates and validates the carbon footprint of electricity consumption using the Sustainable Scope 2 framework. It is free to use with no API key required, making it accessible for developers exploring carbon accounting in energy apps. Simply provide a zip code and energy usage to receive CO2 emission estimates.

💡

Beginner Tip

No authentication is needed — just call the endpoint with a German postal code and energy amount in kWh to get a CO2 calculation instantly. This API is best suited for electricity-related carbon footprint calculations in Germany.

Available Data

vehicle make and model
year and specifications
fuel economy
VIN decode data

Example Response

JSON Response
{
  "make": "Toyota",
  "model": "Camry",
  "year": 2025,
  "engine": "2.5L 4-cylinder",
  "fuel_economy": {
    "city_mpg": 28,
    "highway_mpg": 39
  },
  "msrp": 28400
}

Field Reference

co2eq CO2-equivalent grams emitted for the specified energy consumption
zip The postal code used for the regional grid mix calculation
kwh The energy amount in kilowatt-hours that was used for the calculation
gsi GrünstromIndex value indicating the percentage of green energy in the local grid at calculation time

Implementation Example

const url = "https://co2offset.io/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Empty or null response The postal code provided does not exist in the German grid data
Use a valid German 5-digit postal code; the API currently only covers Germany
400 Bad Request Missing required query parameters such as zip or kwh
Ensure both "zip" (German postal code) and "kwh" (energy amount) parameters are included in the request URL
Unexpected 0 CO2 value The region may have 100% renewable energy at that moment
This is valid — the API reflects real-time grid mix; try different times of day to see varying CO2 values

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 445ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Environment
Difficulty Beginner
Verified: 2026-04-07

Similar APIs

View All →