Skip to content
Developers

Read who requested what on a website

GET /api/v2/shared-hosting/{accountId}/traffic

Read what reached one website on a web hosting account in the last hours, from the website’s own access log on the server. senders lists who asked (search engines, AI crawlers, link previews, monitoring, visitors), with the paths each one requested, how the server answered and any per-site limit that applies. answers lists each HTTP status with the paths behind it and who asked for them. crawlerLimits is the server’s list of per-site crawler limits, and serverFilter is what the server’s own filter stopped on the domain, by reason. Requests the CDN stopped or answered from its cache are not counted, and a subdomain is a website of its own that you read by its own name. Paths are returned without their query string, with the names of the most used parameters; parameter values, visitor addresses and user agents are never returned. A result is reused for up to five minutes.

Authentication: An API key with the scopes read:hosting and console:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The web hosting account ID (acct_…).

Query parameters

domainstringrequired
A domain on the account. www. is ignored.
hoursinteger
How many hours back to read, 1 to 48. Default 24. coveredFrom shows how far back the answer reaches. The server empties its logs once a day and reads the time before that from the account’s log archive, so an account that has switched log archiving off in cPanel only gets the time since the last emptying. Default 24. 1 to 48.

Example

GET /api/v2/shared-hosting/{accountId}/traffic
curl "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/traffic?domain=example.com" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The website’s traffic for the window.

Response 200
{
"domain": "example.com",
"windowHours": 24,
"coveredFrom": "2026-11-18T10:17:00.000Z",
"coveredTo": "2026-11-19T10:16:00.000Z",
"partial": false,
"sharedLogDomain": null,
"totalRequests": 2988,
"statusMix": {
"200": 2079,
"404": 97,
"429": 812
},
"hourStartsAt": "2026-11-18T10:17:00.000Z",
"senders": [
{
"id": "GPTBot",
"name": "GPTBot",
"kind": "ai",
"requests": 2940,
"refused": 812,
"statusMix": {
"200": 2031,
"404": 97,
"429": 812
},
"hourly": [
60,
72,
84,
96,
120,
180,
260,
320,
280,
200,
140,
100,
80,
70,
66,
64,
62,
60,
60,
58,
58,
56,
48,
46
],
"limitPerMinute": 20,
"paths": [
{
"method": "GET",
"path": "/shop/",
"requests": 1128,
"variants": 1128,
"variantsCapped": false,
"queryKeys": [
"filter_cat",
"orderby",
"filter_color"
],
"statusMix": {
"200": 402,
"429": 726
}
}
]
},
{
"id": "Googlebot",
"name": "Googlebot",
"kind": "search",
"requests": 48,
"refused": 0,
"statusMix": {
"200": 48
},
"hourly": [
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2,
2
],
"limitPerMinute": null,
"paths": [
{
"method": "GET",
"path": "/product/winter-jacket/",
"requests": 38,
"variants": 1,
"variantsCapped": false,
"queryKeys": [],
"statusMix": {
"200": 38
}
}
]
}
],
"answers": [
{
"status": 429,
"requests": 812,
"paths": [
{
"method": "GET",
"path": "/shop/",
"requests": 726,
"senders": [
{
"id": "GPTBot",
"name": "GPTBot",
"requests": 726
}
]
}
]
}
],
"crawlerLimits": {
"available": true,
"limits": [
{
"name": "GPTBot",
"perMinute": 20
}
]
},
"serverFilter": {
"available": true,
"total": 33,
"partial": false,
"rules": [
{
"name": "WordPress login attempt blocked",
"incidents": 33
}
]
}
}
Response fields
domainstring
windowHoursinteger
coveredFromstring or null
The first request in the window.
coveredTostring or null
The last request in the window.
partialboolean
True when the log was too large to read in full. The counts are then a floor.
sharedLogDomainstring or null
Set when the domain is an alias that shares its log with another domain. The numbers then cover both.
totalRequestsinteger
statusMixobject
HTTP status → number of requests.
hourStartsAtstring or null
Start of the first bucket in each sender’s hourly.
sendersarray of object
The 20 senders with the most requests.
idstring
Stable key, for example Googlebot, browser (visitors in web browsers), other-bot (crawlers without a known name) or empty-user-agent.
namestring
kindstring
One of search, ai, seo, social, monitoring, site, script, visitors, other_crawlers, unnamed.
requestsinteger
refusedinteger
Requests answered 429 because a per-site limit was passed.
statusMixobject
HTTP status → number of requests.
hourlyarray of integer
Requests per hour, starting at hourStartsAt.
limitPerMinuteinteger or null
The per-site limit for this sender in requests per minute. null when no limit applies, 0 when every request is refused.
pathsarray of object
The most requested paths, at most 25.
methodstring
pathstring
The path without its query string.
requestsinteger
variantsinteger
How many different query strings were used on this path.
variantsCappedboolean
True when variants reached the counting cap of 2,000.
queryKeysarray of string
The most used query parameter names. Values are never returned.
statusMixobject
HTTP status → number of requests.
answersarray of object
The eight most common HTTP statuses.
statusinteger
requestsinteger
pathsarray of object
The most requested paths with this answer, at most 15.
methodstring
pathstring
requestsinteger
sendersarray of object
idstring
namestring
requestsinteger
crawlerLimitsobject
availableboolean
False when the server’s limit list could not be read.
limitsarray of object
namestring
perMinuteinteger
Requests per site per minute. 0 means refused.
serverFilterobject
availableboolean
totalinteger
Requests the server’s own filter stopped on the domain in the window.
partialboolean
True when there were more incidents than are read in one call.
rulesarray of object
namestring
incidentsinteger

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400domain is missing or not a domain name, or hours is not between 1 and 48 (invalid_request).
401Unauthorized. Authentication is required.
403The key lacks a scope or the account is not active. domain_not_owned: the domain is not on this account.
404The domain is not a website on this account, or its traffic could not be read right now (not_found).
409The account is not on cPanel (account_not_eligible_cpanel).
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502The hosting server does not provide per-sender traffic, or could not be reached (upstream_failed).

Stuck?

The assistant in the client area knows this API and can look at your account. When you contact support about a failed call, include the requestId from the error response.