nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Analytics

How the traffic behaves over time

gethttps://api.nsin.ir/analytics/security/behaviour

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

Share of asset requests, of requests with cookies and of low bot scores over the last 24 hours (15-minute steps) or 7 days (hourly). A sudden change here is what behaviour detection reacts to.

Query parameters

  • domainstringrequiredquery

    The domain name (for example example.com). These endpoints take the domain as a query parameter rather than a path segment.

  • rangestringquery
    One of: "24h" "7d"
    Default: "24h"

Responses

200The series.

Content type: application/json

  • availableboolean

    False until behaviour data is collected.

  • step_minutesinteger
    One of: 15 60
  • pointsarray of object
    Item fields
    • tstring (date-time)
    • requestsinteger

      Requests judged (verified bots, Under Attack checks and requests your enforced rules blocked are left out).

    • asset_sharenumber | null

      Share of CSS / JS / image / font requests.

    • cookie_sharenumber | null

      Share of requests with cookies; null before the edge logged cookie names.

    • bot_low_sharenumber | null

      Share of requests with a bot score under 30; null where not scored.

json
{
  "available": true,
  "step_minutes": 15,
  "points": [
    {
      "t": "2026-01-01T00:00:00Z",
      "requests": 0,
      "asset_share": 0,
      "cookie_share": 0,
      "bot_low_share": 0
    }
  ]
}
400The domain query parameter is missing.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "domain is required"
}
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.

json
{
  "error": "invalid API key"
}
402The domain has no active plan at all, so no plan feature is available on it. Buy or renew a plan for the domain. (A plan that is active but does not include the feature answers 403 instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "This domain does not have an active plan."
}
404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only 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.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X GET "https://api.nsin.ir/analytics/security/behaviour?domain=example.com" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc