Per-domain totals with sparkline
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
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.
Query parameters
- periodstringquery
Time window, ending now. Time series are bucketed by minute for
1h, by hour up to48h, and by day for7dand30d. Buckets are cut on Asia/Tehran (UTC+03:30) boundaries and emitted as UTC instants, so an hourly bucket starts at:30UTC. An unrecognised value falls back to24h.One of:"1h""3h""6h""12h""24h""48h""7d""30d"Default:"24h"
Responses
200One entry per domain.
Content type: application/json
- dataarray of DomainsOverviewItem
Item fields
- domain_idinteger
- domain_namestring
- total_requestsinteger
- total_bandwidthinteger
Bytes.
- error_ratenumber
Share of requests that failed, 0–1.
- latest_eventstring (date-time)
Most recent request seen for this domain or any subdomain. Null when there is no traffic.
- seriesarray of OverviewSeriesPoint
Requests over time, for a sparkline.
Item fields
- timestampstring (date-time)
- countinteger
{
"data": [
{
"domain_id": 0,
"domain_name": "string",
"total_requests": 0,
"total_bandwidth": 0,
"error_rate": 0,
"latest_event": "2026-01-01T00:00:00Z",
"series": [
{
"timestamp": "2026-01-01T00:00:00Z",
"count": 0
}
]
}
]
}401Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "invalid API key"
}429The key exceeded its request budget (300 requests per minute by default).
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "rate limit exceeded"
}503Either the analytics backend is temporarily unreachable (retry; no data
is lost), or the answer is still being computed. The per-domain
sections and the cached account-wide views (domains-overview,
global-summary, global-summary/peak, requests-compare,
bandwidth-overview, nodes-overview) wait at most about 25 seconds
for their query; past that they answer 503 with pending: true and
a Retry-After header, while the query keeps running and caches its
result, so the retry is served from that cache instead of starting the
same scan again. Identical concurrent requests share one computation.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
- pendingboolean
truewhen the query is still running rather than failing. Retry afterRetry-Afterseconds.
{
"error": "analytics unavailable"
}Example request
curl -X GET "https://api.nsin.ir/analytics/domains-overview" \
-H "Authorization: Bearer $NSIN_API_KEY"