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

Get the NsinNabz analytics tag

gethttps://api.nsin.ir/domains/{domain}/analytics-tag

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

The NsinNabz <script> tag the edge inserts into this domain's HTML pages, and when it last changed. Both fields are null when the domain has no tag. Requires domain.view, so read-only keys may call it.

Path parameters

  • domainstringrequiredpath

    The domain name (for example example.com) — not a numeric id.

Responses

200The domain's tag, or null in both fields.

Content type: application/json

  • tagstring | nullrequired

    The <script> tag the edge inserts into the domain's HTML pages.

  • updated_atstring | null (date-time)required

    When the tag last changed (UTC).

json
{
  "tag": "<script async src=\"https://nabz-s.nsincloud.ir/s.js\" data-site=\"site_AAAA1111\" data-edge=\"1\"></script>",
  "updated_at": "2026-09-30T08:15:04.123456Z"
}
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"
}
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/domains/example.com/analytics-tag" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc