Websites/get_website_statistics
Tool · Websites

get_website_statistics

Get pre-aggregated AWStats traffic statistics for one domain on one of the caller's hosting services, for the CURRENT month. HTTP and HTTPS are reported as separate blocks (never summed). Each block has a status: ok (data parsed), statistics_not_available (no data file for that protocol this month — do NOT report as "no visitors"), or unavailable_on_server (the stats module is not rolled out on that hosting server yet). Sections cover summary, by_hour, by_day, top_pages, not_found_404, referrers, search_engines, search_keywords, origin, countries, os, browsers, robots, http_errors, file_types — pass "sections" to narrow the payload (omitted: list sections return a bounded top-N, small sections are complete). Bandwidth is raw bytes; individual visitor IPs are not exposed. Data is rebuilt nightly, so figures reflect through roughly yesterday and the current month is partial.

Read-onlyIdempotentOpen‑worldscope read:analytics

Invoked over the MCP transport with a tools/call request naming this tool.

Authorization #

Requires a valid OAuth 2.1 bearer access_token whose grant includes the read:analytics scope — Read your websites' traffic statistics and visitor analytics. The broker resolves the caller from the token and returns only records the account owns.

Parameters #

service_idintegerRequired
The hosting service ID the domain belongs to. Obtain it via list_services.
domainstringRequired
The domain whose statistics to read. Must belong to the hosting service (main, addon, or subdomain).
sectionsarray<string>Optional
Optional subset of sections to return. Omit for everything (list sections capped to a top-N). Allowed: summary, by_hour, by_day, top_pages, not_found_404, referrers, search_engines, search_keywords, origin, countries, os, browsers, robots, http_errors, file_types.

Response #

200 · application/json

statisticsobject
service_idinteger
domainstring
periodobject
yearinteger
monthinteger
module_versionstring
httpobject
statusstring
One of: ok statistics_not_available unavailable_on_server
sectionsobject
httpsobject
statusstring
One of: ok statistics_not_available unavailable_on_server
sectionsobject

Errors #

ResultWhen
{ "error": "invalid_domain" }See the tool description for when this result is returned.
{ "error": "not_found" }The requested item does not exist, or it belongs to another account. Cross-account IDs are indistinguishable from missing ones by design.