Page Weight and Carbon: transfer size, requests and CO2e avatar

Page Weight and Carbon: transfer size, requests and CO2e

Pricing

from $9.00 / 1,000 page measureds

Go to Apify Store
Page Weight and Carbon: transfer size, requests and CO2e

Page Weight and Carbon: transfer size, requests and CO2e

Loads each page in a headless browser and reports the bytes transferred by resource type, the request count, third party weight and a carbon estimate per view from the Sustainable Web Design Model v4.

Pricing

from $9.00 / 1,000 page measureds

Rating

0.0

(0)

Developer

Ed Rayyis

Ed Rayyis

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

Security

Limited permissions

Share

Give it a list of web pages. It loads each one in headless Chrome with an empty cache and reports how many bytes the page pulled over the network, split by resource type, how many requests it made, how much came from third parties, and an estimate of the grams of CO2e for one view using the Sustainable Web Design Model version 4 [1].

How the weight is measured

Every request is read from Chrome's own network events. Transfer size is the bytes on the wire: the compressed body plus headers, with redirect hops included. The decoded size (after decompression) is reported alongside. Requests are grouped as document, script, stylesheet, image, font, media, xhr (fetch, XHR and similar) and other, and split into first and third party by registrable domain. The page is measured after its load event plus a wait you set (default 3 seconds). Turn on Scroll the page to count images and videos that load only when scrolled into view.

How the carbon estimate is made

The model and its constants come from the Sustainable Web Design Model version 4 [1]:

  • Operational energy per GB: data centers 0.055 kWh, networks 0.059 kWh, user devices 0.080 kWh.
  • Embodied energy per GB: data centers 0.012 kWh, networks 0.013 kWh, user devices 0.081 kWh.
  • Grid carbon intensity: 494 g CO2e per kWh, the global average the model uses by default. You can set your own.
  • Green hosting factor: the share of data center energy from renewable or zero carbon sources, from 0 to 1, which reduces data center operational emissions only. Default 0.
  • Bytes are converted at 1,000,000,000 bytes per GB, as in the Green Web Foundation's CO2.js implementation of the model [3].

The estimate is for one first view with nothing cached. The grade uses the model's digital carbon rating scale for grams per page view [2]: A+ up to 0.040, A up to 0.079, B up to 0.145, C up to 0.209, D up to 0.278, E up to 0.359, F above.

Input

  • Pages (required)
  • Device: desktop (1366 by 768) or mobile (iPhone 13 profile)
  • Scroll the page (default off)
  • Wait after load (default 3 seconds)
  • Grid carbon intensity (default 494 g CO2e per kWh)
  • Green hosting factor (default 0)
  • Page load timeout (default 60 seconds)

Output

Dataset: one item per page with url, ok, device, finalUrl, httpStatus, title, transferBytes, transferKB, decodedBytes, requestCount, failedRequests, unfinishedRequests (still loading when measured, not counted in the bytes), thirdPartyRequests, thirdPartyTransferBytes, byType (requests, transfer bytes and decoded bytes for each type), largestResources (the 10 heaviest), gramsCO2ePerView, carbonRating, and carbon with the operational and embodied grams, the grams per segment (data center, network, user device) and the assumptions used.

A page that cannot be loaded, or answers with an HTTP error, gets ok: false and an error, and the rest of the run carries on. Export as JSON, CSV or Excel, or read it over the API.

Pricing

Pay per event: one event per page measured. A page that fails is not charged. The run stops when it reaches the maximum charge you set.

Scope and conduct

Only the pages you list are loaded, one at a time, each in a fresh browser. The actor does not log in anywhere, click anything, or collect personal data.

Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.

References

[1] Sustainable Web Design, Estimating Digital Emissions. https://sustainablewebdesign.org/estimating-digital-emissions/

[2] Sustainable Web Design, Introducing Digital Carbon Ratings. https://sustainablewebdesign.org/digital-carbon-ratings/

[3] Green Web Foundation, CO2.js source, file size constants. https://github.com/thegreenwebfoundation/co2.js/blob/main/src/constants/file-size.js