Traffic of one of your Cloudflare zones by day or hour: requests, bandwidth, cached vs uncached, threats and page views.
curl -X POST "https://api.primaryapi.com/v1/run/cloudflare.zone_analytics" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"zone":"023e105f4ecef8ad9ca31a8372d0c353","since":"2026-11-06","until":"2026-11-08"}'{
"output": {
"found": true,
"data": {
"zone": "example.com",
"granularity": "day",
"since": "2026-11-06",
"until": "2026-11-08", …
}
},
"credits": 1
}Input and output
5 fields
023e105f4ecef8ad9ca31a8372d0c353.2026-11-06.2026-11-08.7 fields
Good to know
Runs as your connected Cloudflare account (read-only). Needs the "Read analytics" permission.
Counts are Cloudflare’s own roll-ups for the zone, in UTC.
How far back and how wide a range you can read depends on the zone’s plan. When the range does not fit, it is narrowed to the most recent part that does and the response carries a hint starting with "date_adjusted:".
Hours or days without traffic are left out of `series`.
Results are never stored.
Unknown zone? It comes back as not found, not as an error.
The same key and credits work for every API.