Cloudflare uses “Web Analytics API” to describe two different jobs. The account-scoped Web Analytics site-info endpoints manage RUM sites (list, retrieve, create, update, and delete). The separate GraphQL Analytics API retrieves aggregated analytics for Cloudflare network traffic and products. Choose the site-info family for configuration and the GraphQL endpoint for reporting data; do not substitute one for the other.
How do I use the Cloudflare Web Analytics API?
Start by deciding whether your application needs to manage Web Analytics sites or read analytics measurements.
| Need | Cloudflare surface | What it does |
|---|---|---|
| Manage Web Analytics (RUM) sites | Account-scoped site-info endpoint family in the Cloudflare API reference | Lists, retrieves, creates, updates, and deletes Web Analytics sites. |
| Read aggregated traffic or product data | GraphQL Analytics API at https://api.cloudflare.com/client/v4/graphql | Accepts GraphQL queries for aggregated Cloudflare network and product datasets. |
The available reference material does not establish the exact REST paths, payload schemas, response fields, or permission for each site-info operation. Verify those details in Cloudflare’s current API reference before writing a client; endpoint names alone are not enough to safely construct requests.
What is the Cloudflare Web Analytics site-info endpoint?
It is the management API for Web Analytics sites associated with an account. The reference lists operations to:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
- List Web Analytics sites.
- Retrieve one site.
- Create a site.
- Update a site.
- Delete a site.
These operations concern site configuration and metadata, not the time-series analytics itself. Treat the live reference as authoritative for the account identifier, site identifier, HTTP method, request body, response shape, and token scope. Do not copy a GraphQL query into this REST-style API or assume that GraphQL permissions apply to every site-management operation.
How do I get Web Analytics data from Cloudflare?
Send an HTTP POST containing a JSON object with query and variables to the GraphQL endpoint. Cloudflare describes this API as providing “aggregated analytics about various Cloudflare products.” A request can address multiple datasets; the response waits for all of them, and the request fails if any dataset query fails.
Request shape
POST https://api.cloudflare.com/client/v4/graphql
Content-Type: application/json
Authorization: Bearer YOUR_API_TOKEN
{
"query": "YOUR_DOCUMENTED_GRAPHQL_QUERY",
"variables": {}
}
YOUR_DOCUMENTED_GRAPHQL_QUERY must be replaced with a query for the dataset and fields you need from Cloudflare’s current GraphQL schema. Dataset names, dimensions, measures, filters, and time fields differ by product, so inventing a universal query would produce misleading code.
cURL request scaffold
curl -X POST "https://api.cloudflare.com/client/v4/graphql"
-H "Authorization: Bearer $CF_API_TOKEN"
-H "Content-Type: application/json"
--data '{
"query": "YOUR_DOCUMENTED_GRAPHQL_QUERY",
"variables": {}
}'
Python request scaffold
import os
import requests
query = "YOUR_DOCUMENTED_GRAPHQL_QUERY"
response = requests.post(
"https://api.cloudflare.com/client/v4/graphql",
headers={
"Authorization": f"Bearer {os.environ['CF_API_TOKEN']}",
"Content-Type": "application/json",
},
json={"query": query, "variables": {}},
timeout=60,
)
response.raise_for_status()
payload = response.json()
if payload.get("errors"):
raise RuntimeError(payload["errors"])
print(payload["data"])
Node.js request scaffold
const query = 'YOUR_DOCUMENTED_GRAPHQL_QUERY';
const res = await fetch('https://api.cloudflare.com/client/v4/graphql', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.CF_API_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ query, variables: {} })
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const payload = await res.json();
if (payload.errors) throw new Error(JSON.stringify(payload.errors));
console.log(payload.data);
Interpret the response
Check both the HTTP status and the JSON errors member. A successful HTTP response can still contain GraphQL errors. When querying several datasets, isolate them during troubleshooting because one failing dataset causes the combined request to fail.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Is the Cloudflare GraphQL Analytics API the same as Web Analytics?
No. Web Analytics is a RUM collection and site-management product; GraphQL Analytics is a query interface over aggregated Cloudflare product and network datasets. A Web Analytics site-info call changes or reads site configuration. A GraphQL call asks for measurements. They have different endpoint styles, schemas, and implementation concerns.
Do not use GraphQL values as a billing meter. Cloudflare states that billable traffic excludes some traffic, such as DDoS traffic, while GraphQL measures overall consumption and includes measurable traffic. Use the billing system for charges and GraphQL for analytics.
How do I authenticate safely?
For GraphQL Analytics, Cloudflare recommends API tokens. Its documented example uses the Account → Account Analytics → Read permission and allows selecting zone resources, restricting client IP addresses, and setting a token lifetime. Create the narrowest token that fits the report, keep it server-side, and store it in an environment variable or secret manager. Cloudflare warns that the token is shown only at creation; anyone who obtains it can access the data it authorizes.
Do not assume this GraphQL scope is the correct scope for every RUM site-info operation. Confirm each site-management endpoint’s permission in the current API reference.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
How do I enable Web Analytics collection?
Site not proxied through Cloudflare
- Open the Web Analytics dashboard and add the site.
- Copy the JavaScript snippet Cloudflare supplies.
- Place it in the site HTML immediately before the closing
</body>tag. - Publish the change and wait a few minutes for data to appear.
Site proxied through Cloudflare
Add the hostname in the dashboard. Automatic setup is enabled by default. The dashboard also provides options to exclude EU visitor data, install the snippet manually, or disable Web Analytics.
Cloudflare Pages
Enable Web Analytics from the project’s Metrics page. Cloudflare adds the JavaScript snippet on the next deployment.
Automatic setup limitation
If the site sends Cache-Control: public, no-transform, the proxy cannot modify the original payload to inject the Beacon script, so automatic setup will not work. Install the snippet manually instead, or change the response policy after considering its caching implications.
What are the current Web Analytics limits?
Cloudflare’s limits page was last updated August 12, 2026. Recheck it before building a long-lived integration.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
| Item | Documented limit |
|---|---|
| Non-proxied Web Analytics sites | 10 |
| Proxied Web Analytics sites | No site-count limit stated |
| Sites viewable in parallel in aggregate dashboard data | 1,000 websites |
| Proxied-site rules, Free | 0 |
| Proxied-site rules, Pro | 5 |
| Proxied-site rules, Business | 20 |
| Proxied-site rules, Enterprise | 100 |
Rules apply only to proxied sites. On plans with zero rules, Web Analytics injects the JavaScript snippet on all subdomains. For large portfolios, select specific sites or extract data with GraphQL rather than relying on an all-sites dashboard view.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting Cloudflare Web Analytics integrations
No data appears
- For a non-proxied site, confirm the snippet is published before
</body>and allow a few minutes for collection. - For a proxied site, verify the hostname is added and automatic setup is enabled.
- Check whether
Cache-Control: public, no-transformprevents injection; use the manual snippet. - For Pages, confirm the setting in the project’s Metrics page and deploy again.
GraphQL returns authorization errors
Check that the token is valid, has Account Analytics read access, targets the intended account or zones, and has not expired or been restricted by client IP. Never paste the token into browser code or logs.
GraphQL returns a schema or field error
Use the current dataset documentation and verify field names, dimensions, filters, and time ranges. A query copied for one product dataset may not apply to another.
One combined query fails
Run each dataset selection separately. Because the request waits for all dataset queries, one invalid or unavailable selection can fail the complete response.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Numbers do not match billing
This is expected: GraphQL measures overall consumption, while billable traffic excludes some traffic categories. Do not reconcile invoices from GraphQL totals.
Or skip the browser setup
If your immediate task is producing a clean screenshot of a Cloudflare dashboard, documentation page, or test URL, ScreenshotNeo provides a single-call alternative to maintaining browser automation. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://api.cloudflare.com/client/v4/graphql -o shot.webp
See the ScreenshotNeo documentation for the 63 capture options, including full-page and element captures, device presets, custom headers and cookies, JavaScript, wait conditions, PDF output, webhooks, bulk capture, caching, and signed links. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Implementation checklist
- Classify the task as RUM site management or analytics querying.
- Verify live endpoint paths, schemas, and permissions for site-info operations.
- Use a least-privilege API token for GraphQL and keep it secret.
- Send GraphQL as POST JSON with
queryandvariables. - Handle both HTTP failures and GraphQL
errors. - Separate datasets when diagnosing a failed combined query.
- Keep billing calculations out of GraphQL analytics.
- Recheck limits and documentation before production rollout.
Frequently Asked Questions
Can I use the site-info API to download page-view metrics?
No. The site-info family manages Web Analytics sites. Use the separate GraphQL Analytics API for aggregated measurements.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteDoes Web Analytics work on a non-proxied domain?
Yes. Add the site in the dashboard, install the supplied JavaScript snippet before the closing body tag, and allow a few minutes for data to appear.
How many non-proxied sites are documented as allowed?
Cloudflare’s limits page, last updated August 12, 2026, lists 10 non-proxied Web Analytics sites.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

