Skip to content

List tracked sites, or read a site's numbers

GET
/api-v1
curl --request GET \
--url 'https://api.nexacloser.com/v1/api-v1?action=get_sites&days=1' \
--header 'Authorization: Bearer <token>'

One endpoint, picked by action:

  • action=get_sites lists the websites tracked by NexaCloser analytics.
  • action=get_analytics&site_id=…&days=… returns visitors, page views, sessions, form conversion rate and the top page for the last days days (1 to 90, default 1).

An organization key sees every site of its workspace. A personal key sees the sites it can see in that workspace.

action
required
string
Allowed values: get_sites get_analytics
site_id
string

Required for get_analytics. From get_sites.

days
integer
default: 1 >= 1 <= 90

For get_analytics. Window in days, clamped to 1–90.

The sites, or the site’s numbers.

Media typeapplication/json
One of:
object
sites
Array<object>
object
site_id
string
name
string
domain
string | null
user_id

The user the key acts as.

string

Examples

{
"sites": [
{
"site_id": "a1b2c3d4",
"name": "Main website",
"domain": "www.example.com"
}
],
"user_id": "0e985456-cd0a-4417-acb0-6faffd37b88e"
}
X-RateLimit-Limit
integer

Requests allowed in the current short window.

X-RateLimit-Remaining
integer

Requests left in the current short window.

Missing site_id, or an unknown action (the body lists the available actions).

Media typeapplication/json

Older endpoints return a short English message instead of a code.

object
error
required
string

Example

{
"error": "Missing site_id"
}

Missing, wrong, revoked or expired key.

Media typeapplication/json

Older endpoints return a short English message instead of a code.

object
error
required
string

Example

{
"error": "Unauthorized"
}

The site does not exist or is not in this workspace.

Media typeapplication/json

Older endpoints return a short English message instead of a code.

object
error
required
string

Example

{
"error": "Site not found"
}

Too many requests. Wait Retry-After seconds.

Media typeapplication/json
object
error
string
Allowed value: rate_limited
message
string
retry_after

Seconds to wait.

integer

Example

{
"error": "rate_limited",
"message": "Too many requests",
"retry_after": 7
}
Retry-After
integer

Seconds to wait before retrying.