Public APIs
Website Carbon favicon

Website Carbon

Environment

API to estimate the carbon footprint of loading web pages.

Website Carbon's website screenshot

About Website Carbon

Website Carbon Calculator API is a REST API that measures the carbon emissions of any public web page. It accepts a URL via a GET request to the /v1/carbon endpoint and returns the page's transfer size, energy consumption, CO2 emissions in grams (calculated for both standard grid and renewable energy scenarios), a percentile ranking against other tested web pages, and a letter carbon rating from A+ to F.

The API works by loading and measuring the total data transfer size of a page (HTML, CSS, JavaScript, images, fonts, and third-party resources), checking the domain against the Green Web Foundation directory for renewable hosting status, and computing emissions using Version 4 of the Sustainable Web Design Model. Results are cached for 7 days per URL, with an optional parameter to force a fresh recalculation. First-time analysis of a page can take up to 30 seconds, while cached results return instantly.

It is intended for developers building website carbon calculators, sustainability dashboards, green web badges, or automated carbon auditing tools. Sandbox API keys return mock responses for testing, and each call to the endpoint counts as 2 API calls.

Key features

  • Calculates CO2 emissions per page view for any public URL using Sustainable Web Design Model V4
  • Checks green hosting status via the Green Web Foundation directory
  • Assigns a letter carbon rating from A+ to F based on CO2 per page view thresholds
  • Returns detailed statistics including transfer size, energy use, and grid vs. renewable CO2 comparisons
  • Caches results for 7 days with an optional recalculate parameter to force a fresh analysis

Frequently asked questions

What does the Website Carbon API return?

It returns the normalized URL, a cleaner-than percentile, a letter rating (A+ to F), green hosting status, detailed transfer size/energy/CO2 statistics, and the test date.

How is the carbon calculation performed?

It uses V4 of the Sustainable Web Design Model, computing CO2 per page view from page transfer size, an energy intensity of 0.30 kWh/GB, and a global average grid intensity of 494 gCO2e/kWh.

How long are results cached?

Results are cached for 7 days per URL, and passing recalculate=true bypasses the cache to force a fresh analysis.

How many API calls does a request use?

Each call to the GET /v1/carbon endpoint counts as 2 API calls, and first-time analysis of a URL may take up to 30 seconds while cached results return instantly.

Can I test the API without a production key?

Yes, sandbox keys using the test_ prefix return a mock response.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product