Raw request logs
const url = 'https://api.nsin.ir/analytics/logs?domain=example.com&period=3h&limit=100&offset=0&cache=hit&reqStatus=cache';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/logs?domain=example.com&period=3h&limit=100&offset=0&cache=hit&reqStatus=cache' \ --header 'Authorization: Bearer <token>'Individual request records, newest first, with every filter applied as
an AND. Requires a plan including the logs feature.
Header and body fields are retained for a shorter window than the rest of the row, so older entries return them empty.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”The domain name (for example example.com). These endpoints take the
domain as a query parameter rather than a path segment.
Example
example.comTime window, ending now. Buckets are hourly up to 24h and daily for
7d and 30d. An unrecognised value falls back to 24h.
Rows per page, 1–500. Values outside the range fall back to 100.
Exact HTTP status code.
HTTP method — case-insensitive.
URI substring match.
Cache status: hit, miss or bypass.
Serving path: cache, proxied or direct.
Exact ray id of a single request.
Exact host, a subdomain of it, or a bare subdomain label.
Host header sent to the origin.
SNI presented to the origin.
Origin address the edge connected to.
Comma-separated list of origin addresses.
Client IP address.
Client ISO country code.
ISO country of the edge node that served the request.
Edge node name.
Threat category.
Action a detection rule took on the request.
Classified bot kind.
A CRS rule id that fired.
Substring searched across the captured headers.
Comma-separated URI patterns.
URL path prefix.
Responses
Section titled “ Responses ”A page of request logs.
object
One request. Header and body fields are retained for a shorter window than the rest of the row, so older entries return them empty.
object
Percent-encoded exactly as the client sent it.
Status returned to the visitor.
Total request duration in ms. For WebSockets this spans the whole connection.
Request headers as captured by the edge.
Headers the edge sent to the origin.
Headers the origin returned.
Headers returned to the visitor.
Edge node that served the request.
Unique id for this request.
Client-to-edge protocol, e.g. HTTP/2.0.
Edge-to-origin protocol. Empty on a cache hit.
Status the origin returned. 0 on a cache hit.
Bounded prefix of the body the origin sent with a 5xx, which the edge replaced with an error page.
Origin IP:port the edge connected to.
Seconds the served object had been cached.
Bot classification, when the request was identified as one.
Whether the bot’s identity was verified, rather than merely claimed.
Action a detection rule took.
True when the rule was in dry-run, so nothing was enforced.
WAF anomaly score.
CRS rule ids that fired.
The response was served as Markdown.
Rows matching the filters, before paging.
Example
{ "data": [ { "cache_status": "hit", "req_status": "cache" } ]}The domain query parameter is missing.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "domain is required"}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 domain’s plan does not include the feature this endpoint needs
(monitoring for most sections, logs for raw and top-N request data).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only 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"}