Website Carbon
用于估算网页加载碳足迹的 API
- 认证方式
- No auth
- HTTPS
- Yes
- CORS
- Unknown
- 分类
- 环境
- 文档 / URL
- https://api.websitecarbon.com/
简介
Website Carbon API 估算网站每次访问的碳足迹——数据传输、能耗和每次页面加载的 CO₂——基于 Website Carbon Calculator 方法论。早期免费且免密钥;现在需要免费 API 密钥(2026-08 实测:无密钥请求返回 401 Unauthorised)。
快速开始
获取 API 密钥(在 websitecarbon.com 注册)后(替换 YOUR_KEY):
curl "https://api.websitecarbon.com/site?url=example.com&key=YOUR_KEY"
{
"url": "https://example.com",
"green": true,
"bytes": 2500000,
"cleanerThan": 0.92,
"statistics": {
"adjustedBytes": 2500000,
"energy": 4.17,
"co2": { "grid": { "grams": 1.67 } }
}
}
认证方式
- 在 websitecarbon.com 注册 → 获取免费 API 密钥。
- 通过
key查询参数携带(缺失密钥 → 401 Unauthorised,已实测)。
速率限制与注意事项
- 免费层有每日请求额度(以官网为准——额度适中);付费档可扩展。
- 响应给出
green(是否托管在绿色能源上)、bytes(页面重量)、cleanerThan(相对其他站点的百分位)和 CO₂ 估算。 - 它在服务端分析 URL(抓取页面及其资源)。
- 适合生态徽章、可持续面板和性能沟通。
常见问题
Website Carbon 免费吗? 有带每日额度的免费层;重度使用付费。
如何获取密钥? 在 websitecarbon.com 注册——密钥在控制台。
测量什么? 数据传输、每次访问的能耗和每次页面加载的估算 CO₂。
环境 分类更多
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| BreezoMeter Pollen Daily Forecast pollen conditions data for a specific location | API Key | Yes | Unknown | ↗ |
| Carbon Interface API to calculate carbon (C02) emissions estimates for common C02 emitting activities | API Key | Yes | Yes | ↗ |
| Climatiq Calculate the environmental footprint created by a broad range of emission-generating activities | API Key | Yes | Yes | ↗ |
| Cloverly API calculates the impact of common carbon-intensive activities in real time | API Key | Yes | Unknown | ↗ |
| CO2 Offset API calculates and validates the carbon footprint | No auth | Yes | Unknown | ↗ |