Per-domain totals with sparkline
const url = 'https://api.nsin.ir/analytics/domains-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/domains-overview?period=3h' \ --header 'Authorization: Bearer <token>'Like /analytics/overview, plus an error rate, a small
requests-over-time series for sparklines, and the most recent log
timestamp seen for each domain.
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.
Share of requests that failed, 0–1.
Most recent request seen for this domain or any subdomain. Null when there is no traffic.
Requests over time, for a sparkline.
object
Example generated
{ "data": [ { "domain_id": 1, "domain_name": "example", "total_requests": 1, "total_bandwidth": 1, "error_rate": 1, "latest_event": "2026-04-15T12:00:00Z", "series": [ { "timestamp": "2026-04-15T12:00:00Z", "count": 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"}