---
type: Attested Computation
title: usage
identifier: cloudflare/usage
description: 'A zone''s Worker requests today (the UTC day Cloudflare''s daily quota counts) against that quota: how many so far, where the day ends if the last hour''s rate holds, and the share of the quota that is, by Worker script; then the last hour''s requests to the zone by path and by kind of client (a browser by name, else a program), never by address. The gauges are files (used.txt, projected.txt, share.txt, the projected share as a fraction) and stdout is a short report. Read-only: the token needs only Analytics read and Zone read.'
pack: cloudflare
tags:
- engineering
- internet
runtime: fragletc
image: ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522
network: required
stdin: none
execution_class: environmental
procedure_hash: sha256:953e82a7741529c12a43cb860608684249507ce5325ed1fe2013a387aae06d1f
parameters:
- name: zone
  type: string
  required: true
  description: The zone (domain) whose Workers to read, e.g. example.com
- name: quota
  type: string
  required: false
  default: '100000'
  description: 'Worker requests a day the plan allows (the free plan: 100000)'
- name: top
  type: string
  required: false
  default: '8'
  description: How many paths and clients to list
computation: https://tools.ofthemachine.com/cloudflare/usage.py
executor:
  resource: https://github.com/ofthemachine/fraglet
  receipt:
  - schema
  - fragletc
  - procedure
  - procedure_hash
  - image
  - image_digest
  - network
  - stdin_mode
  - params
  - inputs
  - argv
  - env
  - memo_key
  - started
  - finished
  - exit_code
  - stdout
  - outputs
  format: fraglet-receipt/2 (fragletc --receipt <path>, or FRAGLETC_RECEIPT_DIR)
attester:
  resource: https://tools.ofthemachine.com/receipt/attest.py
  method: 'deterministic, no re-execution: procedure_hash equals sha256 of computation; memo_key recomputes from the receipt''s own fields; claimed params and any artifact hash match the receipt'
generated:
  by: process:tools/catalog/compile.py
  at: '2026-11-13T18:27:40Z'
secrets:
- CLOUDFLARE_API_TOKEN
outputs:
- used.txt
- projected.txt
- share.txt
---

# usage

A zone's Worker requests today (the UTC day Cloudflare's daily quota counts) against that quota: how many so far, where the day ends if the last hour's rate holds, and the share of the quota that is, by Worker script; then the last hour's requests to the zone by path and by kind of client (a browser by name, else a program), never by address. The gauges are files (used.txt, projected.txt, share.txt, the projected share as a fraction) and stdout is a short report. Read-only: the token needs only Analytics read and Zone read.

Use when someone asks how close a Cloudflare Workers site is to its daily request limit, what is driving its request count, or whether a client is polling too hard.

# Schema

## Parameters
- `zone` (string, required) — The zone (domain) whose Workers to read, e.g. example.com
- `quota` (string, optional, default `100000`) — Worker requests a day the plan allows (the free plan: 100000)
- `top` (string, optional, default `8`) — How many paths and clients to list
- `CLOUDFLARE_API_TOKEN` (secret, required) — read from the caller's environment, never passed with `-p`; A Cloudflare API token with Account Analytics read and Zone read (read-only)

## Outputs
- `used.txt` (declared file under /output)
- `projected.txt` (declared file under /output)
- `share.txt` (declared file under /output)

# Execution

The computation is [`cloudflare/usage.py`](https://tools.ofthemachine.com/cloudflare/usage.py) (frontmatter `computation`; in `tools.tar.gz` the same file sits at `cloudflare/usage.py` beside this bundle), run by `fragletc` in `ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522` with network `required`. Its identity is `procedure_hash` = sha256 of that file, shebang included — the same value every receipt records. Parameters are passed as `-p name=value`; `--receipt run.json` (or `FRAGLETC_RECEIPT_DIR`) writes the receipt, a `fraglet-receipt/2` JSON document with the fields listed under `executor.receipt`.

# Attestation

A run's receipt is attested with [`receipt/attest.py`](https://tools.ofthemachine.com/receipt/attest.py): the computation that ran is this script (`procedure_hash`), the receipt is internally consistent (`memo_key` recomputes from its own fields), the claimed parameters are the ones that ran, and an artifact claimed as an output hashes to what the receipt recorded. No re-execution: attestation is provenance fidelity, not reproduction.

Environmental: the tool reaches the network, so outputs depend on state outside its inputs; the receipt records exactly what ran and what came out and makes no reproduction claim.

Skill: [SKILL.md](https://tools.ofthemachine.com/cloudflare/SKILL.md)
