Skip to main content
GET
Website Analytics
string
required
The API key for your account. You can find this in your account settings.
Analytics aggregates Cloudflare edge traffic for the application’s default squareweb.app domain and any attached custom domain: request counts, bandwidth, visitor counts, and breakdowns by country, device, OS, browser, protocol, method, path, referer, and client network. Use it to build traffic dashboards or spot unusual patterns without pulling raw request logs. Results are cached in 5-minute buckets; a cache miss counts against a 10-requests-per-60-seconds-per-owner limit, so polling the same window repeatedly is cheap. The maximum lookback is 7 days, and the effective start is clamped to the application’s creation date. Unlike Network Logs and Network Performance, this endpoint is available on every paid plan, not just Pro and Enterprise. For error-focused traffic instead of overall traffic, see Network Errors. To purge cached edge responses after a deploy, see Purge Cache.

Parameters

string
required
The ID of the application. You can find this in the URL of your application’s dashboard.
string
required
ISO 8601 start timestamp for the analysis window. The maximum retention window is 7 days; the start is clamped to the application’s creation date.
string
required
ISO 8601 end timestamp. Must be after start.

Drill-down filters

Optional filters that narrow every breakdown to the matching traffic. Feed back the exact type value returned by the corresponding breakdown in a previous response. Filters combine (AND).
string
A single client country (2-character code), as returned in the countries breakdown.
string
A single client IP (exact IPv4/IPv6 match), as returned in the ips breakdown.
string
Request paths starting with this prefix (e.g. /api covers /api/*). Max 256 chars.
string
A single edge response status code (3 digits), as returned in the status_codes breakdown.
string
A single client OS, as returned in the os breakdown.
string
A single client browser, as returned in the browsers breakdown.
string
A single HTTP protocol, as returned in the protocols breakdown.
string
A single referer host, as returned in the referers breakdown (Direct = no referer).
string
A single client network, as returned in the providers breakdown — e.g. GOOGLE (15169), a bare ASN number, or SQUARE-CLOUD-PLATFORM.
string
A single response content type, as returned in the content_types breakdown (Unknown = unclassified).
string
A single verified-bot category, as returned in the bots breakdown (Unverified = regular non-bot traffic).

Response

This route can send a response in a compressed format, optimizing data transmission.
string
Indicates whether the call was successful.. success if successful, error if not.
object
Each breakdown is an array of buckets. type identifies the dimension, visits is unique visitors, requests is the request count, bytes is the response bytes served, and date is the 15-minute window start. The ips, status_codes, bots, and content_types breakdowns are window totals (top-N over the whole window) and carry no date field. Returns an empty object ({}) when the requested window starts before the application’s creation date.

Common errors