Skip to main content
GET
/
v1
/
analytics
/
{projectId}
/
visitors
Get unique visitors
curl --request GET \
  --url https://api.mintlify.com/v1/analytics/{projectId}/visitors \
  --header 'Authorization: Bearer <token>'
{
  "totals": {
    "human": 123,
    "ai": 123,
    "total": 123
  },
  "visitors": [
    {
      "path": "<string>",
      "human": 123,
      "ai": 123,
      "total": 123
    }
  ],
  "hasMore": true
}

Usage

Use this endpoint to export unique visitor analytics. Results include both site-wide totals and per-page breakdowns, split by human and AI traffic. The total field is deduplicated across human and AI traffic. Paginate through results using offset-based pagination. Increment offset by limit while hasMore is true.

Filtering

Filter visitor data by date range using dateFrom and dateTo parameters.

Response data

The response includes a totals object with site-wide aggregates and a visitors array with per-page data. Each entry includes:
  • path: The documentation page path
  • human: Unique visitors from human traffic
  • ai: Unique visitors from AI bot traffic
  • total: Approximate distinct visitors (deduplicated across human and AI)

Authorizations

Authorization
string
header
required

The Authorization header expects a Bearer token. Use an admin API key (prefixed with mint_). This is a server-side secret key. Generate one on the API keys page in your dashboard.

Path Parameters

projectId
string
required

Your project ID. Can be copied from the API keys page in your dashboard.

Query Parameters

dateFrom
string

Date in ISO 8601 or YYYY-MM-DD format

Example:

"2024-01-01"

dateTo
string

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.

Example:

"2024-01-01"

limit
integer
default:50

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

Required range: 1 <= x <= 250
offset
integer
default:0

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

Required range: x >= 0

Response

Site-wide totals and per-path visitor counts

totals
object
required

Site-wide unique visitor totals for the date range.

visitors
object[]
required

Per-page visitor counts.

hasMore
boolean
required

Whether additional results are available beyond this page.