Overview
Website Carbon estimates the carbon footprint of loading any web page by analyzing its data transfer size and hosting type. It returns a simple carbon rating so developers can measure the environmental impact of their sites. No API key is required, making it easy to integrate into sustainability dashboards or CI pipelines.
Beginner Tip
Pass any URL as a query parameter to get a carbon estimate — for example, /b?url=example.com. Results are cached for performance, so repeated calls for the same URL return quickly.
Measurement Record
What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.
- Request
- GET https://api.websitecarbon.com/b?url=example.com
- Result
- HTTP 200 · application/json · 57 bytes · compressed
- Response time
- 51 ms (median of 3) · fastest 50 ms
- Transport
- TLSv1.3 · TLS_AES_256_GCM_SHA384 · certificate issued by Google Trust Services
- Browser CORS
- Allowed — Access-Control-Allow-Origin: *
- Served by
- cloudflare
- Recorded
- 2026-08-10
Fields Returned
Top-level fields present in the response we captured, with the type and value we actually received.
| Field | Type | Value received |
|---|---|---|
| c | integer | 0 |
| p | integer | 100 |
| url | string (url) | https://example.com/ |
Captured Response
Captured from a real request to https://api.websitecarbon.com/b?url=example.com on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.
{
"c": 0,
"p": 100,
"url": "https://example.com/"
} Field Reference
url The URL that was analyzed Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "https://api.websitecarbon.com/b?url=example.com";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
How This API Fails
We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.
{} error code: 1101
Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Measured Score Breakdown
Live HTTP request to the API endpoint
Fully tested on Aug 10, 2026
Technical Specifications
Related Tags
Similar APIs
View All →CO2 Offset
⭐ Beginner's PickCO2 Offset API calculates and validates the carbon footprint of electricity consumption using the Sustainable Scope 2 framework.
Danish data service Energi
Danish data service Energi provides programmatic access to open energy data from energinet to society via REST API.
GrünstromIndex
⭐ Beginner's PickGrünstromIndex (Green Power Index) provides real-time and forecast data about the proportion of renewable energy in the German electricity grid.
Luchtmeetnet
⭐ Beginner's PickLuchtmeetnet API provides real-time and predicted air quality measurements from the official Dutch national air quality monitoring network (RIVM).
Carbon Interface
Carbon Interface API calculates estimated CO2 emissions for common activities such as electricity usage, flights, vehicle travel, and shipping.