Website Carbon

Website Carbon

Environment

API to estimate the carbon footprint of loading web pages

Visit API

πŸ“š Documentation & Examples

Everything you need to integrate with Website Carbon

πŸš€ Quick Start Examples

Website Carbon Javascript Examplejavascript
// Website Carbon API Example
const response = await fetch('https://api.websitecarbon.com/', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

The Carbon Footprint Estimator API is an innovative tool designed to help developers and organizations assess the environmental impact of loading their web pages. By integrating this API into their applications, users can gain insights into the carbon emissions associated with their digital content, enabling them to make informed decisions about web optimization and sustainability initiatives. This API not only promotes awareness of the ecological footprint of online activities but also empowers businesses to adopt greener practices in their web development. For comprehensive documentation and to get started, visit the API documentation.

Benefits of using the Carbon Footprint Estimator API include:

  • Provides a clear estimate of the carbon emissions per web page load.
  • Helps identify resource-intensive assets that can be optimized for better performance.
  • Increases awareness of sustainability among web developers and users.
  • Supports the implementation of responsible web practices for businesses.
  • Aids in achieving corporate sustainability goals and improving brand reputation.

Here’s a quick example of how to call the API using JavaScript:

fetch('https://api.websitecarbon.com/site?url=https://yourwebsite.com')
  .then(response => response.json())
  .then(data => {
    console.log(`Carbon footprint of loading your site: ${data.carbon.annual} kg CO2 per year`);
  })
  .catch(error => console.error('Error:', error));

πŸ“Š 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jun 1Jun 3Jun 5Jun 7Jun 9Jun 11Jun 13Jun 15Jun 17Jun 19Jun 21Jun 23Jun 25Jun 27Jun 3004008001440Minutes
Online
Offline

Related APIs in Environment