Cloudflare Web Analytics API

The Cloudflare Web Analytics API provides privacy-first real user measurement (RUM) analytics for websites. It uses a lightweight JavaScript beacon to collect performance data via the Performance API without cookies or IP tracking, with support for automatic and manual injection.

GitHub OpenAPI

Operations 15

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /accounts/{account_id}/rum/site_info Create a web analytics site · Create a Web Analytics site #
Ask an LLM
“How do I set up web performance analytics for a hosted site?”
“Does the new analytics site need a hostname, and can analytics auto-install for orange-clouded sites?”
Tell an agent
Create a web analytics site for host {host} on account {account_id}.
Set up analytics on {host} with auto-install {auto_install}.
GET /accounts/{account_id}/rum/site_info/list List web analytics sites · List Web Analytics sites #
Ask an LLM
“Which sites have web analytics enabled for my account?”
“Can I sort the list of web analytics sites?”
Tell an agent
List web analytics sites on account {account_id}.
Show page {page} of analytics sites ordered by {order_by}, {per_page} per page.
GET /accounts/{account_id}/rum/site_info/site_tag/list List web analytics site tags · List Web Analytics site tags #
Ask an LLM
“What site tags exist across all my web analytics sites?”
“Can I include sites that are disabled when listing site tags?”
Tell an agent
List web analytics site tags for account {account_id}.
List all site tags, including disabled sites, for account {account_id}.
GET /accounts/{account_id}/rum/site_info/validate/{hostname} Validate a web analytics site hostname · Validate a Web Analytics site hostname #
Ask an LLM
“Is a hostname I want to use for web analytics well-formed and valid?”
“Can a web analytics hostname contain a wildcard?”
Tell an agent
Validate hostname {hostname} for web analytics on account {account_id}.
Check that {hostname} is a valid TLD for analytics.
GET /accounts/{account_id}/rum/site_info/zone_tag/list List web analytics zone tags · List Web Analytics zone tags #
Ask an LLM
“Which zone tags are available for web analytics sites?”
“Can zone tags be used to exclude zones from analytics?”
Tell an agent
List zone tags for web analytics on account {account_id}.
Show every analytics zone tag for account {account_id}.
DELETE /accounts/{account_id}/rum/site_info/{site_id} Delete a Web Analytics site · Delete a Web Analytics site #
Ask an LLM
“How do I stop collecting Web Analytics data for a site?”
“Can I remove a Web Analytics site entirely?”
Tell an agent destructive · confirm first
Delete Web Analytics site {site_id}.
Remove the Web Analytics site {site_id} from account {account_id}.
GET /accounts/{account_id}/rum/site_info/{site_id} Get a web analytics site · Get a Web Analytics site #
Ask an LLM
“Can I see the settings of one analytics site?”
“What zone tag is assigned to a specific web analytics site?”
Tell an agent
Get web analytics site {site_id} on account {account_id}.
Show the analytics settings for site {site_id}.
PUT /accounts/{account_id}/rum/site_info/{site_id} Update a web analytics site · Update a Web Analytics site #
Ask an LLM
“Can I change the hostname of an existing analytics site?”
“Is disabling RUM possible if auto-install is on?”
Tell an agent
Set the analytics site {site_id} on account {account_id} to host {host}.
Update site {site_id} on account {account_id} with auto-install {auto_install} and enabled {enabled}.
POST /accounts/{account_id}/rum/v2/{ruleset_id}/rule Create a web analytics rule · Create a Web Analytics rule #
Ask an LLM
“How do I include or exclude certain paths from analytics measurements?”
“Can I turn a new analytics rule on or off right after creating it?”
Tell an agent
Create a rule for my analytics ruleset {ruleset_id} on account {account_id}.
Add a {inclusive} rule for {host} paths {paths} in ruleset {ruleset_id} on account {account_id}.
DELETE /accounts/{account_id}/rum/v2/{ruleset_id}/rule/{rule_id} Delete a Web Analytics rule · Delete a Web Analytics rule #
Ask an LLM
“How do I remove a Web Analytics rule from a ruleset?”
“Can I delete a single Web Analytics rule by its ID?”
Tell an agent destructive · confirm first
Delete Web Analytics rule {rule_id} from ruleset {ruleset_id}.
Remove Web Analytics rule {rule_id} in {ruleset_id} on account {account_id}.
PUT /accounts/{account_id}/rum/v2/{ruleset_id}/rule/{rule_id} Update an analytics rule · Update a Web Analytics rule #
Ask an LLM
“Can I pause an existing analytics rule?”
“Is it possible to change the paths a rule matches?”
Tell an agent
Update rule {rule_id} in analytics ruleset {ruleset_id} on account {account_id}.
Pause analytics rule {rule_id} in ruleset {ruleset_id} on account {account_id}, keeping host {host}.
GET /accounts/{account_id}/rum/v2/{ruleset_id}/rules List rules in a Web Analytics ruleset · List rules in Web Analytics ruleset #
Ask an LLM
“Which rules are in a Web Analytics ruleset?”
“Can I see every rule in a Web Analytics ruleset at once?”
Tell an agent
List the rules in Web Analytics ruleset {ruleset_id}.
Show all rules of Web Analytics ruleset {ruleset_id} on account {account_id}.
POST /accounts/{account_id}/rum/v2/{ruleset_id}/rules Update several Web Analytics rules at once · Update Web Analytics rules #
Ask an LLM
“How do I create and delete Web Analytics rules in one request?”
“Can I pause multiple Web Analytics rules in a single call?”
Tell an agent
Create and update Web Analytics rules {rules} in ruleset {ruleset_id}.
Delete Web Analytics rules {delete_rules} from ruleset {ruleset_id} on account {account_id}.
GET /zones/{zone_id}/settings/rum Get RUM status for a zone · Get RUM status for a zone #
Ask an LLM
“Is Real User Monitoring enabled for a zone?”
“What is the RUM status of a given zone?”
Tell an agent
Get the RUM status for zone {zone_id}.
Check whether Real User Monitoring is on for zone {zone_id}.
PATCH /zones/{zone_id}/settings/rum Turn Real User Monitoring on or off for a zone · Toggle RUM on/off for a zone #
Ask an LLM
“How do I turn Real User Monitoring off for a zone?”
“Can I switch RUM on or off for an existing zone?”
Tell an agent
Set RUM to {value} for zone {zone_id}.
Toggle Real User Monitoring on zone {zone_id} to {value}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cloudflare:cloudflare-web-analytics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cloudflare-web-analytics-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Welcome to Cloudflare's API documentation site.
  license:
    name: BSD-3-Clause
    url: https://opensource.org/licenses/BSD-3-Clause
  title: Cloudflare Web Analytics API
  version: 4.0.0
servers:
- description: Client API
  url: https://api.cloudflare.com/client/v4
security:
- api_email: []
  api_key: []
- api_token: []
- user_service_key: []
tags:


# --- truncated at 32 KB (81 KB total) ---
# Full source: https://artifacts.apis.io/cloudflare/openapi/cloudflare-web-analytics-api-openapi.yml