Website Carbon Calculator API - Measure Any Website's Carbon Footprint
Calculate the carbon emissions of any web page with a single API call. Our Website Carbon Calculator API uses the Sustainable Web Design Model V4 to estimate CO₂ per page view, check green hosting status, and assign a carbon rating from A+ to F.
Build website carbon calculators, sustainability dashboards, green web badges, or automated carbon auditing tools. The API analyzes any public URL, computes emissions based on page weight and hosting energy source, and returns detailed statistics including grid vs. renewable energy comparisons.
How it works
When you submit a URL to the API, the following happens:
- Page analysis — The page is loaded and analyzed to measure the total data transfer size (HTML, CSS, JavaScript, images, fonts, and third-party resources).
- Green hosting check — The domain is checked against the Green Web Foundation directory to determine if the hosting uses renewable energy.
- Carbon calculation — Using V4 of the Sustainable Web Design Model, the API computes CO₂ emissions per page view across data centers, networks, user devices, and embodied (manufacturing) emissions.
- Rating — The page is assigned a letter grade (A+ through F) based on how it compares to other websites globally.
Results are cached for 7 days. Subsequent requests for the same URL return the cached result instantly unless recalculate=true is passed.
Calculate website carbon
This endpoint calculates the carbon emissions for a given website URL. Pass any public URL and receive a detailed carbon report including CO₂ per page view, carbon rating, green hosting status, and energy statistics.
This endpoint counts as 2 API calls per request. First-time analysis may take up to 30 seconds — cached results return instantly. Sandbox keys (test_ prefix) return a mock response.
Required query parameters
- Name
url- Type
- string
- Description
The website URL to analyze. Can be a bare domain (e.g.,
example.com), a subdomain (e.g.,docs.example.com), or a full URL with path (e.g.,https://example.com/page). Redirects are followed automatically. Must be a valid, publicly accessible URL. Maximum 2048 characters.
Optional query parameters
- Name
recalculate- Type
- boolean
- Description
Set to
trueto bypass the 7-day cache and force a fresh analysis. The new result will replace the cached value. Defaults tofalse.
Response attributes
- Name
url- Type
- string
- Description
The normalized URL that was analyzed (lowercase, no protocol, no trailing slash). If the site redirects, this reflects the final destination URL.
- Name
cleaner_than- Type
- float
- Description
A value between 0.0 and 1.0 representing the percentage of websites this page is cleaner than. For example,
0.91means cleaner than 91% of all web pages tested. Interpolated within rating bands for granular accuracy.
- Name
rating- Type
- string
- Description
The carbon rating grade:
A+,A,B,C,D,E, orF. Based on CO₂ per page view thresholds from the Digital Carbon Ratings standard.Rating Max CO₂/view Description A+ 0.040g Exceptional A 0.079g Excellent B 0.145g Good C 0.209g Average D 0.278g Below average E 0.359g Poor F >0.359g Very poor
- Name
green_hosting- Type
- boolean
- Description
Whether the website's hosting provider uses renewable energy, as verified by the Green Web Foundation directory.
- Name
statistics- Type
- object
- Description
Detailed carbon and energy statistics for the page.
- Name
statistics.transfer_size- Type
- integer
- Description
The total data transfer size of the page in bytes (includes all resources: HTML, CSS, JS, images, fonts, etc.).
- Name
statistics.energy- Type
- float
- Description
Energy consumed per page view in kilowatt-hours (kWh). Calculated across data centers, networks, user devices, and embodied energy using the SWDM V4 intensity of 0.30 kWh/GB.
- Name
statistics.co2- Type
- object
- Description
CO₂ emissions in grams, shown for both standard grid energy and renewable energy scenarios.
- Name
statistics.co2.grid.grams- Type
- float
- Description
Grams of CO₂ per page view assuming the hosting uses standard grid energy (global average: 494 gCO2e/kWh).
- Name
statistics.co2.renewable.grams- Type
- float
- Description
Grams of CO₂ per page view assuming the hosting uses renewable energy (33.4 gCO2e/kWh for the data center portion).
- Name
tested_on- Type
- string
- Description
The date the page was analyzed, in
YYYY-MM-DDformat. Results are cached for 7 days from this date.
Request
curl --location 'https://api.1clickimpact.com/v1/carbon?url=example.com' \
--header 'x-api-key: {PRODUCTION API KEY}'
Response
{
"url": "example.com",
"cleaner_than": 0.91,
"rating": "A",
"green_hosting": false,
"statistics": {
"transfer_size": 495573,
"energy": 0.000139,
"co2": {
"grid": {
"grams": 0.068
},
"renewable": {
"grams": 0.057
}
}
},
"tested_on": "2026-04-20"
}
Force recalculation
curl --location 'https://api.1clickimpact.com/v1/carbon?url=example.com&recalculate=true' \
--header 'x-api-key: {PRODUCTION API KEY}'
Sandbox response
{
"url": "example.com",
"cleaner_than": 0.65,
"rating": "C",
"green_hosting": false,
"statistics": {
"transfer_size": 1450000,
"energy": 0.000405,
"co2": {
"grid": {
"grams": 0.21
},
"renewable": {
"grams": 0.196
}
}
},
"tested_on": "2026-04-20"
}
Methodology
The Website Carbon Calculator API uses V4 of the Sustainable Web Design Model (SWDM), the industry-standard open methodology for estimating digital carbon emissions. V4 was released in July 2025 with updated datasets reflecting more accurate internet energy consumption data.
Energy intensity (V4)
| Segment | Operational (kWh/GB) | Embodied (kWh/GB) | Total (kWh/GB) |
|---|---|---|---|
| Data centers | 0.055 | 0.012 | 0.067 |
| Networks | 0.059 | 0.013 | 0.072 |
| User devices | 0.080 | 0.081 | 0.161 |
| Total | 0.194 | 0.106 | 0.300 |
Carbon intensity
- Global average grid intensity: 494 gCO2e/kWh (source: Ember's Data Explorer)
- Renewable energy intensity: 33.4 gCO2e/kWh (applied to data center portion when green hosting is detected)
Calculation
CO₂ per page view = (transferSize / 1,073,741,824) × 0.30 kWh/GB × 494 gCO2e/kWh
When green hosting is detected, the data center portion (0.055 kWh/GB) uses the renewable intensity (33.4 gCO2e/kWh) instead of the global average, reducing total emissions.

