Carbon Estimate API - CO2 Per Page View via Green Web Foundation
Fetches a URL and estimates the carbon dioxide emissions per page view based on the transferred bytes. Uses the Sustainable Web Design methodology with configurable energy and carbon intensity factors. Returns CO2 in grams, energy in kWh, a percentile ranking against the median web page size, and the methodology constants used in the calculation.
Code examples
curl -X POST https://api.botoi.com/v1/carbon/estimate \
-H "Content-Type: application/json" \
-d '{"url":"https://www.wikipedia.org"}'When to use this API
Website sustainability reporting
Generate carbon estimates for every page on your site. Aggregate the results into a sustainability report showing total estimated CO2 per month based on your traffic volume. Share the report with stakeholders or publish it on your site.
Green web badges
Call this endpoint and display the cleaner_than_percent value as a badge on your website footer. "This page is cleaner than 89% of web pages tested." Encourages performance optimization and builds trust with environmentally conscious users.
Carbon budget tracking in CI
Add a CI step that calls this endpoint after building your site. Fail the build if CO2 per page view exceeds a threshold (e.g., 0.5g). Track the carbon budget over time alongside bundle size and performance metrics.
Frequently asked questions
How accurate is the carbon estimate?
What does cleaner_than_percent mean?
Does this account for images and third-party scripts?
What methodology is used?
Can I customize the carbon intensity factor?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.