Per-domain totals across your account
const url = 'https://api.nsin.ir/analytics/overview?period=3h';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.nsin.ir/analytics/overview?period=3h' \ --header 'Authorization: Bearer <token>'One row per domain you can access, with request, bandwidth and visitor
totals for the period. Account-wide — takes no domain parameter.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”Time window, ending now. Buckets are hourly up to 24h and daily for
7d and 30d. An unrecognised value falls back to 24h.
Responses
Section titled “ Responses ”One entry per domain.
object
object
Bytes.
Example generated
{ "data": [ { "domain_id": 1, "domain_name": "example", "total_requests": 1, "total_bandwidth": 1, "unique_visitors": 1 } ]}Missing, malformed, revoked or expired API key — or the owning account is inactive.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}The analytics backend is temporarily unreachable. Retry; no data is lost.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "analytics unavailable"}