Skip to main content
Mintlify
current

Search documentation

Type to search this documentation.

Get unique visitors

GET/v1/analytics/{projectId}/visitorsGet unique visitors

Returns per-path and site-wide approximate distinct visitors by traffic type. The total field is deduplicated across human and AI (union of distinct visitor IDs with any qualifying content view).

Authenticate with an admin API key.

Parameters

projectIdstringpathrequired

Your project ID. Can be copied from the [API keys](https://app.mintlify.com/settings/organization/api-keys) page in your dashboard.

dateFromstringquery

Date in ISO 8601 or YYYY-MM-DD format

dateTostringquery

Date in ISO 8601 or YYYY-MM-DD format. `dateTo` is an exclusive upper limit. Results include dates before, but not on, the specified date.

limitintegerquery

Max results per page (1-250, default 50). Increment offset by limit while hasMore is true to paginate.

default 50 · maximum 250 · minimum 1

offsetintegerquery

Number of rows to skip. Use offset = (page - 1) * limit for page-based access.

default 0 · minimum 0

Responses

200Site-wide totals and per-path visitor countsapplication/json
objectVisitorsByPageResponse
hasMorebooleanrequired

Whether additional results are available beyond this page.

totalsobjectrequired
Show child attributes
ainumberrequired

Site-wide unique visitors from AI bot traffic.

humannumberrequired

Site-wide unique visitors from human traffic.

totalnumberrequired

Site-wide approximate distinct visitors with any qualifying view (deduplicated across human and AI).

visitorsarray of objectrequired

Per-page visitor counts.

Show child attributes
Show array items
ainumberrequired

Unique visitors from AI bot traffic.

humannumberrequired

Unique visitors from human traffic.

pathstringrequired

The documentation page path.

totalnumberrequired

Approximate distinct visitors with any qualifying view on this path (deduplicated across human and AI).

Example response
{
  "hasMore": true,
  "totals": {
    "ai": 0,
    "human": 0,
    "total": 0
  },
  "visitors": [
    {
      "ai": 0,
      "human": 0,
      "path": "string",
      "total": 0
    }
  ]
}
400Invalid query parametersapplication/json
objectAnalyticsErrorResponse
detailsarray of object

Additional details about the error.

Show child attributes
Show array items
messagestringrequired

Description of a specific validation or processing error.

errorstringrequired

Error message describing what went wrong.

Example response
{
  "details": [
    {
      "message": "string"
    }
  ],
  "error": "string"
}
500Server errorapplication/json
objectAnalyticsErrorResponse
detailsarray of object

Additional details about the error.

Show child attributes
Show array items
messagestringrequired

Description of a specific validation or processing error.

errorstringrequired

Error message describing what went wrong.

Example response
{
  "details": [
    {
      "message": "string"
    }
  ],
  "error": "string"
}
Documentation menu